Tuesday, April 14, 2026

How to install Bareos Proxmox Plugin - Backup and Restore VM & CT Guests 

Bareos 25 Proxmox Plugin, supports its powerful agentless backup and restore capabilities for both Virtual Machine (VM) and Container (CT) guests.

Prerequisites

  • Bareos Version: Ensure you are running Bareos 25 or later
  • Bareos Director & File Daemon
  • Python Plugin Support

Step 1: Installation and configuration on Proxmox server

Install the necessary python plugin packages. 

apt install bareos-filedaemon-python3-plugin
If you do not have a subscription, please copy the code from the following link:
https://github.com/bareos/bareos/blob/master/core/src/plugins/filed/python/proxmox/bareos-fd-proxmox.py 

Please use this code to create a Python file named bareos_fd_proxmox.py in the /usr/lib/bareos/plugins/ directory.

grant permission "chmod 755 /usr/lib/bareos/plugins/bareos_fd_proxmox.py"

Install Bareos File daemon on on Proxmox server.

curl -s https://download.bareos.org/current/Debian_13/add_bareos_repositories.sh | bash
wget https://download.bareos.org/current/Debian_13/add_bareos_repositories.sh

chmod +x add_bareos_repositories.sh
./add_bareos_repositories.sh 

Once the script completes successfully:
Update your package list: apt update
Install the plugin: apt install bareos-filedaemon-python3-plugin


Verify: Ensure the plugin is available at /usr/lib/bareos/plugins/python3-fd.so.
root@pve3:~# ls /usr/lib/bareos/plugins/python3-fd.so
/usr/lib/bareos/plugins/python3-fd.so
Make sure Bareos File Daemon service is running
systemctl status bareos-filedaemon
systemctl start bareos-filedaemon

Please note down the the password from /etc/bareos/bareos-fd.d/director/bareos-dir.conf

root@pve3:~# cat /etc/bareos/bareos-fd.d/director/bareos-dir.conf
Director {
  Name = bareos-dir
  Password = "abcdefghijklmnopqrstuvwxyz"
  Description = "Allow the configured Director to access this file daemon."
} 

 add/uncomment the last two lines of /etc/bareos/bareos-fd.d/client/myself.conf

root@pve3:~# cat /etc/bareos/bareos-fd.d/client/myself.conf
Client {
  Name = pve3-fd

  # remove comment from "Plugin Directory" to load plugins from specified directory.
  # if "Plugin Names" is defined, only the specified plugins will be loaded,
  # otherwise all filedaemon plugins (*-fd.so) from the "Plugin Directory".
  #
  Plugin Directory = "/usr/lib/bareos/plugins"
  Plugin Names = ""

 

Step 2: configuration on Bareos server.

Add Proxmox client password in to /ete/bares/bareos-dir.d/client/bareos-fd.conf

Client {
  Name = pve3-fd
  Address = 10.40.2.70
  Password = "abcdefghijklmnopqrstuvwxyz"
}

 

Step 3: Configure Backup Jobs 

In your Bareos Director configuration, define a new FileSet and Job that utilizes the Proxmox plugin: 

vim /etc/bareos/bareos-dir.d/fileset/ProxmoxVM100.conf
FileSet {
  Name = "Proxmox"
  Include {
    Options {
      Signature = XXH128
      Compression = LZ4
    }
    # For this plugin, use 'guestid' instead of 'vmid'
    # No server, address, or credentials are required as it runs locally
    Plugin = "python3:module_path=/usr/lib/bareos/plugins:module_name=bareos-fd-proxmox:guestid=100"
  }
}
vim /etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
Job {
  Name = "BackupProxmox"
  Type = Backup
  Level = Full
  # This Client MUST be the Proxmox node where the FD + Plugin is installed
  Client = pve3-fd
  FileSet = "Proxmox"
  Storage = File
  Pool = Full
  Messages = Standard
}

Step 4: Switch the Bareos File Daemon runtime group to root

If file Daemon is still running as the restricted bareos user so change it to root..

mkdir -p /etc/systemd/system/bareos-filedaemon.service.d/
cat <<EOF > /etc/systemd/system/bareos-filedaemon.service.d/override.conf
[Service]
User=root
Group=root
EOF
systemctl daemon-reload
systemctl restart bareos-filedaemon

ps -ef | grep bareos-fd
(Ensure the first column says root).
root@pve-test:~# ps -ef | grep bareos-fd
root         934       1  0 Apr08 ?        00:00:30 /usr/sbin/bareos-fd -f
root     1288110 1287786  0 14:34 pts/1    00:00:00 grep bareos-fd 

Step 5: Backup and Restore Operations 

Run this on Proxmox terminal.
"vzdump 100 --stdout > /dev/null"
The command vzdump 100 --stdout > /dev/null performs a backup of virtual machine/container 100 on Proxmox VE, sends the backup data to standard output, and then discards it into the null device. This effectively tests the backup process and speed without saving the final file to disk.

Performing Backups: Initiate jobs through the Bareos Console (bconsole) or Bareos WebUI.

Let's try on bconsole: 
  • run job=BackupProxmox
*run job=BackupProxmox
Run Backup job
JobName:  BackupProxmox
Level:    Full
Client:   pve-test-fd
Format:   Native
FileSet:  Proxmox
Pool:     Full (From Job resource)
Storage:  File (From Pool resource)
When:     2026-04-14 11:59:04
Priority: 10
OK to run? (yes/mod/no):
Say "Yes"
  • auto on
Screenshots from client - pve-test-fd





You should receive a confirmation email from the Proxmox server once the backup is completed.



Commands for restore a client. 
  • restore client=pve-test-fd fileset=BackupProxmox

  • Select 5
  • mark *
  • done

"Here is an awesome tutorials I found!

Credits: 
"Bareos 25: Proxmox Plugin - Backup and Restore VM & CT Guests" by :Bareos - Backup & Recovery Open Source: https://www.youtube.com/watch?v=gLajfP_kF1k&t=1s









No comments:

Post a Comment