Setting up a sync once every two weeks

Nans

New Member
Oct 7, 2022
3
0
1
Hello, I am looking for how to configure the schedule so that the pbs sync its datastore on datastore n°1 every day of the first week and then it goes to datastore n°2, also every day of the week. Then it goes back to datastore no. 1 and so on.

I can't see how I can do this with the Calendar Events webpage.
 
Do I understand this correctly? You want PBS to sync its datastore to #1 in week1, then to #2 in week2, then again to #1 in week3 ?
 
If I'm not mistaken, I don't think this is currently possible. Or at least not without creating a LOT of rules, and even then it wouldn't be exactly your scheme. Do you need this specific backup scheme or do you just want to distribute the backups between the datastores evenly?

Some alternative schemes I could think of off the top of my head (some are a bit weird, but I tried to come as close to your desired solution as possible while still having a low amount of rules):
  • save the backups on even days on datastore 1, on odd days on datastore 2
  • alternate monthly instead of weekly
  • save backups from mon-wed on one datastore, from thu-sun on the other
  • save backups from day 01-07 on datastore 1, from 08-14 on datastore 2, ... (this has some issues at the end of the month, since the amount of days varies and is not divisible by 7)
Otherwise, in order to implement your specific scheme you would have to manually specify a rule for each week and continually add new rules, which would be super cumbersome, so not really a satisfying solution.
 
Last edited:
also possible would be to have a rule for both datastores and with a script turn one off and the other one on via api/cli (or manually once a week)
 
  • Like
Reactions: shanreich
Sorry but how can I deactivate a sync via a script or the api knowing that I can't even deactivate it in the web interface unless I deactivate the schedule. Do you have an example?
 
yes thats what i meant, in the script you check

if job A has no schedule, add the a daily schedule (e.g. 12:00) to A, remove schedule from B
if job A has a schedule, remove schedule from A, add daily schedule to B

and let that run once a week
 

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!