Corrected rotate find command

This commit is contained in:
Matthew McKinnon 2015-06-15 15:56:36 +10:00
parent 1909602caf
commit 7668a80396
3 changed files with 5 additions and 6 deletions

View File

@ -6,9 +6,9 @@ DBPASS='EWFfP3GZsqr427Yj'
BACKUPDIR='/BACKUP/db/' BACKUPDIR='/BACKUP/db/'
rotate_backups() { rotate_backups() {
find /BACKUP/db/ -type f -mtime +7 -exec rm -fr {} \; find $BACKUPDIR -type f -mtime +7 -exec rm -frv {} \;
}
}
rotate_backups rotate_backups

View File

@ -6,7 +6,7 @@ bakdest="/BACKUP/svn/"
svnrepos="/var/lib/svn" svnrepos="/var/lib/svn"
rotate_backups() { rotate_backups() {
find /BACKUP/svn/ type f -mtime +7 -exec rm -fr {} \; find $backdest -type f -mtime +7 -exec rm -frv {} \;
} }

View File

@ -5,13 +5,12 @@ BACKUPDIR='/BACKUP/www'
WWW='/var/www/' WWW='/var/www/'
rotate_backups() { rotate_backups() {
find /BACKUP/www/ -type f -mtime +7 -exec rm -fr {} \; find $BACKUPDIR -type f -mtime +7 -exec rm -frv {} \;
} }
rotate_backups rotate_backups
cd $WWW cd $WWW
for folder in `ls -d *`; do for folder in `ls -d *`; do