Corrected rotate find command
This commit is contained in:
parent
1909602caf
commit
7668a80396
@ -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
|
||||||
|
|
||||||
|
@ -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 {} \;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user