Wednesday, April 15, 2026

How to configure Amazon S3 storage backend for Bareos

Configuration Steps 

Prerequisites

  • S3 bucket
  • IAM credentials 
  • bareos-storage-droplet package

Step 1: Installation

Install Backend: Install the bareos-storage-droplet package from the official Bareos repositories.

thushara@server:/etc/bareos$ sudo apt install bareos-storage-droplet
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  bareos-storage-droplet
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Step 2: Director Configuration

Define a Storage resource in the Bareos Director (e.g., /etc/bareos/bareos-dir.d/storage/s3.conf) and specify a dedicated Media Type.

root@BAT-NUC:/etc/bareos# cat /etc/bareos/bareos-dir.d/storage/s3.conf
Storage {
  Name = s3_Bareos
  Address  = BAT-NUC
  Password = "abcdefghijklmnopqrstuvwxyz"
  Device = "s3_dev1"
  Device = "s3_dev2"
  Media Type = "s3_object1"
  Maximum Concurrent Jobs = 2 # equals the number of devices
}

Storage {
  Name = s3_Bareos
  Address  = BAT-NUC
  Password = "abcdefghijklmnopqrstuvwxyz"
  Device = "s3_dev3"
  Device = "s3_dev4"
  Media Type = "s3_object2"
  Maximum Concurrent Jobs = 2 # equals the number of devices
}

Step 3: Storage Daemon Configuration

 Create a Device resource in the Storage Daemon pointing to the droplet backend

root@BAT-NUC:/etc/bareos# cat /etc/bareos/bareos-sd.d/device/s3.conf

Device {
  Name = "s3_dev1"
  Media Type = "s3_object1"
  Archive Device = S3 Object Storage
  Device Options = "profile=/etc/bareos/bareos-sd.d/device/droplet/s3.profile,bucket=my-backup-data,chunksize=100M"
  Device Type = droplet
  Label Media = yes
  Random Access = yes
  Automatic Mount = yes
  Removable Media = no
  Always Open = no
  Description = "s3 device"
  Maximum Concurrent Jobs = 1
}
Device {
  Name = "s3_dev2"
  Media Type = "s3_object1"
  Archive Device = S3 Object Storage
  Device Options = "profile=/etc/bareos/bareos-sd.d/device/droplet/s3.profile,bucket=my-backup-data,chunksize=100M"
  Device Type = droplet
  Label Media = yes
  Random Access = yes
  Automatic Mount = yes
  Removable Media = no
  Always Open = no
  Description = "s3 device"
  Maximum Concurrent Jobs = 1
}
Device {
  Name = "s3_dev3"
  Media Type = "s3_object2"
  Archive Device = S3 Object Storage
  Device Options = "profile=/etc/bareos/bareos-sd.d/device/droplet/s3.profile,bucket=my-backup-data,chunksize=100M"
  Device Type = droplet
  Label Media = yes
  Random Access = yes
  Automatic Mount = yes
  Removable Media = no
  Always Open = no
  Description = "s3 device"
  Maximum Concurrent Jobs = 1
}
Device {
  Name = "s3_dev4"
  Media Type = "s3_object2"
  Archive Device = S3 Object Storage
  Device Options = "profile=/etc/bareos/bareos-sd.d/device/droplet/s3.profile,bucket=my-backup-data,chunksize=100M"
  Device Type = droplet
  Label Media = yes
  Random Access = yes
  Automatic Mount = yes
  Removable Media = no
  Always Open = no
  Description = "s3 device"
  Maximum Concurrent Jobs = 1
}

 Step 4: S3 Credentials Profile:

Create a droplet profile (e.g., /etc/bareos/bareos-sd.d/device/droplet/s3.profile) containing your IAM access keys, secret keys, and region..

