Use logarithmic scale to determine which backups to keep and which ones to remove
This is what BTFU does, but:
- I only want to back up my world.
- I need the backup to be stored inside my instance folder.
- BTFU supports neither of these.
What do I mean by this?
Having very frequent backups at your disposal from the last few hours / days, but way less from a few weeks-months ago. For instance, after making 8 backups, only backup number 0, 4, 6 and 7 should be kept and after making 16 backups, only backup number 0, 8, 12, 14 and 15 should be kept. These examples are, of course, based on powers of 2.
This way of discarding backups will:
- Make sure that you have a way longer range of backups at your disposal.
- Minimise the disk space needed for backups over a given range of time.
- EDIT: Make sure that your oldest backup never gets deleted.
An algorithm can probably be devised to combine this with incremental backups for even more disk space saving. A maximum number of backups may not even need to be set, since the number of backups will only grow exponentially.
Example: https://media.discordapp.net/attachments/502112718032076802/506074559062212610/unknown.png Note: this is not a very good example. I'll make a better one.
Why do I want this?
If you want to rollback the world to a recent backup, it's probably because of something that changed on the server recently and it's useful to have a rather dense set of backups available. If You need to rollback a version to an old backup, it's probably not as useful if you have 24 backups from that day. Either one would do. If you need to rollback a file to a version from months ago, It probably doesn't even matter if you only have one backup every 10 days from back then.