Before we backup voluem, today we will discuss how to restore volume.
The restore process is really simple, two steps away:
Create a blank volume on the storage node.
Copy the backup data to a blank voluem.
Let's look at the detailed process of the restore operation:
-
send backup request to Cinder-api
li>
CINDER-API send message
-
Span style= "font-family: ' Microsoft Yahei '; font-size:16px; " > Cinder-scheduler Select the most appropriate cinder-volume
-
Cinder-volume Create a blank volume
-
Cinder-backup Copy the backup data to a blank volume
Let's look at the 1th step first.
send a restore request to Cinder-api
The customer (which can be an OpenStack end user, or another program) sends a request to CINDER-API: "Restore the specified backup." Here we will restore the previously created backup.
Currently, restore can only be performed in the CLI.
Cinder-api received a restore request. The log file is in/opt/stack/logs/c-api.log.
Here you see CINDER-API forwarding request, creating volume for restore. Cinder-scheduler and Cinder-volume will then create a blank volume, which, like the create volume, does not repeat.
Next, analyze the process of data recovery. First, you can see the relevant information in the CINDER-API log.
Note here that the volume_id and backup_id in the log are consistent with the output from the previous Backup-restore command.
Let's look at how Cinder-backup recovers data.
Cinder-backup performing a restore operation
The log is/opt/stack/logs/c-vol.log.
Start the restore operation, Mount NFS.
Read the metadata in the container directory.
Unzip the data and write it into the volume.
Restore the volume metadata and complete the restore operation.
At this point, you can already see the volume created by restore in the GUI.
This is the volume restore analysis, the next section we discuss how to use volume as the instance Startup disk.
Restore Volume Operations-5 minutes a day to play with OpenStack (60)