Local backup job and offsite sync

Apr 29, 2021
27
3
8
47
Hi.
I have a PBS server running a backup job of our PVE environment. It has a job which keeps last 7 days and then prunes. This job syncs every day to an offsite storage, and it works very well.

The problem is, i need to have 7 days of retention on local backup, and 30 days + 1 monthly for 6 months retention on remote backup. That's not a problem for day to day use, but when I remove a VM from pve, it only gets removed from the local backup storage.

Example:
vm/110 is removed from pve. after 7 days, it's gone from the local storage, but it does not seem to delete the daily backups older than 30 days on the offsite storage, which is desirable.

This is my prunejob on the offsite storage:

1732263702037.png
This is my sync job:
1732263778164.png
 
Just tick the Remove vanished checkbox in the replication job.

vm/110 is removed from pve. after 7 days, it's gone from the local storage
No, it is not deleted from PBS. PBS will keep as many snapshots as set in the retention policy, no matter when they were taken or which day is present at any time. You will have to remove them manually from PBS.


but it does not seem to delete the daily backups older than 30 days on the offsite storage, which is desirable.
It is not that desirable: think about some compromised credentials, some ramsomware, some human error, some unhappy about-to-be-fired employee... that removes the backups in your local storage and then the sync job also removes them from the offsite location. Yep, you are left without any backup anywhere.

Simply get used to remove the backups after some time from both local and offsite PBS. You may orchestrate all that using both PVE and PBS API.
 
  • Like
Reactions: Johannes S
Just tick the Remove vanished checkbox in the replication job.


No, it is not deleted from PBS. PBS will keep as many snapshots as set in the retention policy, no matter when they were taken or which day is present at any time. You will have to remove them manually from PBS.



It is not that desirable: think about some compromised credentials, some ramsomware, some human error, some unhappy about-to-be-fired employee... that removes the backups in your local storage and then the sync job also removes them from the offsite location. Yep, you are left without any backup anywhere.

Simply get used to remove the backups after some time from both local and offsite PBS. You may orchestrate all that using both PVE and PBS API.
Unfortunately it is desirable when switching backup solutions.
But thanks, I'll keep an eye on the backups and remove them manually.
 

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!