beauraines / server_backup

Scripts to backup ubuntu servers which include subversion repositories, MySQL databases, websites and minecraft.
2 stars 0 forks source link

deleteOldBackups function needs to have -maxdepth #11

Closed beauraines closed 8 years ago

beauraines commented 8 years ago

The deleteOldBackups function doesn't limit the depth of the file type when it is checking for older things to delete and generates a very long list of things to delete. But while it is parsing the list, it will delete children (it uses rm -rf) and items in the list to delete are no longer there. This throws ERROR messages that aren't really errors.

Adding in -maxdepth 1 ad possibly -type d would help address this.