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:

  1. 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 the OpenStack RC File menu item located at the top right of the dashboard.

../../../../../_images/openstack_rc.png
  1. Inside the admin_openrc.sh file comment or replace both echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " and read -sr OS_PASSWORD_INPUT with OS_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
  1. 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 the DEFAULT=/opt/bacula/admin-openrc.sh path. It is possible to store the admin-openrc.sh file in a different directory, and provide the relevant value for admin-openrc.sh plugin parameter.

  1. 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 line backup_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

client=openstack-fd

Bacula Client name.

Yes

NULL

restoreclient

restoreclient=openstack-test-fd

Bacula Client name used to restore data.

No

NULL

job

job=OPENSTACK-BRTOOLs

Bacula Backup Job name.

Yes

NULL

bconsole

bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/openstack/bconsole.conf"

Bconsole command with all arguments.

Yes

bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/openstack/bconsole.conf"

RestoreJob

restorejob=RestoreFiles

Bacula Restore Job name. If multiple restore jobs are defined

in your configuration and this option is not used,

backint will automatically choose the first restore Job defined.

No

NULL

WaitJobCompletion

waitjobcompletion=yes

Indicates to wait for Job completion at the end of the backint session.

The default is wait at the end of the backint session.

Yes

no

JobOpt

jobopt="spooldata=no"

Allows you to specify additional Job options.

No

NULL

CtrlFile

ctrlfile=/opt/bacula/openstack/os-backint

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

/opt/bacula/openstack/os-backint

wait_retry

wait_retry=30

Specifies the number of times that backint will

try to reach the Bacula Enterprise Openstack plugin (10s between each

try).

No

32

catalog

catalog="MyCatalog 2"

Specifies a Bacula Catalog name if your director is using multiple catalogs.

No

NULL

trace

trace=/tmp/log.txt

Points to an optional trace file.

No

NULL

debug

debug=50

Debug level.

No

0

Go back to the main Openstack VM page.