How to backup VM's in Proxmox
Setting Up Proxmox Backups with Rclone and Backblaze B2
Backing up your Proxmox VMs and containers is critical for maintaining a secure and reliable environment. This guide will walk you through setting up backups with Rclone and Backblaze B2 cloud storage.
Step 1: Locate Proxmox Storage
Navigate to the storage directory for your backups:
cd /var/lib/vz
ls
pwd
cd dump
pwdTake note of the storage location for your VMs and containers, as this will be required for configuration.
Step 2: Edit the Proxmox Configuration File
Edit the configuration file of the container you wish to use for backing up VM's:
nano /etc/pve/lxc/101.confUpdate the file with the mount point for your backup location:
arch: amd64
cores: 2
features: nesting=1
hostname: rclone-ubuntu
memory: 512
mp0: /var/lib/vz/dump,mp=/mnt/proxmox-backups
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:70:7D:EE,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-101-disk-0,size=8G
swap: 256
unprivileged: 1Check if the mount point works:
Step 3: Install Rclone
Install Rclone to sync backups to a remote server:
Step 4: Set Up a Backblaze B2 Account
Navigate to Backblaze B2 and create a free account.
Create a bucket with a unique name and leave the default settings.
Go to "Application Keys," generate a new application key, and note down the key and account ID.
Step 5: Configure Rclone
Run the Rclone configuration tool:
Follow the prompts to set up Backblaze B2 as your remote storage:
Choose
nfor a new remote.Enter a name for your remote (e.g.,
backblaze).Select
5for Backblaze B2.Enter your account ID and application key.
Set
hard_deletetofalse(or as per your preference).Confirm the configuration.
Verify the setup:
Step 6: Sync Files with Rclone
To test syncing, upload a test file to your Backblaze bucket:
For full backups, sync your Proxmox storage directory:
Step 7: Schedule Automated Backups
In the Proxmox UI, create a backup job to run nightly at midnight.
Set retention policies under "Retention" to keep a manageable number of daily backups (e.g., total storage capacity × 2).
Step 8: Add a Cron Job for Frequent Backups
For additional redundancy, you can schedule a cron job to run Rclone backups at 2:00 AM. Open the crontab editor:
Add the following line to schedule the job:
This cron job will run at 2:00 AM.
Last updated