...
Choose the appropriate method based on your recovery needs: instance snapshots for full system recovery or replication, volume snapshots for accident prevention and recovery or volume backups for full data security and recovery.
| Info |
|---|
Before starting make sure you are in the machine where you configured openstack client and you can run openstack commands as described in EWC - OpenStack Command-Line client |
| Warning |
|---|
When creating backups or snapshots of VMs and volumes, it is highly recommended that the following command are run outside from said VMs and volumes. Doing so from within may cause corrupted backups or snapshots. |
Backup VMs and volumes
Instance Snapshots
...
where:
--name <image_name>: The the name for the new image snapshot<server>: The the name or id of your server / VM to be backed up.
Lastly, In order to see the list of images, including the recent snapshotrecently created snapshot, one can run
| Code Block |
|---|
openstack image list |
and
...
the
...
specific
...
details
...
of
...
the
...
created
...
image can be found
...
| Code Block |
|---|
openstack image show <image_name> |
...
Volume Snapshots
To create a snapshot of a volume
| Code Block |
|---|
openstack volume snapshot [--force] --volume <volume> <snapshot_name> |
with:
--force: create the snapshot even if the volume is attached–volume <volume>: the name or id of the volume to be backed up<snapshot_name>: the name of the new volume snapshot
To see the list of all snapshots in your cloud, or the snapshots from a specific volume, run
Volume Backups
List available backups
To list all available backups in your cloud, you can use the following command:
| Code Block |
|---|
openstack volume backupsnapshot list [--volume <volume>] |
and to get the details of a specific snapshotAdditionally, you can filter the results with additional options to list backups for a specific volume:
| Code Block |
|---|
openstack volume backupsnapshot list --volume VOLUME_ID |
...
show <snapshot_name> |
Volume Backups
To create a backup of a volume run:
| Code Block |
|---|
openstack volume backup create [--incremental] [--force] [--name NAME<backup_name>] VOLUME<volume> |
Where:
--incremental:Create create an incremental backup (requires a previous full backup)--force:Create create a backup even if the volume is attached--name NAME: Specify a name for the backupVOLUME: The ID or name of the volume to back up<backup_name>: the name of the new volume backup<volume>: the name or id of the volume to be backed up
To list all available backups in your cloud, you can use the following command:
| Code Block |
|---|
openstack volume backup list |
Additionally, you can filter the results with additional options to list backups for a specific volume:
| Code Block |
|---|
openstack volume backup list --volume VOLUME_ID |
| Info |
|---|
It is usually recommended to unmount the volumes before backing them up, to avoid potential crashes. Nevertheless, one can force the backup of attached volumes with the |
Common use cases
These is a list of common configurations of VMs and volumes in the cloud and the recommened procedure to backing them up
Single VM
WIP
Single VM and attached volume(s)
WIP
Single VM and multiple networks
WIP
Single VM and SFS
WIP
Multiple VMs
WIP
Automatic backups
WIP