Proxmox Backup Server - remote sync - only latest N backups

Feb 2, 2021
29
0
6
42
Hello all,

I have two proxmox servers backing up to a shared PBS in another datacenter. On the PBS I have quite a long retention.

Now I would like to set up an additional PBS server in our office as a backup plan, but only synchronize the last N backups of the PBS in the data center. Unfortunately, storage space is somewhat limited in the office, and this should only include a second copy of the VM backups as an emergency solution.
I would like to have only the last 1-2 backups in the office.

Unfortunately I can't find anything about this in the documentation. As far as I have seen, I can only ever sync the complete datastore.

Thanks &
Many greetings
Bastian
 
Last edited:
Hello Fabian,

thanks a lot for the links! Unfortunately currently looks like this is not possible without patching, or did I misunderstand?
Is there a timeline when this is available in the PBS?

Greetings
Bastian
 
the patches are not yet applied, so no concrete estimate. the bugzilla entry will be updated though as soon as a version with the fix is released..

you can kind of work around it:
- on the source side, add a namespace
- on the source side, sync the original namespace (with max depth 0) to this new namespace (this will just copy the snapshot metadata, the chunks are shared across namespaces within a datastore)
- on the source side, prune the new namespace so it only contains a single snapshot per group (or whatever aggressive pruning you want)
- on the target side, sync this new, pruned namespace instead of the original namespace
- on the target side, prune the synced namespace however you want (or set remove_vanished on the sync job if you want to always have a 1:1 copy)
- on the target side, setup GC to run regularly (else the space gains will be minimal, since prune only deletes metadata!)

basically you want the following sequence (where "original" is your current namespace, "pruned" is the new namespace, and "target" is the target namespace on the other PBS instance:
source sync original -> pruned (fast, can run often)
source prune pruned (fast, can run often)
target sync pruned -> target (depends on size of delta and line/storage speed)
target prune target (fast, can run often)
target gc target (depends on storage)

as you can tell, with both series of the linked bug entry this would be much easier, since the whole thing becomes

target sync with --transfer-last N and prune settings or remove_vanished
target GC
 
the patches are not yet applied, so no concrete estimate. the bugzilla entry will be updated though as soon as a version with the fix is released..

you can kind of work around it:
- on the source side, add a namespace
- on the source side, sync the original namespace (with max depth 0) to this new namespace (this will just copy the snapshot metadata, the chunks are shared across namespaces within a datastore)
Hi!
How sync on the source side original namespace with new?
UI need "sourse remote" - by command line?

WBR, Anatoly
 
Last edited:
you need to define a remote pointing to the same PBS instance
 
  • Like
Reactions: Man67
Hmm.. I found another way :)
You need to make a virtual machine with the same index, make a backup of it, "correct the date" of the backup. And that's all. When synchronizing, you will receive only more recent backups :)
 

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!