Saturday, January 26, 2013

Auto backup

Auto MySQL Backup is a shell script that helps to automate the back process. http://sourceforge.net/projects/automysqlbackup/ Here are 7 easy steps to create backup of any database. 1) connect to the server. 2) Download the package: wget http://tinyurl.com/c52x3sh 3) Extract files: tar xvfz automysqlbackup-v3.0_rc6.tar 4) make sure you are "root" and then install: sh install.sh 5) create backup folder: mkdir /var/backup/ # this backup location can be changed as shown below 6) Make changes to user name / password and the DB that needs to be backup: vi /usr/local/bin/automysqlbackup CONFIG_mysql_dump_password='admin' CONFIG_db_names=('drupaldb') CONFIG_backup_dir='/var/backup/db' 7) Run the script to take the backup: /usr/local/bin/automysqlbackup