You can configure Cinder to back up volumes to a network file system (NFS) server.
Prerequisites
- Create a shared NFS directory dedicated to storing Cinder backups.
- Verify that the owner of the NFS share folder is the
root
user (UID 0).
Procedure
- Log in to the Integrated OpenStack Manager as the
root
user.
- Edit the Cinder configuration.
- In the
conf
section, create the cinder
section. In the cinder
section, create the DEFAULT
section.
- In the
DEFAULT
section, add the backup_driver parameter and set its value to cinder.backup.drivers.nfs.NFSBackupDriver
.
The configuration file now looks similar to the following.
conf:
backends:
[...]
cinder:
DEFAULT:
backup_driver: cinder.backup.drivers.nfs.NFSBackupDriver
- Add the backup_mount_options parameter and set its value to your version of NFS.
For example, enter
vers=4 to support NFS version 4.
- Add the backup_share parameter and set its value to the location of the shared NFS directory.
Use the format
nfs-host:path. For example,
192.0.2.100:/cinder
.
- Create the
manifests
section.
- In the
manifests
section, add the statefulset_backup parameter and set its value to true.
- Add the job_backup_storage_init parameter and set its value to true.
The configuration file now looks similar to the following.
conf:
backends:
[...]
cinder:
DEFAULT:
backup_driver: cinder.backup.drivers.nfs.NFSBackupDriver
backup_mount_options: nfs-version
backup_share: nfs-host:path
manifests:
statefulset_backup: true
job_backup_storage_init: true
Results
You can now use the
cinder backup-create command to back up your Cinder volumes.