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

Make sure auto-cleanup doesn't purge chained backups that are being relied on #5

Open
HeatherComputer opened this issue Jun 11, 2023 · 5 comments
Labels
complete / needs more discussion Solved, but needs improvements to be disucssed.

Comments

@HeatherComputer
Copy link
Owner

Auto-purge currently deletes the oldest backup.
This breaks differential and incremental chains.

Differentials are easy - if the oldest full backup is being relied on, delete the oldest non-full.
Incrementals however are a MAJOR problem.

With incrementals, the entire chain is linked - restoring a partial backup means also restoring every other partial backup since the last full backup, whereas differentials only require the last full backup.

As such, we have two options :

  • Delete an entire chain.
  • Don't delete anything, and ignore the set limit.

We could have a user config for this...?

@HeatherComputer HeatherComputer added bug Something isn't working urgent / severe Major issues that need resolving asap. labels Jun 11, 2023
@HeatherComputer HeatherComputer pinned this issue Jun 11, 2023
@superhealing
Copy link

I think the best idea is to introduce a user configuration option.
This option allows users to choose how auto-cleanup behaves. They can either delete the entire backup chain, including linked incremental backups, or they can ignore the set limit and manage backup storage manually.
This user configuration option provides flexibility and ensures that users can preserve their backup chains or take full control over backup management. At cost of expensive documentation.

@MisterMyst
Copy link

MisterMyst commented Jun 11, 2023

I think it should take into account the max number of chains and how many chains there currently are. I don't ever see a case where a user would be happy with an entire chain being deleted if it's the ONLY chain, basically nuking all backups.

So, if there's more than one incremental chain, delete the oldest one if necessary
If there's only one incremental chain, do nothing, and report it, with a recommendation to reduce max chain length/increase chain amount and/or increase max space

@HeatherComputer
Copy link
Owner Author

HeatherComputer commented Jun 11, 2023

So :

  • With differentials, delete the oldest partial backup if the oldest full backup is being relied on. Do not adjust the chain length, so as to allow new full backups to be made again in due time.

  • With incrementals, delete the entire chain if:

    • Enabled in config
    • There are multiple chains
  • Otherwise, ignore the space limits and find a way to warn the user. (What's a good way?)

Thoughts on this?

@HeatherComputer
Copy link
Owner Author

Okay, this is now done - though, we do not have a good way to alert users.
@MisterMyst @superhealing I don't suppose you've got comments on how we alert the user? I feel just writing to the log isn't very helpful..

@HeatherComputer HeatherComputer added complete / needs more discussion Solved, but needs improvements to be disucssed. and removed bug Something isn't working urgent / severe Major issues that need resolving asap. labels Jun 16, 2023
@HeatherComputer HeatherComputer unpinned this issue Nov 22, 2023
@Spennorex
Copy link

Maybe you could write it both to log, and also store the message to be displayed to an opped user at their logon?

Also, not sure if this has been offered yet, but if you have a discord bot/webhook to give backup results inside of a discord channel, you could use that as another channel to relay this information to an admin. (or ofc other connectors, to maybe Matrix, IRC, or similar.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complete / needs more discussion Solved, but needs improvements to be disucssed.
Projects
None yet
Development

No branches or pull requests

4 participants