Guest Post: How to Back Up Proxmox Virtual Machines – A Complete Data Protection Guide

Proxmox VE is an open-source virtualization solution that combines two technologies: KVM and LXC. This provides virtualization and containerization capabilities for Windows and Linux-based servers. 

Proxmox is a highly customizable open-source solution that can be adjusted to the specific needs of organizations and infrastructures. Such environments and the data circulating within them are critical for production and service availability. In this post, we explain how to back up Proxmox to ensure the recovery of data and workloads in any situation.

Understanding Proxmox Backup Options

You can perform Proxmox VM and data backups using different methods. Proxmox Backup Server is one of the most advanced and feature-rich native solutions. On the other hand, Proxmox VE offers a lighter and simpler backup functionality.

Proxmox Backup Server

Proxmox Backup Server (PBS) is the native functionality to back up virtual machines and data in Proxmox environments. The solution provides an enterprise-class set of backup and recovery features for VMs, containers and physical servers. You can use PBS to:

  • Run incremental backups. 
    • Deduplicate and compress backup data.
    • Synchronize data in remote storage locations to ensure redundancy.
    • Encrypt backups and use RBAC to restrict access to data.
    • Enable ransomware protection and efficiently respond to attacks.
    • Perform full or granular recovery.

Proxmox Backup Server setup

Before proceeding with the guide to set up the Proxmox Backup Server, you need to download the official ISO and create a bootable USB drive. To correctly extract the ISO file to a USB drive, consider using apps like PowerISO or Rufus.  

When the bootable USB drive is ready, insert it into the device’s USB port and boot the server from that drive. Then follow the steps below: 

  1. On the welcome screen, choose Install Proxmox Backup Server.
  2. Check the EULA and click I agree to proceed.
  3. Choose the destination for the PBS installation. Click Next once you’ve specified the path. 
  4. Set your country, timezone and keyboard layout. Then click Next.
  5. Create a root account password and provide your email address. Make sure your password is strong by including at least 8 characters (uppercase and lowercase letters, numbers and special symbols). When the email and password are confirmed, click Next to proceed. 
  6. Choose a management network interface and set a hostname, IP address, gateway and DNS for Proxmox Backup Server.
  7. Complete the final check and launch the installation by clicking Install. When the process is complete, the server automatically restarts. 
  8. You can now see the management URL for your PBS. Open that URL to start managing your Proxmox Backup Server.

Proxmox snapshot vs backup

Users tend to perceive snapshots as backups, though this is not correct. The difference between a Proxmox backup and a snapshot is fundamental, and ignoring it can lead to data loss. 

A snapshot is a point-in-time copy of a virtual machine disk. You can think of snapshots as internal recovery points that can help you roll back the VM to a known state whenever necessary. This is mainly suitable for development and testing purposes. However, if an IT incident disrupts the VM, you can’t use snapshots to recover data and restore production.

A backup is an independent copy of VMs or production infrastructure, not relying on original data. A backup data copy must be stored in separate storage to remain available independently from the main environment. When you back up a Proxmox host along with other data, you can use backups to swiftly recover production machines.

How to Back Up Proxmox

Below you can check the instructions for backing up your Proxmox VMs via Proxmox VE in different ways: on demand and by schedule.

Setting up backups in Proxmox VE

For starters, you need to power off the Proxmox VM that you need to back up, then proceed as follows:

  1. On the Proxmox dashboard, right-click the required VM. In the context menu that opens, choose Shutdown.
  2. After the confirmation window pops up, confirm VM shutdown by clicking Yes.

Your Proxmox VM is now powered off.

After that, your virtual machine is ready for backup. Follow the steps below to create a Proxmox VM backup:

  1. Select the powered-off VM from the list, find the Backup tab and click the Backup now button.
  2. Choose the Proxmox backup location from the pop-up window that appears. This is the repository where VM backups are stored. You can keep backups on the server, but this is not recommended. Sending backups to a different location can help you maintain data availability and ensure recoverability if disruption affects the main server. 
  3. You might want to configure data compression for backups to optimize storage utilization. The default option is ZSTD compression, and it works well without significantly increasing backup windows. 
  4. After the configuration is complete, click Backup. The backup process starts and you can track the progress in the task viewer pop-up window. When you see the TASK OK line, the backup is complete.
  5. You can now find the compressed backup file in the Proxmox backup location you specified. 

