Skip to content

Fix command for finding and deleting old backups#11

Open
christarazi wants to merge 1 commit intoaweijnitz:masterfrom
christarazi:master
Open

Fix command for finding and deleting old backups#11
christarazi wants to merge 1 commit intoaweijnitz:masterfrom
christarazi:master

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