cv4pve-barc icon indicating copy to clipboard operation
cv4pve-barc copied to clipboard

[Bug-0.2.5-renew] Backup with renew & retain - new initial backup was never made

Open MRLOLKOPF opened this issue 4 years ago • 7 comments

Hi,

I just tested the new version (0.2.5-renew) on my test Proxmox environment, unfortunately I found some bugs. I might try to fix them myself and make a pull request, but due to the corona situation I'm quite busy now. Just want to report those bugs, so that others might be aware of it. But really nice improvements with fsfreeze, checksum check, etc.!!

I tried to switch from the "keep" behavior to "renew" in combination with "retain". Unfortunately, whatever I've set "renew" or "retain" to, I never got a new initial backup. I manually made multiple backups in a row to test this, unfortunately just normal diffs were made without any limits. No new initial backup, even that the numbers defined in "renew" and "retain" were clearly exceeded. Not sure if I've done something wrong or maybe I've misunderstood something, does someone else have the same behavior?

Stay healthy! Greetings from Germany! Andy

MRLOLKOPF avatar Apr 06 '20 10:04 MRLOLKOPF

@lephisto do you have any idea?

franklupo avatar Apr 07 '20 15:04 franklupo

Can you write your complete commandline? It might have to do with the order in which the arguments are supplied. This might be a bug in argument processing.

thanks

lephisto avatar Apr 10 '20 15:04 lephisto

Hello,

the command looked like this, I tried it with multiple values/type of values:

eve4pve-barc backup --vmid=103 --label='daily' --path='/mnt/pve/bak2hetznerCeph' --renew=7d --retain=5d --unprotect-snap

eve4pve-barc backup --vmid=103 --label='daily' --path='/mnt/pve/bak2hetznerCeph' --renew=7d --retain=1d --unprotect-snap

eve4pve-barc backup --vmid=103 --label='daily' --path='/mnt/pve/bak2hetznerCeph' --renew=7d --retain=1 --unprotect-snap

eve4pve-barc backup --vmid=103 --label='daily' --path='/mnt/pve/bak2hetznerCeph' --renew=6 --retain=1 --unprotect-snap

MRLOLKOPF avatar Apr 10 '20 16:04 MRLOLKOPF

I guess if you switch from keep to another method, you should start off with a clean target directory (and delete snapshots with rbd). i never tested how things behave when you switch methods.

lephisto avatar Apr 11 '20 22:04 lephisto

I had the same idea, that's why I've set up a completely new VM with some test data and then I made multiple backups in a row till the renew and/or retain limits were reached. Unfortunately nothing happened... The only idea which I have is, the backups were labeled as "daily". Is it possible that the backups do not get counted by their count itself, but by the creation date? So if I create 10 backups in a row on the same day, but they are labeled als daily, maybe they will be recognized just as one backup? I don't know...

MRLOLKOPF avatar Apr 12 '20 09:04 MRLOLKOPF

If you use --renew you can do as many backups as you want.

lephisto avatar Apr 29 '20 13:04 lephisto

This seems to be the same problem as #54, just with the global $reimg - this should be fixed in master from what I can tell checking the changes for #54.

In the renew loop it checks against $reimg before adding the counters.

Tatsu-Kishi avatar Aug 11 '20 08:08 Tatsu-Kishi