final feature image-backup vm on remote Proxmox Backup Server.png

How to Backup VMs To A Remote Proxmox Backup Server

If you are using Proxmox Virtual Environment Solution (PVE), then you may be taking VM backups to local storage, and you may also be using PVE Cluster for the High Availability of your critical VMs, all these services, provide redundancy, data retention, and data security but still, your data is always at risk of disasters such as fire, floods, storms, short-circuiting, storage failure, hardware theft, and hacking, etc, so to avoid such disasters, you may like to backup your critical VMs to a remote backup facility (Proxmox Backup Server PBS).

For an Off-site backup facility, you may choose a block in the next building or in another city but how about a cloud backup server?

In certain circumstances, backing up your critical VMs to the cloud rather than self-managed remote location is a reasonable approach as it is cost-effective and easy to manage, the only caveat with cloud backup is that you need a high internet bandwidth up/down, low latency from the cloud location, and also the VM size matters, the bigger the VM size the more bandwidth and time it takes for the first time upload to a cloud facility but afterward, just the dirty bits(snapshot) of the data are transferred, and the same factors also matter while restoring the VM backup.

So to start, just decide on a self-managed offsite location or a cloud location depending on your internet bandwidth and offsite infrastructure, and then install and configure proxmox backup server as mentioned in this guide: how-to-install-proxmox-offsite-backup-server-on-aws.

For this tutorial, I am following the above-mentioned guide for installing and configuring a Proxmox backup server on AWS EC2 Instance. If you are also choosing a cloud location then I will suggest choosing the nearest location, and specs as per the number of backup jobs, here is more information on specs.

Assuming that you are done with making an offsite backup server by following my recommended tutorial, let us now backup our local VMs to our remote backup server (PBS).

There are two methods to achieve this.

  1. Backup your local VMs directly on remote storage (Only for VMs which are in the Off State).
  2. Sync your local VM backups with remote proxmox backup server (Best For Live VM Backup to Remote Site).

Here is a link to Method 2;

Sync your local VM backups with a remote proxmox backup server

Method 1:

Backup your local VMs directly on remote storage

This is a fairly straightforward method, this method will add our remote proxmox backup server to our PVE server and then configure our PVE server for scheduled backups on the remote backup storage directly, so just follow these steps to complete the tutorial.

Add remote backup server storage to Proxmox VE

As mentioned in the Installation Tutorial, the Proxmox Backup Server uses Datastore to store VMs and Snapshots, so we can add this Datastore as storage in Proxmox VE.

This approach is fairly easy and simple but it has the following caveats.

  1. It is not recommened to backup your running VMs on the remote storage, as this will make them inaccessible during the time to first full VM backup and then on every incremental backup (snapshots) .
  2. This method should primarily be used for VMs that are in the stop or suspend state.
  3. This method can be used for running VMs only If the latency is about 5-25 ms from the remote location in combination with very high bandwidth.

So to start with method 1, log in to your Proxmox VE then select Server View –>Datacenter and then Select Storage–> Click Add–>and then Select Proxmox Backup Server as shown in the image.

adding proxmox offsite backup storage to local Proxmox ve server

Once you select Proxmox Backup Server then the following dialog box appears.

Add Proxmox Backup Server Dialog Box

Now fill the form with the following entries:

ID: Type any name, this will appear as the storage name in the PVE left pane.

Server: Type the IP Address of your remote Proxmox Backup Server.

Username: In most cases, it is [email protected], or if you have changed your PBS username to something else then type in that.

Password: The remote PBS password for the user.

Datastore: The name for the remote PBS Datastore that you learned to create in the guide.

Nodes: If you are using a cluster then choose the desired nodes else let it be at default.

Fingerprint: Log in to your remote PBS web Interface then –> Click Dashboard–> from the right pane click Show Fingerprint–> then copy the Fingerprint and paste it here in the Fingerprint section –> then click Add.

Once done, then the storage name mentioned in the ID text field will be added to PVE.

Here is an example screenshot for you, it can be seen that the storage ID is vmbkp and Type is Proxmox Backup Server and thus remote storage is added to PVE.

remote proxmox backup server added as a storage to proxmox virtual environment.

After adding the remote storage to pve, let us take a backup of a small VM (100) to test our configuration.

Things to Know Before Taking Backup

  • There are three modes of backup.
    • Snapshot
    • Suspend
    • Stop
  • There are two ways to take VM backup.
    • Manual one-time backup
    • The second is scheduled backup.