Proxmox: schedule backups

On-demand backups work well when you need to back up a particular VM or when you don’t have a large number of workloads to protect. However, with multiple hosts running dozens or even hundreds of VMs, backup scheduling is necessary. This allows you to automate data protection workflows when backing up all or specific VMs.

You can schedule backups in Proxmox by following the steps below:

  1. Go to the Datacenter tab, click Backup in the vertical menu and click Add. This message can appear: Some guests are not covered by any backup job. This means that particular VMs or containers are not included in at least one backup schedule. Clicking the Show button displays these workloads.
  2. Configure the backup job settings: 
    1. Node – choose one or all of them in a cluster.
    1. Storage – set the Proxmox backup location.
    1. Schedule – configure the preferred schedule to run backups.
    1. Selection mode – choose All to back up every VM in a cluster, or you can add or remove workloads from the list.
    1. Compression – set the default mode (ZSTD) since it performs well in most cases but you can choose another compression level.
    1. Backup mode – selecting Snapshot provides the shortest VM downtime. The stop and suspend modes require prolonged VM downtime to execute the workflow.
    1. Retention – set retention policies. You can perform backups within specific periods, according to your organization’s requirements.  

Alternative Ways to Back Up Proxmox

In case your organization requires a higher level of backup automation than the one offered by Proxmox VE and Proxmox Backup Server, you can consider alternative ways to perform Proxmox backup. The two main options here are custom scripts and third-party solutions. Let’s review both in more detail.

Custom scripts for backups

You can use scripts to create custom backup solutions and workflows for Proxmox workloads. Proxmox is an open-source platform supported by an extensive knowledge base and a wide range of scripts is available online. You can find advanced Proxmox backup scripting tips (both for pre- and post-backup scripts) on the official forum, on Github or even on Reddit.

The downside of this option is that you need to have above-average technical expertise to understand and implement the available recommendations. 

Third-party data protection tools designed for Proxmox, such as the NAKIVO backup solution, can be a more suitable choice, with a free version available until the end of 2024, allowing users to explore its full capabilities without financial commitment.

Third-party backup tools

Specifically designed to back up Proxmox environments, these all-in-one solutions provide the desired efficiency and user-friendliness at an affordable cost. With such solutions, you get: 

  • Incremental backups;
  • Full recovery and instant object recovery;
  • Immutable storage and advanced security options for ransomware resilience;
  • Multiple backup destinations. 

How to Restore Virtual Machines in Proxmox

You can recover data from Proxmox backups by following the steps below:

  1. Choose the VM from the list, then click on the Backup tab.
  2. Choose the backup file and click the Restore button in the toolbar. 
  3. In the pop-up that appears, set the recovery parameters:
    1. Storage: Choose the new storage for the VM.

NOTE: In case you use encryption to secure backup data, you also need to provide the relevant decryption key at this point. Otherwise, backups won’t be decrypted.

  • Bandwidth Limit:  Specify the network bandwidth for the recovery process. Setting this parameter to “0” (zero) means no limit.
    • Unique: Set new unique parameters such as regenerated MAC addresses after recovery. 
    • Start after restore: Tick the checkbox to automatically start the machine upon restoration.
    • Override Settings: Customize VM settings such as CPU, memory and name, among others.
  1. Click Restore to start the recovery process. The system then asks you for additional confirmation since the recovery can delete the current VM data. Click Yes to start. You can track the progress in the Task Viewer pop-up. Once you see TASK OK in the logs, VM recovery is complete.
  2. Check the VM: You can find the machine in the list and click on it to check the configuration. You can start the VM from here if necessary. 

Conclusion

You can back up Proxmox data and workloads using the native toolset. You can also recover your VMs from Proxmox backups using the GUI. The native functionality can cover your data protection needs to a certain extent, but organizations with complex environments may require additional features, security and automation. To enhance backup and recovery workflows, you can choose custom Proxmox scripting or implement a third-party backup solution that can cover all your data protection requirements. 

Leave a Reply

Discover more from The IT Nerd

Subscribe now to keep reading and get access to the full archive.

Continue reading