Learn about the usage of snapshots for your OVHcloud VPS.
Creating a snapshot is a fast and simple way to secure a functioning system before making changes that might have undesired or unforeseen consequences, for example testing a new configuration or software. It does not, however, constitute a complete system backup strategy.
Topics
- Enabling the Snapshot Option
- Taking a Snapshot
- Deleting/Restoring a Snapshot
- Downloading a Snapshot
- Best Practices for Using Snapshots
Enabling the Snapshot Option
To begin, log in to the OVHcloud Control Panel.
- Click
Bare Metal Cloud
at the top of the page. - Click
Virtual private servers
. - Select your VPS from the drop-down menu.
From the Home tab, scroll down to the box called Summary of options.
- Click
...
next to the Snapshot option. - Select
Order
from the drop-down menu.
In the new screen, please take note of the pricing information and then click Order
. You will be guided through the order process and receive a confirmation email when you are finished.
Taking a Snapshot
Once the option is enabled, click the ...
next to the Snapshot option and select Take a snapshot
from the drop-down menu.
Proceed through the pop-up menu. Creating the snapshot may take a few minutes. Afterward, the timestamp for creation will appear in the "Summary of options" menu.
Deleting/Restoring a Snapshot
Since you can only have one snapshot activated at a time, the existing snapshot has to be deleted before creating a new one. To do so, click the ...
, then choose Delete the snapshot
from the drop-down menu.
If you are sure that you want to reset your VPS to the status of the snapshot creation, click Restore the snapshot
and confirm the execution in the pop-up window.
Downloading a Snapshot
The current snapshot can be retrieved via a download link. Click on ...
next to the option "Snapshot" and choose Download the snapshot
from the context menu.
Home
tab in your OVHcloud Control Panel.In the popup window, click on Generate download link
.
After a few seconds, a success message appears. Below it, you can copy the complete download command with one click.
The size of the snapshot and the expiration date of the link will also be displayed.
Note that the download link will expire after 24 hours.
The download command uses curl
, in the following format:
curl "https://storage.us-east-va.cloud.ovh.us/v1/AUTH_0f78245cfae8484f871799c4c2de7ef7/glance/3485aa95-3ad7-421a-b353-4486fa48cb31?temp_url_sig=3b42e2982c9bf86cf9dfaf1957299e6ea194389a&temp_url_expires=1684346546" --output vps-84b14181.vps.ovh.us-snapshot --fail
It should work from any command line terminal.
When using Windows PowerShell however, you will need to adjust the command as follows:
curl "https://storage.us-east-va.cloud.ovh.us/v1/AUTH_0f78245cfae8484f871799c4c2de7ef7/glance/3485aa95-3ad7-421a-b353-4486fa48cb31?temp_url_sig=3b42e2982c9bf86cf9dfaf1957299e6ea194389a&temp_url_expires=1684346546" -OutFile vps-84b14181.vps.ovh.us
Best Practices for Using Snapshots
Configuring the QEMU agent on a VPS
Snapshots are instantaneous images of your running system ("live snapshot"). To ensure the availability of your system when the snapshot is created, the QEMU agent is used to prepare the filesystem for the process.
The required qemu-guest-agent is not installed by default on most distributions. Moreover, licensing restrictions may prevent OVHcloud from including it in the available OS images. Therefore, it is best practice to verify and install the agent in case it is not activated on your VPS. Connect to your VPS via SSH and follow the instructions below, according to your operating system.
Debian-based distributions (Debian, Ubuntu)
Use the following command to check whether the system is properly set up for snapshots:
$ file /dev/virtio-ports/org.qemu.guest_agent.0
/dev/virtio-ports/org.qemu.guest_agent.0: symbolic link to ../vport2p1
If the output is different ("No such file or directory"), install the latest package:
$ sudo apt-get update $ sudo apt-get install qemu-guest-agent
Reboot the VPS:
$ sudo reboot
Check the service to ensure it is running:
$ sudo service qemu-guest-agent status
Redhat-based distributions (Centos, Fedora)
Use the following command to check whether the system is properly set up for snapshots:
$ file /dev/virtio-ports/org.qemu.guest_agent.0
/dev/virtio-ports/org.qemu.guest_agent.0: symbolic link to ../vport2p1D
If the output is different ("No such file or directory"), install and enable the agent:
$ sudo yum install qemu-guest-agent $ sudo chkconfig qemu-guest-agent on
Reboot the VPS:
$ sudo reboot
Check the agent and verify that it is running:
$ sudo service qemu-guest-agent status
Kernel issues on Cpanel
Consult our cPanel auto backup guide to find out how to fix issues with cPanel servers getting stuck during an OVHcloud automated backup.
Windows
You can install the agent via MSI file, available from the Fedora project website: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-qemu-ga/.
Verify that the service is running by using this PowerShell command:
PS C:\Users\Administrator> Get-Service QEMU-GA Status Name DisplayName ------ ---- ----------- Running QEMU-GA QEMU Guest Agent
Go further
For more information and tutorials, please see our other Virtual Private Servers support guides or explore the guides for other OVHcloud products and services.