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

Handle $KEEP_NUM_RECENT being set to 0 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Handle $KEEP_NUM_RECENT being set to 0 #2

wants to merge 1 commit into from

Conversation

star-szr
Copy link

First of all, thanks for open sourcing this! I looked around at a lot of options and this fit my needs best.

I was playing around with these config options:

KEEP_NUM_RECENT=0
KEEP_NUM_MONTHLIES=0

And noticed errors like:

du: cannot access `/var/backup/backup_2015-02-10-1423608909': No such file or directory

This change accounts for the possibility that the local backups may have been immediately rotated out. Another approach would be to check and store the disk space used before rotating. This is the quick and dirty "solution" to get the discussion started, I'd be happy to dig deeper to come up with a better PR :)

Edit: …although checking the disk space ahead of time it would still be displaying a non-existent directory so that probably wouldn't make sense. So this is maybe the simplest and least confusing solution for this without having to check S3 configuration and all that.

Prevents errors like:

du: cannot access `/var/backup/backup_2015-02-10-1423608909': No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant