forked from thunix/ansible
Clean up, before to create a new one
This commit is contained in:
parent
12a37b4020
commit
8cb9be8231
|
@ -3,6 +3,8 @@
|
|||
DATE=$(date +%Y%m%d)
|
||||
BACKUPS=/var/backups
|
||||
|
||||
find $BACKUPS -name "*.tgz" -mtime +3 -exec rm {} \;
|
||||
|
||||
tar -cz \
|
||||
--exclude ".nobackup" \
|
||||
--exclude "nobackup" \
|
||||
|
@ -29,5 +31,3 @@ tar --remove-files -cz $BACKUPS/$DATE-all_databases.sql \
|
|||
|
||||
chown root:sudo $BACKUPS/$DATE*.tgz
|
||||
chmod 640 $BACKUPS/*.tgz
|
||||
|
||||
find $BACKUPS -name "*.tgz" -mtime +3 -exec rm {} \;
|
||||
|
|
Loading…
Reference in New Issue
Block a user