Open exetico opened 2 years ago
Yes, that sounds like a great idea. A PR would be welcome, but I'll also queue this up.
possible partial implimentation with https://github.com/itzg/docker-mc-backup/pull/194
I've always thought of doing this with a sort of exponential backoff like how Realms does it.
For example, logrotate
-style:
/backups/* {
# Rotate daily and keep 7 days of daily backups
daily
rotate 7
missingok
notifempty
# Keep weekly backups for 3 months
weekly
rotate 13
dateext
dateformat -%Y%m%d
# Keep monthly backups for 1 year
monthly
rotate 12
dateext
dateformat -%Y%m%d
# Keep yearly backups forever
yearly
rotate 0
dateext
dateformat -%Y%m%d
}
Another way would be to look into some sort of restic powered backup, where the user only need to provide a "configure string" or similar (supporting multiple parameters). But I'm not sure if you'd allowed to bundle that in the solution. Just another input, as I really like restic.
Restic is already supported
https://github.com/itzg/docker-mc-backup?tab=readme-ov-file#restic
@itzg ; I see. Good to know. But a build in "default easy-mode solution" would be great, too.
It's clear that I didn't use Restic that much back in 2022, or, didn't see that as easy, as it can be:
I don't know or use Restic, so will need to rely on a contributor to add an "easy mode".
Hi,
I've tried to look through the docs and the code for a "max amount of backups", or "max amount of space" before backup-deletion.
Would you consider to expand the scope to include that?
(Today I filled up our server, by creating a backup every 30 minute :smile:. I guess it's overlapping a bit with restic, but I'd like to keep it simple)
Thank you for the solution, btw.