pve host backup

nicolas studiokgb

Active Member
Mar 16, 2019
8
3
43
48
Hello all
I was wondering where were we about the integration of pve host backup directly in pbs ?
I understand lxc and vm backup is fine but is it finally planned (as announced) to be able to easily backup the host itself ? (when I say easily, I mean without command line complicated workarounds)
Thanks
 
Use the proxmox-backup-client to backup the host configuration if you want to backup to the ProxmoxBackupServer:
https://pbs.proxmox.com/docs/backup-client.html

If you search the forum you will find a lot of earlier threads where people posted their scripts or approaches for host-backup.

If you (like me) want to be able to restore the host configuration without a running PBS you can also use some other backup tool of your choice. I use restic, but any backup tool for Linux will do (tar, rsync, rsnapshot, borgbackup... ). In generall I tend to use PBS only for VMs and LXCs system and application data , for actual bulk data (like the stuff on my notebook or my NAS) I prefer restic (replace it with any backup tool of your choice) so I can still restore even if the PBS gets broken.
This also allows me to use cheap cloud storage like Hetzners storagebox as offsite backup target for the bulk data (the storagebox is not suitable as storage for PBS, I have a cheap vserver as offsite PBS).

Most important is to save the /etc/ and /var/lib/pve-cluster directories. Personally I also backup anything else of the host, but one might argue that this is a little bit exessive. On the other hand restic deduplicates (like PVE) so it's not like I waste much space with it.
 
Thanks for your first replies

yes as I understand the cli backup-client way is the only 'official" way for now.
regarding proxmox-srvbackup, zfs seems mandatory (zfs is great but on some older machine won't do the job)

As I see there is no integrated solution for now. I mean something really integrated in pbs and pve where backup and restore of the host would be as simple as vm or lxc backup.
Also a way to pull a backup from pbs when reinstalling a pve server with proxmox installer usb stick would be such a great thing.

Let's see if dev team sort out something in the coming times

thanks
 
Unfortunely it's not that easy to implement a "one fit's it all"-solution. One big advantage of ProxmoxVE is it's open nature. Although normally you wouldn't install anything else on the host you are free to do so (it's a Debian after all). This is different than for example TrueNAS or IncusOS where (although they are also Linux systems) technical measures ensure that you can't alter the system by default.
The open nature of ProxmoxVE has the benefit that you can also install other stuff (e.G. agent of your favourite monitoring software, additional kernel modules needed for your hardware, using filesystems not supported by the Proxmox Developers like GlusterFS or ocfs etc) if you can tolerate that Proxmox support won't help you if you run into problems. But it also means that a real host backup can't just backup the configuration and call it a day, because it might miss some customization you did for your environment.

Another thing to consider is that if you have a cluster (which is typical for setups in a corporate environment) you usually would treat the nodes as cattle not pets. This means that if the content of /etc/pve is replicated to each node and normally if one node gets broken you would just wipe it, reinstall PVE and readd it to the cluster. In that case you don't need the backup at all if you didn't do any customization on the host outside of ProxmoxVE.
 
Last edited:
  • Like
Reactions: stamox and bitranox
But it also means that a real host backup can't just backup the configuration and call it a day, because it might miss some customization you did for your environment.
Absolutely. Therefore You can configure in my script what You want to backup in addition to the usual config files. And the snapshot (did I mention that ZFS is just great ? ) catches it all.
 
Last edited:
  • Like
Reactions: Johannes S
Absolutely. Therefore You can configure in my script what You want to backup in addition to the usual config files. And the snapshot (did I mention that ZFS is just great ? ) catches it all.

My answer was directed to this:

As I see there is no integrated solution for now. I mean something really integrated in pbs and pve where backup and restore of the host would be as simple as vm or lxc backup.
Also a way to pull a backup from pbs when reinstalling a pve server with proxmox installer usb stick would be such a great thing.

Let's see if dev team sort out something in the coming times

I like the way you did you script (ZFS snapshots? Call me in ;) ) but the real cool parts (complete backup of the host) depends on ZFS which doesn't cover OPs usecase.
 
  • Like
Reactions: bitranox
but the real cool parts (complete backup of the host) depends on ZFS which doesn't cover OPs usecase.
absolutely. Thats why the script offers two methods which can be combined - ZFS Snapshot AND compressed Backup via SSH Tunnel, with some convenience functions like email notification, key distribution, systemd timers, backup retention and so on.
 
Last edited:
  • Like
Reactions: Johannes S
zfs is only needed if You want to make a snapshot of rpool. the backup of config files is usually enough to resurrect a dead node from scratch.
Ah ok
The thing is there finally many thing done in pve shell (backup client, nut ups management...) that have to be restored in the eventuality of a failure. so a full host (without vm/lxc) backup is the way to go now
 
so a full host (without vm/lxc) backup is the way to go now
yes - the script can be configured to do that - compressed Backup via SSH Tunnel, with some convenience functions like email notification, key distribution, systemd timers, backup retention and so on.
 
Last edited:
I added a new feature - packages are also saved now :


Bash:
# **Reinstall all packages from a selections file:**
# On the target server, set the package selections and install
sudo dpkg --set-selections < packages_selections_proxmox01_2026-03-23_04-30-00.txt
sudo apt-get dselect-upgrade

# **Compare installed packages between two backups:**
diff packages_selections_proxmox01_2026-03-22_04-30-00.txt \
     packages_selections_proxmox01_2026-03-23_04-30-00.txt

# **Check which version of a package was installed:**
grep nginx packages_list_proxmox01_2026-03-23_04-30-00.txt
 
I added a new feature - packages are also saved now :


Bash:
# **Reinstall all packages from a selections file:**
# On the target server, set the package selections and install
sudo dpkg --set-selections < packages_selections_proxmox01_2026-03-23_04-30-00.txt
sudo apt-get dselect-upgrade

# **Compare installed packages between two backups:**
diff packages_selections_proxmox01_2026-03-22_04-30-00.txt \
     packages_selections_proxmox01_2026-03-23_04-30-00.txt

# **Check which version of a package was installed:**
grep nginx packages_list_proxmox01_2026-03-23_04-30-00.txt
hello
will all the conf files also be backed up ? I've installed NUT for exemple on proxmox host, and it needs many conf files to be modified and customized to work.
thanks