bit-team / backintime

Back In Time - An easy-to-use backup tool for GNU/Linux using rsync in the back
https://backintime.readthedocs.io
GNU General Public License v2.0
2.13k stars 208 forks source link

customize auto-remove conditions #194

Closed Germar closed 9 years ago

Germar commented 9 years ago

This is more a feature request than a bug report.

My backup disk is not getting full and I want to save a copy of every day. However with the current auto-remove options this is not possible. So could it be possible to implement a more extensive auto-remove configuration interface?

btw. is there a possibility to realize this by editing the configuration files manually?


Imported from Launchpad using lp2gh.

Germar commented 9 years ago

(by bratdaking) No, there is no possibility to do that by editing the files, you will have to hack the snapshots.py file manually if you want to accomplish that (less difficult than that it sounds...) IT would be great to have manual settings for the smart removal, however it is a bit hard to implement at the moment.

Germar commented 9 years ago

(by knubee) i want to second this feature request.

although i understand it is difficult to implement the fully customizable version, perhaps you could add 2-3 new sets as an intermediate solution. for example:

smart remove, option 1: the existing set

smart remove, option 2: saves the hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month. (similar to apple time machine)

smart remove, option 3: saves the hourly backups for the past 24 hours, daily backups for the past week, weekly backups for past month, monthly backups for last year, and yearly for all previous years

Germar commented 9 years ago

(by calcipher) I'll third this. It would be great to have a custom retention policy. It is one thing I sorely miss from the backup software I used in Windows.

Germar commented 9 years ago

(by danleweb) The easiest way to do is to call a user defined application/script and this application should decide what to remove.

Germar commented 9 years ago

(by germar) I already hacked the snapshots.py before finding this bugreport/wish. I've no knowledge of python but it was quite simple. Just search for smart remove and give it a try.

Germar commented 9 years ago

(by lengau) It would be great to have these options. Although I don't have a need for it right now, option 3 is the backup policy at many corporations, so this would be great for that.

An alternative would be to have custom settings. It could look as follows:

|| Keep backups every __ for the past __ hours || Keep backups every __ for the past days || Keep backups every __ for the past __ weeks || Keep backups every __ for the past months || Keep backups every __ for the past __ years || Keep backups every __ forever

where the "|_|" is a checkbox (to either enable or disable that row), the first and third blanks on each row are a number selector and the second blank is a dropdown box containing all (shades out [or perhaps disappears] the number box), hours, days, weeks, months, years.

This way, it's completely customizable by the user. If this is implemented, one could have just about any backup plan they want. If one wants to keep every backup for the last year and then dump it, they simply need to uncheck the first four rows, check the fifth, select "all" in the dropdown on that line and "1" in the second number selector, and uncheck the last line.