two PBS with sync and different pruning

Sycoriorz

Well-Known Member
Mar 19, 2018
45
4
48
36
Dear,

If i have to pbs and i want to sync an datastore. It has to be on both PBS that the storage has the same dimension?

I want on an offsite PBS to have less storage. I want to controll this with the amount of holded backups and an different pruning.

Lets say on the local PBS i keep the last 20 and on the offsite i want to keep only the last 10

The storage can be smaller in this case or?

regards
 
Yes, you can have different prune policies on local and offsite PBS. In fact, you can have different prune policies for each namespace. To accomplish what you want to do I follow these steps:

1- In local PBS create a namespace "offsite_replica" for each datastore you want to replicate
2- Then create a sync job to replicate all snapshots you want to sync remotely, of each datastore, in their respective "offsite_replica" namespace. This will use a bit of space in the datastore, but not much as chunks are shared for all backups in the same datastore. If you sync from one datastore to another it will use disk space in the destination datastore. Remove the sync job as you don't need it after the initial sync.
3- Run a prune in each "offsite_replica" leaving just the amount of backups that you want to have offsite.
NOTE: you could omit these steps if you have enough offsite disk space to do an initial full sync.
4- Setup a sync job in the offsite PBS to sync from "offsite_replica" namespace in each local datastore. Do *NOT* tick "remove vanished".
5- Once the initial sync is done, change the sync job to replicate from the normal datastore/namespace.
6- Remove the "offsite_replica" namespace in local datastores.
7- Setup a prune job in offsite PBS to leave the desired amount of snapshots.
 
  • Like
Reactions: UdoB
Victor covered this perfectly. But also this is our active example.

Yes that is what we do, We have local retention times that are not the same, our local retention times are geared more for user error, so short interval backups, that fade quickly over time.

you do have to make sure you do not prune backups before they get synced. We sync every hour, and retain at a minimum the last 8 backups. this is enough to ensure that our most frequent backups (20min) are retained long enough to get synced before the next purge.

LOCAL:
chrome_qtJpZ1LoAG.png
AWS:
chrome_pFSYZIGUlb.png
 
Last edited:
Hi thank you very much for response.
My biggest failure was that i did not create namespaces. I create now an own namespace for each pruning.
I used my weekend for reorganising that.

With that i think i solved my problem.

LOCAL:

chrome_qtJpZ1LoAG.png


AWS:

chrome_pFSYZIGUlb.png

I am impressed about the quantity that you keep for each vm in this prune job. You keep that for each vm or only for database and fileserver?

regards
 
When we started using PBS there were no namespaces. so we needed a retention policy that worked for EVERYTHING. that became policy, and we have the storage to accommodate it so why bother changing policy. Most backups are Daily... so we retain 142 days of daily backups. RDP and virtual workstations are backed up hourly. but we also have some Database applications that backup every 20 min.

it works.
 

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!