Here is a brief explanation for these modes: Snapshot offers backup while keeping the VM running, Suspend mode is also applicable on running VMs but it suspends or freezes the VM during the backup operation so that no data can be written to VM while the backup is in process. In the Stop mode, the VM is turned Off manually and then the backup process is started.

Manual Backups

For manual backups, Select VM –> Backup –> Backup now, as shown.

onetime backup on remote pbs storage in pve

So when you click the Backup now button then the following pop-up will be shown.

choosing cloud storage, remote backup server storage. for one time proxmox backup

So choose your Storage to be the remote offsite PBS storage (mine is vmbkp), for Mode choose Stop and then click the Backup button.

starting manual backup in the stop mode PBS

TIP:

Whenever you choose local storage for creating backups then PVE will always do Full Backup for the VM each time, but if you choose recently added remote storage for backups then the first backup will be a full VM backup and the next backups will be incremental which are also called snapshots and contain the dirty-bits or changed bits of data. It should also be noted that the snapshots or incremental backups shall only occur if the VM is in the running state.

This is also evident from the current backup screenshot, After the first full VM backup a second backup is taken while the VM is in an off state, It is also to be noted that the second backup is also a full backup, not an incremental backup and the reason is obvious, no data changes, hence nothing is written to remote storage (write 0 B/s).

manual proxmox backup on pbs stoarge in process.

when a backup is initiated for a VM in the running state, the first backup will be a full VM backup and the later backups are incremental backups. It is also to be noted that the first backup may take a long time depending on the remote latency, bandwidth, and VM size, the incremental backups will carry only the changed bits of data and will take less time to complete.

Scheduled Backups To Remote Proxmox Backup Server

The proxmox backup server also offers the functionality to schedule automatic periodic backups to the remote storage, the backup schedule can be broken up into daily, weekly, monthly, or even yearly. To create a schedule we need to create a backup job, select–> Server View –> then select Datacenter –> then select Backup–> then click Add from the right pane as shown in the screenshot.

add a backup job on proxmox pve

Once you click Add then the following pop-up will appear as in the screenshot.

creating a backup job proxmox ve.

Let’s say you would like to create a backup job that backs up VM 100 on daily basis and the backup job starts at 02:00 AM.

Here are the required settings for such a backup schedule as shown in the screenshot.

creating an example schedule for a backup job on proxmox ve

Here is a brief explanation of these settings.

Node: Select your local proxmox ve server from the drop-down list.

Storage: Do not select Local storage only select your Remote Proxmox Backup Storage.

Day of the Week: Select all days from the drop-down list.

StartTime: Choose your desired time such as 02:00 AM from the 24 hr format.

SelectionMode: leave at default & then select the desired VM from the list.

Send email to: Leave it blank for now, as you will need to configure SMTP, POP settings, which is not in the scope of the article.

Compression: It is greyed out and chooses by default ZSTD which is by far the best compression type.

Mode: You can choose the mode to be Stop or Suspend, that is up to you.

Enable: Make sure the Enable check box is selected, otherwise, the job schedule will not execute, on the other hand, you can always disable a backup job by unchecking the box.

After this click Create and your job will be created, furthermore you can start the job immediately by selecting the Run now button.

Full VM backup started on Proxmox VE and its transferred to  Remote Proxmox Backup Server.

As shown in the screenshot the VM job has started and it is being backed up on the remote storage. As the VM is in the off state so there will be no incremental backups as no data is being written to the VM, in such a case a single backup every year will suffice but you may like to choose a different schedule.

The incremental backups shall take place only if the VM is turned on. You may test how the VM performs? in the on state while being backed up for the first time (Full VM Backup) and then on an incremental basis(snapshots) and performance is acceptable then stick to Method#1 for VMs in the running state else Method#2 is recommended to backup VMs in the running state.

Here is a link to Method 2, If you are only interested in scheduled incremental remote backups for live/running VMs.

Related Proxmox Backup Mentenance Tasks

Once you start to back up your VMs to the remote Proxmox Backup Server, then its time for backup maintenance tasks:

  1. Snapshot Pruning
  2. Garbage Collection
  3. Remote
  4. Sync Jobs
  5. Restore VMs

One Reply to “How to Backup VMs To A Remote Proxmox Backup Server”

Leave a Reply

Your email address will not be published. Required fields are marked *