Open Mondane opened 9 years ago
@rossica , I've changed the code to mmin, see https://github.com/Mondane/timebackup/tree/feature/4_mtime-to-mmin . You are welcome to test it too.
Reading the stackexchange question and looking at the script code, this looks like a good change. I'm putting it into 'production' and will see how it turns out.
@Mondane One more thing: You might want to store "60*24" in a constant for better readability in all the places where you have doing multiplication for -mmin.
I'm noticing in my deployment that the daily rotation folder is deleting every other backup. So for my once-daily backups, I see Jan 4th, Jan 6th, and Jan 8th, with Jan 3rd rotated to the weekly folder.
I'll have a look into it sometime. It's a part I find difficult to wrap my head around.
2016-01-10 21:16 GMT+01:00 rossica notifications@github.com:
I'm noticing in my deployment that the daily rotation folder is deleting every other backup. So for my once-daily backups, I see Jan 4th, Jan 6th, and Jan 8th, with Jan 3rd rotated to the weekly folder.
— Reply to this email directly or view it on GitHub https://github.com/Mondane/timebackup/issues/4#issuecomment-170388772.
Is this package ready for use by non technical users? I would love a short explanation on setup and usage Thanks!
@OferLapid since this is unrelated from mmtime, see https://github.com/Mondane/timebackup/issues/5
Another thing I've noticed with the mmin change is that if I go a long period of time without a backup, the script deletes ALL previous versions and only keeps the latest one. This is generally undesirable because some history is preferred over none, and my understanding of the purpose of deleting older backups is to save space. Maybe a minimum number of backups to keep at each rotation level should be maintained?
Based on http://unix.stackexchange.com/questions/92346/why-does-find-mtime-1-only-return-files-older-than-2-days
I'm thinking of changing the mtime parameter in the find commands to mmin to have a better selection of files. This would hopefully improve the hourly and daily rotate so not several backups from the same day are saved.
@rossica , what do you think about this?