OpenStack Example
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
Using the scan_plugin via Command Line to Setup OpenStack Backups
In the example presented below, the Scan Plugin will contact the OpenStack
server via the OpenStack Plugin installed on the bacula-proxy-vm-rhel9-fd.
For each instance detected in the OpenStack server, a separate Job and Fileset will
be created. Also, it will use the JobDefs BackupsToDisk in the new Jobs created.
By using the --exclude bacula-proxy-vm-rhel9 option, a backup job for the bacula-proxy-vm-rhel9
will not be created.
# sudo -u bacula /opt/bacula/bin/scan_plugin --jobdefs BackupsToDisk --client bacula-proxy-vm-rhel9-fd --plugin openstack --plugin_option proxy_server=bacula-proxy-vm-rhel9 --scan_option proxy_server=bacula-proxy-vm-rhel9 --exclude bacula-proxy-vm-rhel9 --commit_and_reload
Report for scan_plugin 0.8 bacula-proxy-vm-rhel9-fd:openstack
----------------------------------------------
Client: bacula-proxy-vm-rhel9-fd
Plugin: openstack
Objects Added: 2
---------------------------------------------
~ updated, = kept, + added, X removed, D disabled
---------------------------------------------
+ J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2
+ J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1
----------------------------------------------
Status: Configuration applied and reloaded
The following configuration will be created:
# cat /opt/bacula/etc/conf.d/Director/am-r9-bee-bweb-openstack-tst-dir/Job/J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1.cfg
Job {
Name = "J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1"
Description = "{\"description\":\"Generated by scan_plugin. Do not edit.\",\"id\":\"bacula-proxy-vm-rhel9-fd:openstack\",\"parameter\":\"server\",\"plugin\":\"openstack\",\"server\":\"cirros-instance1\",\"uuid\":\"uuid=c37c9c5d-4296-41fc-9fc0-b8047ba2737b\",\"version\":\"0.8\"}"
Type = "Backup"
Client = "bacula-proxy-vm-rhel9-fd"
Fileset = "F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1"
JobDefs = "BackupsToDisk"
}
# cat /opt/bacula/etc/conf.d/Director/am-r9-bee-bweb-openstack-tst-dir/Fileset/F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1.cfg
Fileset {
Name = "F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance1"
Description = "{\"description\":\"Generated by scan_plugin. Do not edit.\",\"id\":\"bacula-proxy-vm-rhel9-fd-openstack-1746790567\",\"parameter\":\"server\",\"plugin\":\"openstack\",\"server\":\"cirros-instance1\",\"uuid\":\"uuid=c37c9c5d-4296-41fc-9fc0-b8047ba2737b\",\"version\":\"0.8\"}"
Include {
Options {
}
Plugin = "openstack: server=\"cirros-instance1\" neutron_network_backup=\"true\" proxy_server=\"bacula-proxy-vm-rhel9\""
}
}
# cat /opt/bacula/etc/conf.d/Director/am-r9-bee-bweb-openstack-tst-dir/Job/J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2.cfg
Job {
Name = "J_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2"
Description = "{\"description\":\"Generated by scan_plugin. Do not edit.\",\"id\":\"bacula-proxy-vm-rhel9-fd:openstack\",\"parameter\":\"server\",\"plugin\":\"openstack\",\"server\":\"cirros-instance2\",\"uuid\":\"uuid=10440235-d07a-442b-acad-9e68bcdf3752\",\"version\":\"0.8\"}"
Type = "Backup"
Client = "bacula-proxy-vm-rhel9-fd"
Fileset = "F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2"
JobDefs = "BackupsToDisk"
}
# cat /opt/bacula/etc/conf.d/Director/am-r9-bee-bweb-openstack-tst-dir/Fileset/F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2.cfg
Fileset {
Name = "F_bacula-proxy-vm-rhel9-fd_openstack_cirros-instance2"
Description = "{\"description\":\"Generated by scan_plugin. Do not edit.\",\"id\":\"bacula-proxy-vm-rhel9-fd-openstack-1746790567\",\"parameter\":\"server\",\"plugin\":\"openstack\",\"server\":\"cirros-instance2\",\"uuid\":\"uuid=10440235-d07a-442b-acad-9e68bcdf3752\",\"version\":\"0.8\"}"
Include {
Options {
}
Plugin = "openstack: server=\"cirros-instance2\" neutron_network_backup=\"true\" proxy_server=\"bacula-proxy-vm-rhel9\""
}
}
Using BWeb Automation to Setup OpenStack Backups
Using BWeb, it is possible to setup an Automation Job to run regularly, and add or remove Jobs from the instances found in the OpenStack server.
Click in either the
Create automationbutton or theNew Automationleft menu.
Select the OpenStack plugin and the Bacula proxy VM Client used to run the OpenStack backups, and choose “Add Connection Plugin Options” to setup connection parameters.
Enter the name or UUID of the Bacula proxy VM in the OpenStack server, and the check button to confirm the connection is successful. After the check button has reported a successful connection, submit the settings.
An example of how the OpenStack Plugin line should look like in the Fileset, and click in Next.
In Step 2, Defining what to backup, there are a few options:
using a regular expression to Include a set of instances
using a regular expression to Exclude a set of instances
Note
It is possible to use both the Include and Exclude options in the same automation Job.
manually selecting the items to be included in the OpenStack backup
In Step 3, the Job parameters can be configured:
In Step 4, the Automation name, a Schedule to run the Automation, and other options can be configured:
By clicking in
Run now and savein Step 4, the Automation Job is saved, it runs, and it adds two Jobs for both thecirros_instance1and thecirros_instance2objects:
See also
Previous articles:
Next articles:
Go back to: Examples.