3 min read

Proxmox VM/LXC Backups to NFS Share

Proxmox VM/LXC Backups to NFS Share
Photo by Joshua Sortino / Unsplash

Backing up VMs (Virtual Machines) and LXCs (Linux Containers) is very straightforward using inbuilt features in Proxmox. For this article I'm using Proxmox versions 8.0.4 and as a destination I'm using NFSv4 share on Synology NAS. Of course any NFS destination, when configured properly, will work with Proxmox. Also Proxmox 7.1-10 was tested and works the same way as the newer versions.

Synology NAS NFS Share configuration

First we have to enable NFS-protocol on Synology. This can be configured under Control Panel -> File Services -> NFS. We can just enable NFSv4 and use the basic settings.

NFSv4 service configuration on Synology NAS

After enabling the NFSv4 service, we have to create a new directory and enable NFS access with the required permissions. This can be configured under Control Panel -> Shared Folder. Create new shared folder. You want to enter name for the share, location and then select "Hide this shared folder in 'My Network Places'" and disable "Recycle Bin".

Under NFS Permissions you must specify where the NFS rule is accessed from, e.g. the Proxmox host, this can be a IP-address, network or something with wildcard filtering. Privilege must be Read/Write and Squash should be set as "Map all users to admin". These permissions and privileges for demo purposes and easiest to set up, in you own environment please set them up in the most secure way following documentation.

Also "Enable asynchronous" and "Allow users to access mounted subfolders" are enabled.

Also take note of the NFS mount path displayed in the bottom. In my case it's /volume1/proxmox_backup

Proxmox Configuration

NFS Configuration

Under Proxmox management, browse to Datacenter -> Storage. Here you will add the NFS share to be used with Proxmox. Fill out ID (which is the display name of the NFS mount in Proxmox), NFS Server IP/FQDN, Export (which is the NFS volume path. I've added directory (pve1) after the /volume1/proxmox_backup just to separate different individual Proxmox node backup files to separate directories. Last you can select content that the NFS-share will contain. As we are only doing backups, we will only select the "VZDump backup file".

Backup retention times can be configured here as well, however I'm configuring them under backup jobs which is shown later in this article.

NFS share in Proxmox

Backup configuration

Backups are configured under Datacenter -> Backup. Here you can create backup jobs, time them and also adjust the backup retention times. Below is a example on how to configure a timed backup. Be sure to select "Storage" as the configured NFS mount above, otherwise the backups would be taken locally to the Proxmox node.

Backup configuration

For this backup job I have selected to keep last 3 backups. You can configure this as detailed as you want to.

Backup retention time configuration

By selecting the job and clicking "Run now", you can start the job immediately and see that everything is working as it should.

Backup logs

When the job has run, you can see the outcome in the Tasks panel. By double clicking the task, Proxmox will open a detailed task view. From this you can see specifics on what has been backed up and possible reasons for failure. Other way to view the logs is by browsing the NFS mount. It will contain log files for all the backup tasks.

Restore a backup

If you want to restore a specific backup, browse to Datacenter -> expand Proxmox node or cluster -> Select the share containing the backups. When the correct share is selected, choose Backups in the main window. Here you will see all the backups created. Select one of the backups and click restore. In the next window you can specify and change specifications as need be.

Restore VM Backup