Proxmox Backup Server: first setup and first restore
Install Proxmox Backup Server, create a datastore and a backup user, connect it to Proxmox VE as storage, run the first VM backup, set prune and garbage collection, then restore a VM and a single file.
Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?
Proxmox Backup Server (PBS) stores VM and container backups as deduplicated, optionally encrypted chunks, so a nightly backup of a 100 GB VM that changed 2 GB costs about 2 GB. Proxmox VE talks to it natively: once added as storage, every vzdump job, prune rule and restore button just works. This guide takes a fresh PBS to its first verified restore.
Before you start
- A separate machine or VM for PBS with its own disk for the datastore. Backups on the same hardware as the hypervisor do not count as a backup.
- Network access from the Proxmox VE hosts to the PBS on TCP port 8007.
- Root access to both systems.
Step 1: install PBS
Boot the PBS ISO and follow the installer, or install it on an existing Debian system with the official repository:
Check before you run this
- Runs with administrator rights. Make sure you understand every line.
echo "deb http://download.proxmox.com/debian/pbs trixie pbs-no-subscription" | sudo tee /etc/apt/sources.list.d/pbs.list
sudo wget https://enterprise.proxmox.com/debian/proxmox-release-trixie.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg
sudo apt update
sudo apt install proxmox-backup-server
Replace trixie with your Debian codename (PBS 3 uses bookworm). The web interface is at https://pbs-host:8007; log in as root with realm Linux PAM.
Step 2: create a datastore
Format the backup disk, mount it, and create the datastore on it. In the GUI this is Datastore > Add Datastore; on the command line:
Check before you run this
- Runs with administrator rights. Make sure you understand every line.
sudo proxmox-backup-manager disk list
sudo proxmox-backup-manager disk fs create store1 --disk sdb --filesystem ext4 --add-datastore true
This formats /dev/sdb, mounts it under /mnt/datastore/store1 and registers a datastore named store1 in one step. Careful: it erases everything on that disk. If the disk is already mounted, use proxmox-backup-manager datastore create store1 /mnt/datastore/store1 instead.
Step 3: a user for the hypervisor
Do not connect Proxmox VE with the PBS root account. Create a user in the pbs realm and give it the DatastoreBackup role on the datastore. That role can create and read backups but cannot delete them, which limits what a compromised hypervisor can do to your backup history.
Check before you run this
- Runs with administrator rights. Make sure you understand every line.
sudo proxmox-backup-manager user create pve@pbs --password 'change-me'
sudo proxmox-backup-manager acl update /datastore/store1 DatastoreBackup --auth-id pve@pbs
sudo proxmox-backup-manager cert info | grep Fingerprint
Copy the fingerprint; Proxmox VE needs it to trust the self-signed certificate.
Step 4: add PBS as storage in Proxmox VE
On the PVE side, Datacenter > Storage > Add > Proxmox Backup Server: enter the PBS address, the datastore name, the user and password, and paste the fingerprint. The equivalent shell command:
pvesm add pbs pbs-store1 --server pbs.example.lan --datastore store1 --username pve@pbs --password 'change-me' --fingerprint 'AA:BB:CC:...'
pvesm status
If you tick Encryption on the storage, PVE generates a key and encrypts all backups client-side; the key is stored in /etc/pve/priv/storage/pbs-store1.enc. Download it and keep it somewhere safe: without that key the backups are unreadable, including by Proxmox staff.
Step 5: the first backup
vzdump 100 --storage pbs-store1 --mode snapshot --notes-template '{{guestname}}'
pvesm list pbs-store1
The second command lists the new backup as a volume such as pbs-store1:backup/vm/100/2026-10-14T02:30:00Z. In the PBS GUI the snapshot appears under Datastore > store1 > Content. Turn the one-off into a schedule in PVE under Datacenter > Backup > Add, and enable a Verify job on the PBS side so each snapshot is checked after it is written.
Step 6: prune and garbage collection
Pruning decides which snapshots to keep; garbage collection then frees the chunks no remaining snapshot references. Both are scheduled per datastore in the PBS GUI, or from the shell:
Check before you run this
- Runs with administrator rights. Make sure you understand every line.
sudo proxmox-backup-manager prune-job create nightly --store store1 --schedule daily --keep-daily 7 --keep-weekly 4 --keep-monthly 6
sudo proxmox-backup-manager datastore update store1 --gc-schedule daily
sudo proxmox-backup-manager garbage-collection start store1
Careful: prune permanently removes snapshots outside the keep rules, and garbage collection permanently deletes their data. Check the result of a prune with --dry-run first: proxmox-backup-client prune vm/100 --repository pve@[email protected]:store1 --keep-daily 7 --dry-run. Garbage collection only deletes chunks that have been unreferenced for at least 24 hours and 5 minutes, so a prune followed by an immediate GC does not free space yet; that is by design.
Step 7: the first restore
Restore to a new VMID so the original stays untouched. In the PVE GUI select the storage, open Backups, choose the snapshot and press Restore, enter an unused VMID and a target storage. From the shell:
qmrestore pbs-store1:backup/vm/100/2026-10-14T02:30:00Z 9100 --storage local-lvm
qm start 9100
Boot it, log in, confirm the data is there, then destroy the copy with qm stop 9100 && qm destroy 9100. For a single file, select the snapshot in PVE and press File Restore; PVE starts a small helper VM that mounts the backup read-only and lets you browse and download individual files. If a restore does not succeed on a quiet afternoon, it will not succeed during an outage, so treat this step as part of the setup, not as optional.
Official documentation
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0106 Back up and restore guests with vzdump, backup jobs and Proxmox Backup Server Back up Proxmox VE VMs and containers with vzdump, choose a backup mode, schedule backup jobs with retention, restore with qmrestore or… Intermediate · Step by step · Linux Article Backup & restore 15 Oct 2026
- 0109 A vzdump wrapper script with checks, retention and a log file A Bash wrapper around vzdump that checks the target storage first, backs up chosen guests or all guests with zstd and keep-last… Intermediate · Step by step · Linux Script Backup & restore · Shell scripting 15 Oct 2026
- 0110 Fix: TASK ERROR: VM is locked (backup) A VM or container still carries a backup lock, usually after a backup was interrupted. Check that no backup is running, then… Beginner · Fixes an error · Linux Article Backup & restore · VMs & containers 15 Oct 2026
- 0247 Build a Proxmox VE home lab: from bare metal to your first restored backup Install Proxmox VE on one spare machine, switch to the free update repository, create a VM and an LXC container, then schedule… Beginner · Guided project · Linux Article Backup & restore · Installation & first steps · VMs & containers 15 Oct 2026
- 0336 Back up and restore a Docker named volume to a tar archive A bash script that copies the contents of a named Docker volume into a .tar.gz on the host, and restores an archive… Intermediate · Step by step · Linux, macOS Script Backup tools · Docker basics 15 Oct 2026
- 0363 Restore drill: prove your backup works in 15 minutes A repeatable procedure to restore one file and one database from your newest backup into a scratch location, compare the result with… Intermediate · Step by step · Linux, macOS Article Backup tools · Strategy & restore drills 15 Oct 2026
Repos in the wild
- restic: fast, encrypted, deduplicated backups to local disk, SFTP or cloud storage restic/restic The restic repository: a single Go binary that backs up to local disks, SFTP, S3, Backblaze B2, Azure, Google Cloud and anything rclone can reach, with encryption and deduplication always on. GitHub
- BorgBackup: deduplicating archiver with compression and authenticated encryption borgbackup/borg The BorgBackup repository: a Python and C backup tool that stores deduplicated, compressed, encrypted archives on local disks or over SSH, with mountable archives and append-only repositories. GitHub
- rclone: rsync for cloud storage, with 70+ providers rclone/rclone The rclone repository: a Go command-line tool that copies, syncs, mounts and checks files across local disks and more than 70 cloud and object storage providers, with optional encryption. GitHub
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Dominik +5,492 chars