AutoMySQLBackup assists database administrators in backing up databases on a daily, weekly, and monthly basis. Install, Set Method: 1, Sourceforge download the latest version (currently 2.5.1-01) 2, add executable permissions $ mvautomysqlbackup-2.5.1-01.shusrlocalbinautomysqlbackup $ chmod + xautomysqlbackup1, set cr
AutoMySQLBackup assists database administrators in backing up databases on a daily, weekly, and monthly basis. Installation and setup: 1. download the latest version of Sourceforge (2.5.1-01) 2. Add executable permissions $ mv automysqlbackup-2.5.1-01.sh/usr/local/bin/automysqlbackup $ chmod + x automysqlbackup 1. Set cr
AutoMySQLBackup assists database administrators in backing up databases on a daily, weekly, and monthly basis.
Installation and setting methods:
1. download the latest version of Sourceforge (2.5.1-01)
2. Add executable permissions
$ Mv automysqlbackup-2.5.1-01.sh/usr/local/bin/automysqlbackup
$ Chmod + x automysqlbackup
1. Set cron
$ Crontab-e
Set to execute at every day
0 1 ***/usr/local/bin/automysqlbackup
Or copy automysqlbackup to the/etc/cron. daily directory.
2. In actual execution of automysqlbackup, you need to set several values first
# Database account
USERNAME = root
# Database Password
PASSWORD =
# Database Backup host or IP address, localhost represents the Local Machine
DBHOST = localhost
# Back up a database, for example, "DB1 DB2 DB3". "all" indicates all databases.
DBNAMES = "all"
# Backup file directory
BACKUPDIR = "/backup/db"
# Mail setup
# Notification letter content
#-Log: send only log file
#-Files: send log file and SQL files as attachments (see docs)
#-Stdout: will simply output the log to the screen if run manually.
#-Quiet: Only send logs if an error occurs to the MAILADDR.
MAILCONTENT = "log"
# Set the maximum allowed email size in k. (4000 = approx 5 MB email [see docs])
MAXATTSIZE = "4000"
# Notification email address
MAILADDR = "maintenance@example.com"
About AutoMySQLBackup
After version 2.5.1, AutoMySQLBackup began to support the backup rotation function? Before Version 2.5, backup files will accumulate more and more, resulting in a waste of hard disk space, while rotation will clear old backup files.
Daily backup, up to 7 days of backup
Weekly backup, up to 5 weeks of backup
Backup every month. A maximum of five months can be backed up.
Backups that have expired will be cleared when automysqlbackup is executed.