Closed sbenedict closed 9 months ago
So, I've been thinking about this one.
I'm thinking that I add both of your suggested config values, and then set all three to have a minimum value of 0 - which would then disable the purging for that option altogether.
As an example:
config.advancedbackups.purge.size=50
config.advancedbackups.purge.amount=100
config.advancedbackups.purge.days=0
This would delete the oldest backup when the total space used reaches 50gb, or when there are more than 100 total backups. Alternatively,
config.advancedbackups.purge.size=0
config.advancedbackups.purge.amount=0
config.advancedbackups.purge.days=30
This would keep 30 days of backups, and ignore the other two options.
I wanted to grab your opinion before implementing these, given you were the one who made the suggestion - what do you think @sbenedict?
Sounds like a good solution, exactly as I envisioned!
@sbenedict I've got an early run out here if you want to test it out - I've got some more testing to do on my end but it should be all fully working.
Okay, now it's all working, and has been tested on several versions. Will push this to CF and Modrinth.
Limiting the backups by total size is not always ideal due to variance in world size. Currently a small 200 MB world could preserve backups 25x that size wasting disk space.
Automatically remove backups after a configured number of days and/or backups.
Other suggestions:
config.advancedbackups.size
to accept lower than 5 GB would be useful with smaller worlds. And better yet, change it to be a float value, allowing the limit to be set to less than 1 GB.