Thanks Automatic MySQL Backup

Automatic MySQL Backup is Shell scripts to backup MySQL database. The shell script developed by wipe_out (Thank you wipe_out for the great shell)

here is some of features:

  • Backup multiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database separately)
  • Backup all databases to a single backup file or to a separate directory and file for each database.
  • Automatically compress the backup files to save disk space using either gzip or bzip2 compression.
  • Can backup remote MySQL servers to a central server.
  • Runs automatically using cron or can be run manually.
  • Can e-mail the backup log to any specified e-mail address instead of "root". (Great for hosted websites and databases).
  • Can email the compressed database backup files to the specified email address.
  • Can specify maximum size backup to email.
  • Can be set to run PRE and POST backup commands.
  • Choose which day of the week to run weekly backups

Easy to used! just download automysqlbackup.sh then make few config:

USERNAME=root
PASSWORD=mypassword
DBHOST=localhost
DBNAMES="db1 db2 db3" # You can use 'all' for any database
BACKUPDIR="/backup"


And final, don't forget make execute permission to the shell script by chmod +x automysqlbackup.sh

After run the script, it will create these folder (If the folders are not available)
/backup/daily
/backup/monthly
/backup/weekly


The shell script will make rotation as well
. I have make PHP script for database backup job, but forget it! This working better my script and I use it currently.

Comments

Popular Posts