Configuration
The following article presents the configuration of the plugin.
1. For each Tenant/Project in the OpenStack infrastructure that contains Instances to be backed up, it is required to download the <tenant/project>-openrc.sh
file in the host where the OpenStack VM plugin is installed.
The <tenant/project>-openrc.sh
file contains variables that enable the plugin to communicate with the cinder-backup service to perform the backup and restore of the instance(s) volume(s).
To backup the Instance(s) volume(s) in the Admin tentant, for example:
Download the
admin-openrc.sh
file.Downloading
admin_openrc.sh
script can be done through the Openstack dashboard. To do so, the user can click on theOpenStack RC File
menu item located at the top right of the dashboard.
Inside the
admin_openrc.sh
file comment or replace bothecho "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
andread -sr OS_PASSWORD_INPUT
withOS_PASSWORD_INPUT=<password>
like in the example below.
admin-openrc.sh - Bash
#!/usr/bin/env bash
# To use an OpenStack cloud you need to authenticate against the Identity
# service named keystone, which returns a **Token** and **Service Catalog**.
# The catalog contains the endpoints for all services the user/tenant has
# access to - such as Compute, Image Service, Identity, Object Storage, Block
# Storage, and Networking (code-named nova, glance, keystone, swift,
# cinder, and neutron).
#
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
# OpenStack API is version 3. For example, your cloud provider may implement
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
# only for the Identity API served through keystone.
export OS_AUTH_URL=http://10.0.255.255/identity
# With the addition of Keystone we have standardized on the term **project**
# as the entity that owns the resources.
export OS_PROJECT_ID=abcdefghijklmnopqrstuvwxyz012345
export OS_PROJECT_NAME="admin"
export OS_USER_DOMAIN_NAME="Default"
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
export OS_PROJECT_DOMAIN_ID="default"
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
# unset v2.0 items in case set
unset OS_TENANT_ID
unset OS_TENANT_NAME
# In addition to the owning entity (tenant), OpenStack stores the entity
# performing the action as the **user**.
export OS_USERNAME="admin"
# With Keystone you pass the keystone password.
# The two next lines are the one that need to be commented out or deleted
# echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
# read -sr OS_PASSWORD_INPUT
# Add this line with your Openstack password
OS_PASSWORD_INPUT=<password>
export OS_PASSWORD=$OS_PASSWORD_INPUT
# If your configuration has multiple regions, we set that information here.
# OS_REGION_NAME is optional and only valid in certain environments.
export OS_REGION_NAME="RegionOne"
# Don't leave a blank variable, unset it if it was empty
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3
Copy or symlink the file into
/opt/bacula/etc/admin-openrc.sh
or another directory in the OpenStack host where the Bacula OpenStack VM plugin is installed. By default, the plugin uses theDEFAULT=/opt/bacula/admin-openrc.sh
path. It is possible to store theadmin-openrc.sh
file in a different directory, and provide the relevant value foradmin-openrc.sh
plugin parameter.
The second important configuration step is to advise the cinder-backup service to use the Bacula Cinder driver.
To do so, the Cinder configuration file located by default at
/etc/cinder/cinder.conf
needs to be modified.Inside the
[DEFAULT]
group, the linebackup_driver = cinder.backup.drivers.bacula.BaculaBackupDriver
need to be added.
[DEFAULT]
...
backup_driver = cinder.backup.drivers.bacula.BaculaBackupDriver
...
Configuring the Backint Parameter File
Backint can be configured with the /opt/bacula/openstack/os-backint.conf
file.
Note
Usually the configuration file genrated by the install script should fit the current system.
The following section is only for user who wish to manually configure os-backint
.
The keywords presented here are accepted in the backint.conf file.
Parameter |
Example |
Description |
Required |
Default |
---|---|---|---|---|
client |
|
Bacula Client name. |
Yes |
NULL |
restoreclient |
|
Bacula Client name used to restore data. |
No |
NULL |
job |
|
Bacula Backup Job name. |
Yes |
NULL |
bconsole |
|
Bconsole command with all arguments. |
Yes |
|
RestoreJob |
|
Bacula Restore Job name. If multiple restore jobs are defined in your configuration and this option is not used,
|
No |
NULL |
WaitJobCompletion |
|
Indicates to wait for Job completion at the end of the The default is wait at the end of the |
Yes |
no |
JobOpt |
|
Allows you to specify additional Job options. |
No |
NULL |
CtrlFile |
|
Specifies the base path of control files used to connect with the bacula-fd plugin. You must use the same location on the Plugin command line in the Fileset, and in the backint.conf configuration file. |
No |
|
wait_retry |
|
Specifies the number of times that try to reach the Bacula Enterprise Openstack plugin (10s between each try). |
No |
32 |
catalog |
|
Specifies a Bacula Catalog name if your director is using multiple catalogs. |
No |
NULL |
trace |
|
Points to an optional trace file. |
No |
NULL |
debug |
|
Debug level. |
No |
0 |
See also
Go back to the main Openstack VM page.