root@BAT-NUC:/etc/bareos# cat /etc/bareos/bareos-sd.d/device/droplet/s3.profile
aws_region = ap-southeast-2
access_key = "abcdefghijklmnopqrstuvwxyz"
secret_key = "abcdefghijklmnopqrstuvwxyz"
host = s3.ap-southeast-2.amazonaws.com:443
use_https = true
backend = s3
aws_auth_sign_version = 2
pricing_dir = ""

 

To test an AWS S3 connection from PowerShell using the AWS CLI and Security Token Service (STS), follow these steps:
  1. Use the aws configure command to set up your access keys, secret key, and default region.

  2. Run the aws sts get-caller-identity command to confirm that your credentials are valid and active. This returns your Account ID, UserId, and ARN.

  3. Test S3 Connection, aws s3 ls To verify actual connectivity and permissions to S3, list your buckets.

  4. Test Access to a Specific Bucket If you only have permission for a single bucket, listing all buckets might fail even with a valid key. Instead, try listing the contents of that specific bucket: aws s3 ls s3://your-bucket-name

  5. To copy a file manually to Amazon S3 using PowerShell, you can use aws s3 cp "C:\path\to\yourfile.txt" s3://your-bucket-name/


Please run this command on bconsole see connection is working 
status storage=s3_Bareos
If it's working output should be as bellow 

Connecting to Storage daemon s3_Bareos at 10.3.1.1:9103 

Job inventory:

No Jobs running. 

Device status:

Device "s3_dev1" (S3) is not open.
Backend connection is working.
No pending IO flush requests.
==

Device "s3_dev2" (S3) is not open.
Backend connection is working.
No pending IO flush requests

Step 4: link your Pool

To finish the setup, you need to link your Pool resource to the specific Storage:
In your Bareos director configuration (usually under /etc/bareos/bareos-dir.d/pool/), add the Storage directive.
In this setup differential and incremental backups will continue to be stored in the local folder on the file server, while monthly full backups will now be directed to AWS S3.
/etc/bareos/bareos-dir.d/pool/Full.conf 
Pool {
  Name = Full
  Pool Type = Backup
  Storage = s3_Bareos
  Recycle = yes                       # Bareos can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 7 days           # How long should the Full Backups be kept?
  Maximum Volume Bytes = 100G          # Limit Volume size to something reasonable
  Maximum Volumes = 11                # Limit number of Volumes in Pool
  Label Format = "Full-"              # Volumes will be labeled "Full-<volume-id>"
  Recycle Oldest Volume = yes         #prune the oldest volume in the Pool, and if all files were pruned, recycle this volume and use it.
  Purge Oldest Volume = yes           #permits a forced recycling of the oldest Volume when a new one is needed.
}
--  

root@BAT-NUC:/etc/bareos# cat /etc/bareos/bareos-dir.d/pool/Incremental.conf
Pool {
  Name = Incremental
  Pool Type = Backup
  Storage = File                        
  Recycle = yes                       # Bareos can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 4 days          # How long should the Incremental Backups be kept?
  Maximum Volume Bytes = 100G           # Limit Volume size to something reasonable
  Maximum Volumes = 10                # Limit number of Volumes in Pool
  Label Format = "Incremental-"       # Volumes will be labeled "Incremental-<volume-id>"
  Recycle Oldest Volume = yes
  Purge Oldest Volume = yes           #permits a forced recycling of the oldest Volume when a new one is needed.
}

root@BAT-NUC:/etc/bareos# cat /etc/bareos/bareos-dir.d/pool/Differential.conf
Pool {
  Name = Differential
  Pool Type = Backup
  Storage = File                        
  Recycle = yes                       # Bareos can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 5 days          # How long should the Differential Backups be kept?
  Maximum Volume Bytes = 100G          # Limit Volume size to something reasonable
  Maximum Volumes = 10               # Limit number of Volumes in Pool
  Label Format = "Differential-"      # Volumes will be labeled "Differential-<volume-id>"
  Purge Oldest Volume = yes           #permits a forced recycling of the oldest Volume when a new one is needed.
  Purge Oldest Volume = yes           #permits a forced recycling of the oldest Volume when a new one is needed.
--  

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