Snapshots play a crucial role in data management and disaster recovery within our IaaS Cloud ecosystem. As a feature designed to capture the state of storage volumes at a specific point in time, snapshots offer users a reliable method for backing up and restoring data, as well as creating point-in-time copies for testing and development purposes. In this section, we'll delve into the concept of snapshots, their significance and best practices for leveraging them effectively within our IaaS platform.
In our IaaS Cloud, we distinguish between entire disk snapshots (Snapshot) and momentary instance snapshots (VM snapshot). Use disk snapshots when you need a complete backup of the disk, ensuring data integrity and consistency across all files and configurations, ideal for disaster recovery scenarios or preserving a specific system state. Opt for instance snapshots when you're making temporary changes or updates to the virtual machine, such as testing software updates or configurations. VM snapshots allow you to revert back to a specific point in time without affecting the entire disk, providing flexibility for experimentation or troubleshooting without permanent consequences.
Once you have created a volume and attached it to a running VM, you can take a disk snapshot. To do so, follow these steps:
1. Navigate to Storage → Volumes on the left navigation bar.
2. Select a volume from the list view.
3. Click on Take snapshot in the top right action block:
4. First, choose a Name for you snapshot.
5. Optionally, you can decide if the backup should be performed Async and give the snapshot Tags.
6. Finally, click on OK to save your settings and create a snapshot of your volume.
7. Navigate to Storage → Snapshots to see the created snapshot.
After you have created and started a instance, you can also take a VM snapshot. To do so, follow these steps:
1. Navigate to Compute → Instance on the left navigation bar.
2. Select a running instance from the list view.
3. Click on Take VM snapshot in the top right action block:
4. First, choose a Name and short Description for you snapshot.
5. Choose Snapshot memory if you want to include the Instance’s CPU and memory state into the snapshot.
Checking the Snapshot memory checkbox can significantly increase the VM snapshot creation process.
6. Select Quiesce VM if you want to quiesce the file system on the instance before taking the snapshot.
7. Finally, click on OK to save your settings and create a snapshot of your volume.
8. Navigate to Storage → VM snapshots to see the created VM snapshot.
It is possible to create templates from snapshots, which can then be used in the future instance creation process. Follow these steps to create a template from a disk snapshot:
1. Navigate to Storage → Snapshots on the left navigation bar.
2. Select a specific snapshot from the list view.
3. Click on Create template in the top right action block:
4. Specify the following parameters:
5. Click on OK to save your settings and create the template.
You can find your created template under Images → Templates and can now utilize it in the creation process of a new instance.
You can also create new volumes from a disk snapshot. To do so, follow these steps:
1. Navigate to Storage → Snapshots on the left navigation bar.
2. Select a specific snapshot from the list view.
3. Click on Create volume in the top right action block:
4. Specify the Name and Size of your disk.
5. Click on OK to save your settings and create the volume.
6. Navigate to Storage → Volumes to see the newly created volume.
Although it's not directly possible to create templates and volumes from VM snapshots, you can still achieve it by first creating a disk snapshot from a VM snapshot. Here's how you can create a snapshot from a VM snapshot:
1. Navigate to Storage → VM snapshots on the left navigation bar.
2. Select a specific VM snapshot from the list view.
3. Click on Create snapshot from VM snapshot in the top right action block:
4. Specify a Name for your snapshot.
5. Select a Volume from the list you want to use for your snapshot.
6. Click on OK to save your settings and create the snapshot.
7. Navigate to Storage → Snapshots to see the newly created snapshot.
Lastly, one of the primary purposes of using snapshots is for backup and restoration. Snapshots allow you to revert volumes back to a previous state using disk snapshots or revert entire instances using VM snapshots. This flexibility is invaluable for recovering from unintended changes or system failures. Here are the steps to perform either of these actions:
1. Navigate to Storage → Snapshots / VM snapshots on the left navigation bar.
2. Select a specific snapshot from the list view.
3. Click on Revert to (VM) snapshot in the top right action block:
4. Confirm your decision to revert the owning volume / VM to this snapshot by clicking OK.
To delete a (VM) snapshot, follow these steps:
1. Navigate to Storage → Snapshots / VM snapshots on the left navigation bar.
2. Select a specific snapshot from the list view.
3. Click on Delete (VM) snapshot in the top right action block:
4. Click on OK to confirm and delete the snapshot.