mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-24 13:40:17 +00:00
Clean up, before to create a new one
This commit is contained in:
@@ -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 {} \;
|
||||
|
||||
Reference in New Issue
Block a user