Snapshot target volumes can be mapped to any SDC just like regular volumes. This allows a developer or tester to take a snapshot of production volumes and use it without disrupting the production environment.
- Log in to the MariaDB Server and run the following commands to stage the database for backup.
BACKUP STAGE START;
BACKUP STAGE BLOCK_COMMIT;
- To take a snapshot, select the wanted volumes and click more. Choose to create a snapshot from the drop-down list. The resulting pop-up is shown in the following figure. Name the snapshot and clear the Read Only option. We need to be able to read and write into the snapshot. To finish, click CREATE SNAPSHOT to finish the operation.
Figure 8. Take a snapshot of wanted production volumes
- After taking the snapshot, log in back to the MariaDB Server and run the following command to take the server out of backup staging.
BACKUP STAGE END;
- Mapping a snapshot can be done in the same way a volume is mapped to an SDC. Select the snapshot and click on the mapping. Choose the map option from the drop-down list. Choose the wanted SDC component to which the snapshot should be mapped as shown in the following figure. Click APPLY to finish the process.
Figure 9. Map snapshot to wanted SDC component
- Log in to the vcenter and rescan storage for the snapshot volume to be detected by ESXi. Once the rescan is complete, start the new datastore creation wizard. Select the wanted datastore type as shown in the following figure.
Figure 10. Choose wanted datastore type
- Select the newly attached LUN from the list as shown in the following figure.
Figure 11. Choose snapshot LUN from the list
- Select the Assign a new signature option if the snapshot is mounted on the same ESXi cluster as the original volume as shown in the following figure.
Figure 12. Assign new signature to snapshot datastore
- Once a datastore is created, attach the VMDK to test the VM. Edit the VM settings and mount the snapshot VMDK by choosing the Add existing hard disk option. Snapshot VMDK can then be chosen from the list as shown in the following figure.
Figure 13. Assign snapshot VMDK to test VM.
While using the dedicated data, log, and tmp volumes for MariaDB, follow steps 1 to 8 again to mount all the volumes to test the VM.