How to Setup Proxmox Backup and Restore Using ZFS

Welcome back to Part 06 of our comprehensive Proxmox Virtualization Masterclass. In previous modules, we discussed setting up VMs and LXC containers. Today, we are tackling the most critical aspect of server management: Data Protection.

Whether you are running an enterprise environment or a personal HomeLab, hardware failure or a bad software update can instantly wipe out hours of hard work. In this guide, we will explore the differences between Snapshots and Backups, and walk you through how to automate complete system restorations in Proxmox VE.


Understanding the Difference: Snapshot vs. Backup

While both Snapshots and Backups serve to protect your data, they function very differently beneath the surface:


Step 1: Preparing a ZFS Pool for Backups

By default, Proxmox does not automatically configure secondary ZFS pools to accept backup archives. We must mount a specific dataset to enable this capability.

Creating the Dataset via Shell:

  1. Log into your Proxmox web interface and select your primary Node.
  2. Open the Shell terminal.
  3. Run the following ZFS create command to generate a dedicated backup folder on your existing HDD pool (assuming your pool is named HDD_POOL):
    zfs create HDD_POOL/Backups

Mounting the Directory:

  1. Navigate to Datacenter > Storage.
  2. Click Add > Directory.
  3. Provide an ID name (e.g., HDD_Backup).
  4. Under the Directory path, type the exact location: /HDD_POOL/Backups.
  5. In the Content drop-down menu, ensure you solely select VZDump backup file to keep this directory strictly organized for backups. Click Add.

Step 2: Taking Manual Snapshots & Backups

Taking a Snapshot:

Taking a snapshot is ideal right before you run a risky software update inside your VM or LXC container.

  1. Select your running VM/LXC from the left inventory list.
  2. Navigate to the Snapshots tab.
  3. Click Take Snapshot. Give it a descriptive name like Before_Update and add a brief description. Click OK. It will complete in just a few seconds.
  4. If the update breaks your system, simply highlight the snapshot and click Rollback to instantly restore your previous state.

Taking a Manual Backup:

  1. Select your target VM/LXC container.
  2. Navigate to the Backup tab.
  3. Click Backup now.
  4. Select your newly mounted HDD_Backup drive as the storage destination.
  5. Set the Mode to Snapshot. This brilliant Proxmox feature allows the backup to run seamlessly in the background without needing to shut down your live services.

Step 3: Scheduling Automated Backups

Manual backups are great, but human error means we often forget to take them. Automating this process ensures your data is permanently protected.

  1. Go to the main Datacenter tab (at the very top of the left column) and select Backup.
  2. Click the Add button to create a new backup job.
  3. Node: Select your primary server node.
  4. Storage: Choose your dedicated HDD_Backup location.
  5. Schedule: Proxmox uses robust cron syntax. You can configure it to run every night. For example, setting it to 03:00 ensures backups happen at 3:00 AM when server traffic is minimal.
  6. Selection Mode: You can select “All” to backup your entire server, or cherry-pick specific critical VMs.
  7. Mode: Keep this set to Snapshot to avoid service downtime.
  8. Click Create. Your automated safety net is now fully operational!

Step 4: Restoring from a Backup

If disaster strikes, restoring your data is incredibly straightforward.

  1. Navigate to your HDD_Backup storage drive from the left menu and click the Backups tab.
  2. You will see a list of all your archived files. Select the archive you wish to restore.
  3. Click Restore.
  4. You can assign it a brand-new VM ID (e.g., 102) to spawn a completely fresh clone of the system, or overwrite an existing ID.
  5. Click the Restore button. Within minutes, your entire system will be cloned and ready to boot.

Conclusion

Implementing a solid backup and snapshot strategy guarantees that your Proxmox environment remains indestructible. In our next tutorial, we will tackle advanced hardware management by exploring USB and PCIe Device Pass-through directly into virtual machines.

To watch the full visual breakdown of setting up backup routines, check out the tutorial video below:

 

Exit mobile version