Making backups and snapshots of containers and machines in Proxmox VE

It is good to keep some snapshots and backups of your machine, especially when you plan to make risky changes that may break something in your hosted guest OS.

In Proxmox virtual environment you can create backups and snapshots for your virtual machines and containers. We will explain the main differences between a backup and a snapshot and show how to create them.

 

Snapshots

Snapshots are for making quick system states. They are used as a restore point before making risky changes that may break the OS, like updating, uninstalling, etc. The snapshots are made quickly without turning off or suspending the machine and store the machine’s configuration, its filesystem, and RAM contents.

 

Creating a snapshot

Go to the selected machine or container > Snapshots and click Take Snapshot. 
Snapshots for VM 100

Enter a name that can be only with alphanumeric characters and underscores, and tick the Include RAM option. When you need to roll back, the machine will be in the same state as when you take the snapshot.
Take Snapshot dialog in Proxmox

Depending on your server configuration and disks, it will take seconds to minutes. When TASK OK is shown, you can continue to work on your VM.
Snapshot task run

 

Rolling back to a snapshot

Let’s say that the machine fails to boot or you deleted important files.

You can use the snapshot you saved. You can select it from the list and click Rollback.
Snapshots for VM 100 with selected before_kern_update snapshot

Then confirm the Rollback by clicking Yes.
Rollback dialog

After that, it will restore the machine to the state before the snapshot. Reload the machine's console ff you are connected to it.

 

Backups

Backups are a little different than snapshots. While keeping the disk contents and machine configuration intact, they cannot keep the machine’s state and snapshots. When you make backups, it will take more time and will require some system downtime, depending on the chosen mode.

The advantage of backups is that they can be moved to other storage and servers. In case of a server failure or a data center disaster, you can use them to rebuild the whole virtual infrastructure.

 

Creating a backup 

Go to the machine or container > Backup and click Backup Now.
Backups for VM 100

You can back up the machine in 3 ways: 

Snapshot mode – The quickest mode with little to no downtime. The machine might not respond during the backup process. It has the least consistency of all modes.
Suspend mode –  The machine is suspended during the backup process. It does not provide any consistency improvements, so it will be better to use either Snapshot or Stop mode.
Stop mode – The most consistent mode with the most downtime. It turns off the machine during the backup process and starts again if the machine was running before.

Choose the mode that is best for you and the storage if you have more than one storage set in your server. After that click Backup.
Backup dialog

The backup is ready when it prints TASK OK.
Backup task run

Restoring machines from backups

Let’s say the server has failed. Thankfully, you made backups of your machines and can deploy them to another node.

Go to the local storage > Backup, choose the machines you wish to restore, and click Restore.
Backups stored in local storage

You can assign a new VM ID and machine specs or leave them to the default values and click Restore to start the process. If you wish to start the machine right after the restore, tick Start after restore.
Backup restore dialog

After it prints TASK OK, the machine is restored and ready to be used.
Backup restore task run

 

With backups, you can also overwrite any VM with a backup, created for it. However, that will delete its snapshots.
Backups for VM 100

You can now make backups to all machines and containers in Proxmox VE.

Get reliable website hosting services starting at only $3.12/mo

Get Started!
icon knowledge