How to Back up a VM/Container in Proxmox

  • Post author:WunderTech
  • Post last modified:May 10, 2024
  • Post category:Proxmox
  • Reading time:10 mins read

Share what you're reading!

In this tutorial, we’ll look at how to back up a VM/container in Proxmox. While you can back up a virtual machine (VM) or Container inside of the guest operating system itself, it’s significantly easier to manage the backup process in Proxmox itself.

Proxmox allows you to back up and restore VMs and Containers by setting up external storage and configuring backup tasks. You can then back up and restore individual guests directly from the GUI.

How to Back up a VM/Container in Proxmox

Before you can back up VMs or containers in Proxmox, you must configure external storage so that there is a location to actually back the data up to.

Step 1: Configuring External Storage for Backups

From a functionality perspective, you’ll configure external storage in the Proxmox Datacenter, and then configure backup schedules. There isn’t necessarily a correct or incorrect way of doing this, but one of my favorite options (from a file server perspective) is NFS.

With that said, if you have a device capable of running Proxmox Backup Server, you should strongly consider it as Proxmox Backup Server will back up VMs and containers incrementally. This will allow for (potentially) smaller transfer sizes and quicker backups.

1. To configure external storage, select Datacenter, then Storage, then Add, and the type of storage you’d like to add. As mentioned above, NFS is a great option (this is an example using a Synology NAS) if you’re connecting to a file server, with Proxmox Backup Server being the preferred option if you have a device capable of running it.

1. Select Datacenter then Storage.

how to backup proxmox to a synology nas - adding storage in proxmox

2. Select Add then add the type of storage that you’d like to use. In this example, I’ll be using NFS, but you can use anything you’d like.

adding nfs storage in proxmox

3. At the NFS screen, create an ID, then enter the IP Address of your NFS server. In the Export drop-down menu, the location of your Proxmox folder should automatically appear (assuming it was set up with the proper NFS permissions – use this Synology tutorial if you’re interested in seeing the NFS permission section).

In the Content drop-down, select ALL entries. You can then select Add.

specifying an id, server IP address, then selecting an nfs share in proxmox

4. Proxmox should now show the storage that we created above. At this point, you can move on to the backup portion.

confirming the storage is now in proxmox

Step 2: Backing up a VM/Container

Now that we configured Proxmox and our NFS share, we can back up a virtual machine or container by following the steps below.

1. Select the virtual machine you’d like to back up, then select Backup.

backing up a vm to a synology nas

2. In the backup tab, select the NFS storage location in the top right. This will ensure that we back up to the correct location (in my example, synology-nas-storage).

selecting the synology storage in proxmox

3. Select Backup now in the top left corner.

how to back up a vm/container in proxmox

4. Select your Storage, Mode, and Compression, then select Backup and the backup will start!

setting the backup settings in proxmox

Step 3: Configuring Automatic Backups

You can easily configure Automatic backups in Proxmox for all of your virtual machines if you’d like. This will automatically back up every virtual machine on a specific schedule.

1. Select Datacenter then Backup, then select Add.

automatically backing up VMs to a synology nas

2. Select the Storage for your share (NFS/Proxmox Backup Server, etc), then specify the Schedule, Selection mode, Compression, and Mode.

selecting the storage and when backups should occur in proxmox

3. You can also change the retention policy to only keep a certain number of versions by selecting the Retention tab.

Without specifying a retention policy, all backups will be stored which will drastically reduce storage space on your external server over time.

modifying the retention in proxmox

4. Your virtual machines will now back up to your external server automatically after you select Create!

Step 4: Restoring a Virtual Machine from a Backup

After the backups have been created, you can easily restore your virtual machine or container if you ever need to.

1. Select the virtual machine, then Backup.

restoring a vm in proxmox by accessing the backup tab

2. Select the storage location in the top right under Storage where the backup exists.

viewing the synology storage for backups

3. Select the snapshot you’d like to restore to, then select Restore.

selecting a backup and restoring it

4. All information can stay as default (unless you want to automatically start it after restoration), then select Restore.

restoring a vm in proxmox

5. You will receive a message that this will permanently erase the existing virtual machine. If you agree, select Yes. Your virtual machine will now be restored from the backup you selected!

agreeing to restore a vm in proxmox

Conclusion & Final Thoughts

This tutorial looked at how to back up a VM/Container in Proxmox. The most important section in this tutorial is ensuring that the backup destination’s storage is on an external server. As mentioned above, if you can use Proxmox Backup Server, that’s probably your best bet, but an NFS share is a great option as well. The key is that Proxmox backups are extremely easy to manage and use, and are an easy thing to implement.

Thanks for checking out the tutorial on how to back up a VM/Container in Proxmox. If you have any questions, please leave them in the comments!

WunderTech

Frank is an IT professional with 14+ years experience and the creator of WunderTech. He focuses on sharing his experience with others on computer hardware, servers, software, networking, and self-hosted apps. He has a BS in Computer Information Systems and an MBA. Learn more about Frank in his bio.