Pre-requisite: EWC - OpenStack Command-Line client |
Before restoring resources in OpenStack, it's important to understand the difference between three primary methods:
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.
Furthermore, there are two different restoration methods, according to whether the restoration replaces an existing resource or not:
| Before starting make sure you are in the machine where you configured openstack client, have the required openstack credentials and you can run openstack commands as described in EWC - OpenStack Command-Line client |
| The restoration of backups or snapshots of VMs and volumes must be run outside from said VMs and volumes, specially in the case of in-place restoration, as the existing resource is completely replaced. |
OpenStack provide a mechanism to replace the underlying disk of an existing VM with an image without creating a new VM instance running the following command:
|
where
<instance> : The name or id of the existing VM<image_snapshot> : Name or id of the snapshot image of the VM previously createdIt is worth noting that the underlaying image of the instance
Restoration of Volume Snapshots
Restoration of Volume Backups
To restore a backup to a new volume, first you need to detach the volume from the VM:
ssh into your VM
become root
unmount the volume
|
|
Where:
BACKUP_ID: The ID of the backup to restoreVOLUME_ID: The ID of the volume to restore to (must be at least as large as the original volume)3. Now, you need to attach the volume again to the VM as explained in `Configuring the extra volume in the instance`.
WIP
WIP