Skip to content

Instantly share code, notes, and snippets.

@pilot22
Created September 12, 2020 08:57
Show Gist options
  • Save pilot22/2fa24b457bb69f224525c6c2ed6bec99 to your computer and use it in GitHub Desktop.
Save pilot22/2fa24b457bb69f224525c6c2ed6bec99 to your computer and use it in GitHub Desktop.
Auto-BackupSQL (rm +2d)
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