How to perform agentless backups & restores of Proxmox VMs using the program output protected item (no add-on license required)
Introduction
Proxmox provides the vzdump
command which can be used with the program output protected item to perform agentless backups and restores of Proxmox VMs. This method involves installing a single Zmanda Pro agent on the Proxmox host (a Debian-based system if you used Proxmox's .iso image for installation). A similar approach may be used for KVM or XenServer hypervisors.
This approach requires the Proxmox host to run backup jobs and process data, which could result in performance impacts on the VMs themselves. Take this into consideration when deciding backup schedules.
Backup Steps
- Create a backup user for the Proxmox host
- Install an agent on the host using the .deb Linux package, logging in with the user credentials created in Step 1
- Configure storage as desired
Quick Tip: We recommend creating a unique storage vault for each VM you back up. This will ensure maximum backup performance regarding RAM usage, and minimize performance impacts on VMs. Backing up all VMs to the same storage vault will maximize deduplication across VMs at the expense of higher RAM usage for each backup job. - For each Proxmox VM that you want to backup:
- Create a Program Output protected item. We recommend naming the item with the same name as the VM.
- In the Items tab, add the command
vzdump <vm name> --stdout
- Configure scheduling and retention as desired, and Save
- The backups will begin to run on the configured schedule. The job logs will appear as follows. Informational messages from the
vzdump
command will show as warnings.
Restore Steps
- Go to the Devices tab of the backup user
- Click Actions > Restore > Choose the storage vault where the backups are stored > Select the VM that you want to restore
- Select the point in time you want to restore from (to see all available snapshots, select the Show All button in the top right). Click Next.
- Click Select Items, and select the file (there should only be one file). Click Next. You can also select All Items and click Next.
- Restore as Program Input, and enter the following command:
cat | tee /tmp/<vmname>.tar && qmrestore /tmp/<vmname>.tar <new-vm-name> && rm -f /tmp/<vmname>.tar
- Click Restore. The VM will be restored directly to the Proxmox hypervisor. You may have to make some minor configuration changes to the VM before it will start.
Optionally, you can include additional chained commands in Step 5 to automatically configure and start the VM.
Notes
- If you wish to automate this process, you can do so using Zmanda Pro's APIs.
- We plan to build a dedicated Proxmox protected item that will carry additional licensing costs. The method described in this article requires no additional licenses.
For more information about either of these points, contact sales@zmanda.com