I had created this rpm few months back. Now it is available for all users. This rpm have a simple shell script for mysql database backup.
Features:
- Takes database backup locally.
- Upload backups to ftp server.
- Send email alerts on backup completed.
Installation:
Download this rpm directly using command line or using given below download link and install it.
Advertisement
[wpdm_file id=4]
# wget https://tecadmin.net/wp-content/downloads/rpms/mydumpadmin-1-0.noarch.rpm # rpm -ivh mydumpadmin-1-0.noarch.rpm Preparing... ########################################### [100%] 1:mydumpadmin ########################################### [100%] Thank you for installing this RPM. Configure backup settings in /etc/mydumpadmin/settings.conf file Setup /etc/mydumpadmin/mysql-dump.sh script in your cron to take backup automatically 0 2 * * * /bin/sh /etc/mydumpadmin/mysql-dump.sh
Configuration:
To configure edit settings file ( /etc/mydumpadmin/settings.conf ) in your favorite editor and make changes as per your requirements.
MYSQLUSER : Enter your mysql admin account MYSQLPASSWORD : MySQL admin account password MYSQLHOSTNAME : Enter systems host name FTP_ENABLE : 1=enable, 0=disable. FTP_SERVER : Enter ftp server hostname or login details. FTP_USERNAME : Enter ftp username FTP_PASSWORD : Enter ftp user password FTP_UPLOAD_DIR : Enter backup location at ftp server. VERBOSE : Will show output on screen if enabled ( 1=enable, 0=disable ) BACKUPDIR : Local backup directory TMPFILES : Temp files location SENDEMAIL : Enable/Disable email alerts ( 1=enable, 0=disable ) EMAILTO : Email id
Configure Cron for Daily Backup:
Schedule a cron for daily backup, as per your preferred time.
# crontab -l 0 2 * * * /bin/sh /etc/mydumpadmin/mysql-dump.sh
1 Comment
Hi, i’ve modified your script at line 38:
${MYSQLDUMP} –single-transaction -u….
to avoid mysql err
ps. what do you think about use of sftp instead ftp?