[SOLVED] pbs will keep only 1 backup if job set to keep x month/days

k-123

Well-Known Member
Mar 3, 2017
50
5
48
  • no retention policy in pve/storage or pbs/storage. only setup retention in backup jobs.
  • today notice job with keep 3 months will only keep the last one (previous one will be removed). then test 90 days, same behavior.
  • now change to keep last xxx backup count, this option is horned by pbs.
  • also tried setup a new backup policy to test above scenarios, same behavior.
log:
Code:
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: starting new backup on datastore 'ssd': "vm/160/2022-10-25T05:30:05Z"
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: download 'index.json.blob' from previous backup.
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: register chunks in 'drive-virtio0.img.fidx' from previous backup.
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: download 'drive-virtio0.img.fidx' from previous backup.
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: created new fixed index 1 ("vm/160/2022-10-25T05:30:05Z/drive-virtio0.img.fidx")
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: add blob "/opt/ssd/vm/160/2022-10-25T05:30:05Z/qemu-server.conf.blob" (460 bytes, comp: 460)
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Upload statistics for 'drive-virtio0.img.fidx'
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: UUID: 3c79da73193f4c30b0765440aa8c4f45
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Checksum: 821efcda0e3e5e640e4c0b409b823adb4e66721ebc9cf64631c7f2627ba318c7
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Size: 54525952
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Chunk count: 13
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Upload size: 54525952 (100%)
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Duplicates: 0+1 (7%)
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: Compression: 11%
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: successfully closed fixed index 1
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: add blob "/opt/ssd/vm/160/2022-10-25T05:30:05Z/index.json.blob" (328 bytes, comp: 328)
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: successfully finished backup
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: backup finished successfully
Oct 25 13:30:06 pbs2 proxmox-backup-proxy[647]: TASK OK
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: retention options: --keep-monthly 3
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: Starting prune on datastore 'ssd', root namespace group "vm/160"
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: vm/160/2022-10-25T05:24:02Z remove
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: vm/160/2022-10-25T05:30:05Z keep
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: TASK OK
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: removing backup snapshot "/opt/ssd/vm/160/2022-10-25T05:24:02Z"
Oct 25 13:30:07 pbs2 proxmox-backup-proxy[647]: Upload backup log to datastore 'ssd', root namespace vm/160/2022-10-25T05:30:05Z/client.log.blob
 
'keep monthly 3' means it should keep backups of 3 months. in the logs you can see:
removing backup snapshot "/opt/ssd/vm/160/2022-10-25T05:24:02Z"
which is still a backup from october, so it does not keep it
in november, it will keep one backup from october (that will deleted on the first backup of january)

check the prune simulator, e.g. here: https://pbs.proxmox.com/docs/prune-simulator/index.html
 

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!