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

Fix command for finding and deleting old backups #11

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

Conversation

christarazi
Copy link

Previously, the find command would list all the *.img files because order of the operators were not correct. What the command translated to is:

Find all the files with the name *.img. If nothing was found, then find all the files with the name *.gz that have been modified over RETENTIONPERIOD hours.

For me, this listed all my .img files and was deleting all them of them. I was wondering why the script never created any backups...they were being deleted right away.

What we want is:

Find all the files modified over RETENTIONPERIOD hours, with the name *.img OR *.gz.

This fixed the problem for me.

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