shopify analytics ecommerce

MySQL Backup Shell Script

This is the Shell Script for backup MySQL database, it will use mysqldump create backup files and use gzip compressing to .gz files. This script will save 5 days backup and able to auto rotate.

Usage: Modify db_user, db_passwd and db_host to your mysql’s root login details, backup_dir is the directory save backup files.

The last step is add the script to crontab and autorun everyday.


Leave a Reply