Method to Copy PBS Backups Elsewhere?

theprez1980

New Member
Feb 25, 2024
12
0
1
I'm in the process of redoing my proxmox cluster setup and PBS server. I don't want to lose the VM backed up in PBS as I'll need all that to restore to the new instances of PVE.

Is it possible to connect a USB Drive or rclone or some other method to save what's in PBS' datastore and be able to place it back on a fresh install of PBS?

Said differently, I want to backup what's in PBS in order to reinstall PBS along with the previously backed up VMs so they can be restored to PVE.

Thanks
 
When you look at how PBS works, you will understand that there are no individual backup "files" you can directly get out of it. Also, if you could, the sheer volume would probably kill you because of the deduplication factor.

You can, however, transfer a whole datastore as a data disk or the subdirectory / zfs where the PBS datastore resides. Essentially, what is in there is essentially the metadata for each backup and the chunks that make up the data. You can restore that data to another PBS instance and recreate the datastore in place.

You will have to use the same username that you did the backups with or change the owners of the backup groups.
 
When you look at how PBS works, you will understand that there are no individual backup "files" you can directly get out of it. Also, if you could, the sheer volume would probably kill you because of the deduplication factor.

You can, however, transfer a whole datastore as a data disk or the subdirectory / zfs where the PBS datastore resides. Essentially, what is in there is essentially the metadata for each backup and the chunks that make up the data. You can restore that data to another PBS instance and recreate the datastore in place.

You will have to use the same username that you did the backups with or change the owners of the backup groups.
Thanks for the detailed reply, that makes sense.

So no matter how I copy the /zfs directory either through rclone or some other method, and reuse the same User ID - I should be good to go then?
 
Adding to what meyergru has said, you could also attached a drive to your existing PBS server and then add it as a new repository and do a local sync from one datastore to the new one. It accomplishes the same thing but you'd be working in the GUI. When you setup the new PBS server you can add that datastore again. One of the benefits of doing the sync is you can choose how deep you want to sync (ie everything vs only the last x)

This post shows how that is done by editing the /etc/proxmox-backup/datastore.cfg
https://forum.proxmox.com/threads/datastore-recovery.72835/#post-325491


*note* be mindful of tabs/spaces in the datastore.cfg file. Its picky and you need to make sure you're using tabs and spaces in the right place or it will complain that it can't parse the file. This apply whether you are copying the files over manually or using PBS to sync them.
 
Last edited:
  • Like
Reactions: Johannes S
I think so - I only did it by moving a whole disk containing a datastore, because my PBS is a VM.

By "user", I mean the PBS user. All Linux files seem to be owned by "backup:backup". The logical PBS user is kept in a file named "owner" in the backup group directory, I imagine you could also change its content.

And yes, you could as well mount your USB disk, create a new datastore and then sync it. That would also work via network if the new PBS instance can reach the old instance. In that case, you would not even need a transfer medium.
 
Last edited:
  • Like
Reactions: Johannes S
Hi,

the easiest & most integrated method would be to use sync jobs - although that requires a secondary PBS instance.

Even more interesting to you would probably removable datastores, which are currently in the works.
These would allow you to add e.g. a removable disk conntected via USB as datastore and create a sync job to that.
 
Looking forward to see how you will do the implementation for that.
But I've to say, I'm happy with my own setup for our RDX drives already. :)
 

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!