Backup Proxmox VE Host to Proxmox Backup Server?

Jan 23, 2021
51
18
13
Hi all,

I have set up Proxmox Backup Server and I am looking for how I can back up my Proxmox VE host installation. I can't seem to see how to do it. Is this something that must be done at the command line?

I have everything set up. Created a datastore using a CIFS share and I have added the backup server as a storage location in Proxmox VE.

Thanks,

FS
 
I have found a way to do this using the proxmox-backup-client CLI on the Proxmox VE host. I have successfully backed up the root directory of Proxmox VE to Proxmox Backup Server.

I can't see any way to do this from the web UI in Proxmox VE. Am I overlooking something?

Using the CLI is fine but without writing a bash script, is there any way to automate this? Would ideally like to get a daily backup setup with retention for a week of backups or so.
 
Hi,

in the Datacenter view, select Storage. Then use "Add" to add a Proxmox Backup Server as a storage. Afterwards, define a backup to use your PBS storage as a target.

hth,
Lars
 
Hi,

in the Datacenter view, select Storage. Then use "Add" to add a Proxmox Backup Server as a storage. Afterwards, define a backup to use your PBS storage as a target.

hth,
Lars
Yes, I am using that part of the web UI but that only seems to support backing up virtual machines and containers, which is working fine. There is no support there for backing up the actual Proxmox VE host root directory though. None that I can see anyway.
 
Yeah the CLI is what I have had to use so far. There doesn't seem to be a way to set up a schedule as such with the CLI though.

No problem. Just have to remember to take a manual backup occasionally using the CLI.

Thanks.
 
Yeah the CLI is what I have had to use so far. There doesn't seem to be a way to set up a schedule as such with the CLI though.

No problem. Just have to remember to take a manual backup occasionally using the CLI.

Thanks.
AFAIK there is no WebUI support for host backups yet (but this is definitely on the roadmap). Instead of running the cli command manually, you can setup a cronjob or systemd timer to run the backup job on a periodic basis for you.
 
Out of interest, what comand are you running to get it to follow all softlinks etc for the likes of the pve lxc and qemu-server directories?

EDIT: ignore this, i see that they are soft linked to /etc/pve/nodes/<nodename>/lxc etc
 
Last edited:
Hi all,

I have set up Proxmox Backup Server and I am looking for how I can back up my Proxmox VE host installation. I can't seem to see how to do it. Is this something that must be done at the command line?

I have everything set up. Created a datastore using a CIFS share and I have added the backup server as a storage location in Proxmox VE.

Thanks,

FS
Hi, ive been trying to figure this out just now, so glad im not going mad!

Do you have a guide for setting it up through CLI?
 
I use the proxmox-backup-client via cron to create a weekly backup of config files on file level while PVE is running.
And for backup of the whole system disks I installed Debian to a USB pen drive and installed the proxmox-backup-client repo and package. When I need to do some bigger PVE updates I shutdown the server, boot into the Debian pen drive, do a block-level backup of the whole system disks using the proxmox-backup-client.

See the documentation for proxmox-backup-client usage:
https://pbs.proxmox.com/docs/backup-client.html
https://pbs.proxmox.com/docs/command-syntax.html#proxmox-backup-client
Its all there from terminilogy over adding the repo and installing it, explanation of the commands, usage examples and so on.
 
Last edited:
  • Like
Reactions: takeokun
What should be the correct restore procedure if the PVE and PBS are on the same physical server and its system disk dies?
Thanks a lot.
 
Restore won't be fast as there is no way to access your backups without the PBS running.
Install a new PVE and set everything up again from scratch. Install a new PBS and set everything up from scratch. Mount your old PBS disks, edit your PBSs datastore.cfg and point it to that mountpoint. Add your PBS storage to your PVE. With all that done, you could access your host, VM and LXC backups.
 
Last edited:
  • Like
Reactions: luca3x71
Restore won't be fast as there is no way to access your backups without the PBS running.
Install a new PVE and set everything up again from scratch. Install a new PBS and set everything up from scratch. Mount your old PBS disks, edit your PBSs datastore.cfg and point it to that mountpoint. Add your PBS storage to your PVE. With all that done, you could access your host, VM and LXC backups.
Thanks a lot, I will try on a test environment. Great response time, thank you!
 
While I was looking around on my PBS server I've noticed this:

1680463125306.png

I was like oooohhhh does this mean I can go to the host WebGUI and set it to backup the host? So far nope based on the posts here. lol :)

I know it's on the roadmap. So I'll look into using the CLI / Bash script for now.

P.S. I love that dedupe factor! :cool:
 
Last edited:
While I was looking around on my PBS server I've noticed this:

View attachment 48781

I was like oooohhhh does this mean I can go to the host WebGUI and set it to backup the host? So far nope based on the posts here. lol :)

I know it's on the roadmap. So I'll look into using the CLI / Bash script for now.

P.S. I love that dedupe factor! :cool:
This view brought me over here as well :)
 
  • Like
Reactions: externalenderman
This view brought me over here as well :)
Same for me :) .
I just migrated to a new PVE Host where I used external USB storage with VZDUMP backups to move LXCs and VMs to the new Host. Worked without issues.
Although, does the Host option on PBS now indicate we are soon to get PVE Host Backups?
 
  • Like
Reactions: miles267
I'm using this in a cron job

Bash:
#!/bin/bash
set -euo pipefail
export PBS_REPOSITORY='root@pam!pve@pbs.hostname.local:Data'
export PBS_PASSWORD_FILE=/etc/pve/priv/storage/pbs-data.pw
NAMESPACE="pve/host"
exec proxmox-backup-client backup \
   etc.pxar:/etc \
   root.pxar:/root \
   usr-local.pxar:/usr/local \
   --backup-type host \
   --keyfile /etc/pve/priv/storage/pbs-data.enc \
   --include-dev /etc/pve \
   --exclude "*/.cache/" \
   --ns "$NAMESPACE"
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!