Bacula Community Edition
Learn how to use Bacula Community Edition to store data on the ScPrime distributed datacenter using the XNS Relayer
Overview
Bacula Community Edition is an open-source, enterprise-level computer backup system for heterogeneous networks. Bacula Community Edition can copy backups to S3 protocol destinations, so it makes a good match for XNS storage.
Read this guide for how to configure Bacula Community Edition to store data with XNS.
Prerequisites
- A working instance of Bacula Community Edition
- Installed Cloud storage plugin for S3 (e.g., bacula-cloud-storage-s3_13.0.2-1~focal_amd64.deb)
- An existing Storage Daemon
- An existing Job
- A working instance of the XNS Relayer
- Configured XNS Relayer Endpoint Access Key and Endpoint Secret Key
Considerations
- Bacula Community Edition requires a valid SSL certificate to use the XNS Relayer as an HTTPS endpoint. Please configure the XNS Relayer with a valid SSL certificate or change the Endpoint Certificate Type to not require SSL. These settings can be accessed in the Relayer UI by going to Configuration > General Configuration and editing the Select Endpoint Certificate Type setting to ‘No SSL’.
Application Version Used in Guide
Bacula Community Edition 13.0.2
Guide Revision Date
2023-03-28
Setup Guide
Step 1: Add a Device and Cloud to a Storage Daemon
Edit your Bacula Community Edition Storage Daemon configuration file using a text editor of choice. Depending on the deployment method, common locations are:
/etc/bacula/bacula-sd.conf
/opt/bacula/etc/bacula-sd.conf
Device {
Name = XNSRelayer
Device Type = Cloud
Cloud = XNSCloud
Archive Device = /opt/bacula/backups
Maximum Part Size = 10000000
Media Type = ScPrimeCloud
LabelMedia = yes
Random Access = Yes;
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
}
Cloud {
Name = XNSCloud
Driver = "S3"
HostName = "10.10.20.11:9000"
BucketName = "bacula"
AccessKey = "YourEndpointAccessKeyFromXNSRelayer"
SecretKey = "YourSecretAccessKeyFromXNSRelayer"
Protocol = HTTPS
UriStyle = Path
Truncate Cache = No
Upload = EachPart
}
Device Configuration Key Parameters | ||
Name | XNSRelayer | This is the name of the Device that will be referred to in the Director. |
Device Type | Cloud | Type of Device |
Cloud | XNSCloud | This is the name of the Cloud that will be defined elsewhere in the config file. This must match. |
Media Type | ScPrimeCloud | This is meant to track the underlying media that the Device is using. |
Cloud Configuration Key Parameters | ||
Name | XNSCloud | This is the name of the Cloud that is defined elsewhere in the Device config. This must match. |
Driver | S3 | Cloud driver type |
HostName | [Your IP]:[MinIO Port] | The location of the XNS Relayer. |
Bucket Name | [Your Bucket Name] | This is the name of the bucket for where Bacula will save backups. |
Access Key | [Endpoint Access Key (Username)] | This is defined in the XNS Relayer General Configuration. |
Secret Key | [Endpoint Secret Key (Password)] | This is defined in the XNS Relayer General Configuration. |
Protocol | HTTPS | Select HTTPS if you are using SSL or HTTP if you are not using SSL.
n.b., a valid SSL Certificate must be used if using HTTPS. |
UriStyle | Path | Bacula works with XNS Relayer using the Path URI Style as of this version of Bacula Community Edition. |
Step 2: Add a Storage Device to a Backup Job in the Director
Edit your Bacula Community Edition Director configuration file using a text editor of choice. Depending on the deployment method, common locations are:
/etc/bacula/bacula-dir.conf
/opt/bacula/etc/bacula-dir.conf
Storage {
Name = xnscloudstorage
Address = 127.0.0.1
Password = "YourStorageDaemonPassword"
Device = XNSRelayer
Media Type = ScPrimeCloud
}
Storage Configuration Key Parameters | ||
Name | xnscloudstorage | This is the name of the Storage that is referenced in a Job. |
Address | [Bacula Storage Daemon IP] | The location of the Bacula Storage Daemon that is managing the connection to the XNS Relayer. |
Password | [Bacula Storage Daemon Password] | The password of the Bacula Storage Daemon that is managing the connection to the XNS Relayer. |
Device | XNSRelayer | This is the name of Device from the Storage Daemon configuration. |
Media Type | ScPrimeCloud | This is meant to track the underlying media that the Device is using. Match this value to the one used in the Storage Daemon |
Edit your Job to use the Storage that was defined. Please note that other parameters may be defined in your job. The below was snipped for simplicity.
Job {
[…]
Storage = xnscloudstorage
[…]
}
Job Configuration Key Parameters | ||
Storage | xnscloudstorage | This is the name of the Storage that was defined in the Director. |
Step 3: Reload the Storage Daemon and Director Services
To make your configurations able to be used, reload the Storage Daemon and Director Services in the shell. The following is a common command based on the Bacula Ubuntu 20.04 packages.
# systemctl restart bacula-sd bacula-dir
The XNS Relayer is now able to be used in the job.