Create a backup or restore Cinder volumes and snapshots

Create a backup or restore Cinder volumes and snapshotsΒΆ

This section describes how to back up and restore Cinder volumes and snapshots in an OpenStack cluster. If your MCP version is earlier than 2019.2.4, before proceeding with the steps below, Manually enable the Ceph backup engine for Cinder.

Note

MCP sets the cinder-backup service to work with Ceph as a backup driver. The configuration parameters of the Cinder backup service are defined in the Salt formula. For details and configuration examples, see the SaltStack Cinder formula.

To back up a Cinder volume:

Create a full backup of a volume by running the following command on the Salt Master node:

salt -C 'I@keystone:client' cmd.run ". /root/keystonercv3; \
        openstack volume backup create --force <VOLUME_ID>"

Note

After a full backup is created, use the --incremental flag for further backups.

To back up a Cinder snapshot, run:

salt -C 'I@keystone:client' cmd.run ". /root/keystonercv3; \
        openstack volume backup create --force --snapshot <SNAPSHOT_ID> \
                                                            <VOLUME_ID>"

Note

For further backups, use the --incremental flag.

To restore Cinder volumes or snapshots, run:

salt -C 'I@keystone:client' cmd.run ". /root/keystonercv3; \
        openstack volume backup restore <BACKUP_ID> <VOLUME_ID>"