Can I specify PBS namespace in backup jobs?

rahman

Renowned Member
Nov 1, 2010
63
0
71
Hi,

I want to use different retention settings for different types of backup jobs (hourly, daily, weekly etc). We have 2 PBS server, 1 backup jobs use directly and other just sync from first PBS. All PBS has one datastore and one namespace.

I can define retention settings in PVE backup jobs but this does work only in first pbs, so second pbs apply global prune retention setting which is not ok for us (it keeps unwanted number of snapshots for daily, weekly and monthly backups if we tune it for hourly backups). So it seems using one datastore and separate namespaces on PBS should work but this time I need to create multiple storage config per PBS namespace (hourly, daily, weekly, monthly etc) on PVE. Can I set backup namespace in backup jobs?

Regards,

Rahman
 
you can just split your sync job, so that the second PBS (that is not directly used by PVE) has the backups grouped by retention settings. or, you simply don't use a built-in prune job on that second PBS, but your own. you can even automate that by letting PVE set some marker in the backup notes, and parsing that on the sync target to determine how aggressive your pruning should be.
 
you can just split your sync job, so that the second PBS (that is not directly used by PVE) has the backups grouped by retention settings. or, you simply don't use a built-in prune job on that second PBS, but your own. you can even automate that by letting PVE set some marker in the backup notes, and parsing that on the sync target to determine how aggressive your pruning should be.

you can just split your sync job, so that the second PBS (that is not directly used by PVE) has the backups grouped by retention settings.

Can you elaborate more on how to do this? By using VM Ids in separate sync jobs? If I need to use VM ids, it will be a burden to maintain them as VM's cames and goes in PVE backup jobs.

you can even automate that by letting PVE set some marker in the backup notes, and parsing that on the sync target to determine how aggressive your pruning should be.

I need to write custom scripts to automate this?

Thanks for you helps
 
Can you elaborate more on how to do this? By using VM Ids in separate sync jobs? If I need to use VM ids, it will be a burden to maintain them as VM's cames and goes in PVE backup jobs.

yes, this would require a group filter.

I need to write custom scripts to automate this?

yes.

a third approach would be to use "remove_vanished" and only prune on the source side. but that is of course dangerous, in case you accidentally prune too much that would be propagated with the next sync.
 
  • Like
Reactions: rahman

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!