Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Extend scope of "PRUNE_BACKUPS_*", to support x amount of backups, and maybe even "x amount of space used" #98

Open
exetico opened this issue Aug 5, 2022 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@exetico
Copy link

exetico commented Aug 5, 2022

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 😄. I guess it's overlapping a bit with restic, but I'd like to keep it simple)

Thank you for the solution, btw.

@exetico exetico changed the title Extend scope of "PRUNE_BACKUPS_*", to support x amount of backups, and maybe even "x amount of space used" FEATURE: Extend scope of "PRUNE_BACKUPS_*", to support x amount of backups, and maybe even "x amount of space used" Aug 5, 2022
@itzg
Copy link
Owner

itzg commented Aug 5, 2022

Yes, that sounds like a great idea. A PR would be welcome, but I'll also queue this up.

@itzg itzg added enhancement New feature or request help wanted Extra attention is needed labels Aug 5, 2022
@itzg itzg moved this to To do in Docker Minecraft Aug 14, 2022
@hpf3
Copy link
Contributor

hpf3 commented Jul 7, 2024

possible partial implimentation with #194

@wyne
Copy link
Contributor

wyne commented Aug 7, 2024

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
}

@exetico
Copy link
Author

exetico commented Aug 8, 2024

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.

@itzg
Copy link
Owner

itzg commented Aug 8, 2024

Restic is already supported

https://github.com/itzg/docker-mc-backup?tab=readme-ov-file#restic

@exetico
Copy link
Author

exetico commented Aug 8, 2024

@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:
image

@itzg
Copy link
Owner

itzg commented Aug 8, 2024

I don't know or use Restic, so will need to rely on a contributor to add an "easy mode".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: To do
Development

No branches or pull requests

4 participants