+91 88 00 563434 [email protected] Blog open-book Knowledge Base

Find Solutions in Our Knowledge Base

AutoMySQL Backup installation and configuration on Centos

You are here:
Sharing is Caring

Setting up and Arranging AutoMySQL Backup on CentOS

AutoMySQL backup is a tool that allows for the creation of daily, weekly, and monthly backups of the MySQL databases on your CentOS server. It generates backups of the databases and compresses them into archive files. AutoMySQL backup provides a variety of features, including:

1) Backup compression and Encryption

2) Customizable backup rotation

3) Email notifications for backups

4) Incremental database backups

For CentOS-based distributions, you can easily install AutoMySQL backup by executing the following commands.

# yum install automysqlbackup

Let’s explore the installation process of AutoMySQL backup on CentOS.

1) SSH into your server.

# ssh root@IP

2) Obtain the AutoMySQL backup tar file.

#wget https://sourceforge.net/projects/automysqlbackup/files/latest/download?source=navbar

3) Create a directory in /opt and extract the downloaded file.

# mkdir /opt/automysqlbackup

# mv automysqlbackup-v3.0_rc6.tar.gz

# cd /opt/automysqlbackup

# tar -zxvf automysqlbackup-v3.0_rc6.tar.gz

4) After extraction, proceed with the AutoMySQL backup installation.

# ./install.sh

You can utilize the default path for the global configuration directory and the executable directory. Simply press the “Enter” key when prompted for these paths.

5) Once the installation is complete, you must configure AutoMySQL backup. Open the configuration file using your preferred text editor.

# vi /etc/automysqlbackup/automysqlbackup.conf

Uncomment and set the following configuration directives.

CONFIG_mysql_dump_username=’root’

CONFIG_mysql_dump_password=’YourPassword’

CONFIG_mysql_dump_host=’localhost’

CONFIG_backup_dir=’/backup/db’

CONFIG_do_monthly=” ”

CONFIG_do_weekly=” ”

CONFIG_rotation_daily=

CONFIG_rotation_weekly=

CONFIG_rotation_monthly=

CONFIG_mysql_dump_port=

CONFIG_mysql_dump_compression=’gzip’

You can customize the AutoMySQL backup settings by adjusting the values based on your requirements.

6) Create a directory for storing the MySQL backups. In the configuration, we have specified the directory /backup/db.

# mkdir /backup/db

7) To initiate the AutoMySQL backup, execute the following command.

# automysqlbackup

8) If desired, you can schedule AutoMySQL backups to run at specific times by creating a cron job.

# crontab -e

0 2 * * * /usr/local/bin/automysqlbackup /etc/automysqlbackup/automysqlbackup.conf

Here, the backup is scheduled for 2 AM.

Congratulations! You have successfully installed and configured AutoMySQL backup on CentOS.

CentOS AutoMySQL Backup Installation and Configuration Guide


Sharing is Caring

Leave a Comment

Table of Contents