How to Backup Proxmox VM’s using Rclone

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 walks 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 and identify the location:

cd /var/lib/vz
ls
pwd
cd dump
pwd

Take note of the storage location for your VMs and containers, as you will need it for configuration later.

Step 2: Edit the Proxmox Configuration File

Edit the configuration file of the container you will use for backups:

nano /etc/pve/lxc/101.conf

Update 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: 1

Check if the mount point works:

cd /mnt/proxmox-backups/
ls

Step 3: Install Rclone

apt install rclone

Step 4: Set Up a Backblaze B2 Account

  • Create a free Backblaze B2 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

rclone config

Follow the prompts to set up Backblaze B2 as your remote:

  • Choose n for a new remote.
  • Enter a name (e.g., backblaze).
  • Select 5 for Backblaze B2.
  • Enter your account ID and application key.
  • Set hard_delete to false (or as you prefer).
  • Confirm the configuration.

Verify the setup:

rclone listremotes

Step 6: Sync Files with Rclone

Test syncing with a sample file:

echo "Subscribe to updates!" > subscribe.txt
rclone sync subscribe.txt backblaze:your-bucket-name/
rclone ls backblaze:your-bucket-name/

For full backups:

rclone sync /mnt/proxmox-backups/ backblaze:your-bucket-name/ -P

Step 7: Schedule Automated Backups in Proxmox

  • In the Proxmox UI, create a backup job to run nightly at midnight.
  • Set retention policies to keep a manageable number of backups (e.g., total storage capacity × 2).

Step 8: Add a Cron Job for Frequent Backups

Open the crontab editor:

crontab -e

Add the following line to run Rclone backups at 2:00 AM daily:

0 2 * * * rclone sync /mnt/proxmox-backups/ backblaze:your-bucket-name/ -P

This cron job will ensure your backups are synced nightly at 2:00 AM.

✅ You now have automated Proxmox backups synced to Backblaze B2 using Rclone for reliable offsite storage.


By