Created
September 12, 2020 08:57
-
-
Save pilot22/2fa24b457bb69f224525c6c2ed6bec99 to your computer and use it in GitHub Desktop.
Auto-BackupSQL (rm +2d)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /root/mysql_backup/* -mtime +2 -exec rm {} \; | |
mysqldump -u root --all-databases --routines| gzip > /root/mysql_backup/SQL_backup_`date +'%m-%d-%Y'`.sql.gz | |
cp /srv/daemon-data/ {docker_id} /garrysmod/sv.db /root/mysql_backup/backup_`date +'%m-%d-%Y'`_sv.db | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment