Database - backing up and restoring it on Amazon EC2

Database Backups

Install backup manager to take regular backups of the Mifos X databases onto Amazon S3 buckets



//Install Backup Manager

sudo apt-get install backup-manager

sudo apt-get install libnet-amazon-s3-perl 

//Modify Backup manager configuration file

sudo nano /etc/backup-manager.conf

//Locate and change the following properties with you actual S3 credentials

Make the following changes to it

export BM_ARCHIVE_METHOD=”mysql”

export BM_MYSQL_DATABASES=”mifostenant-default


export BM_MYSQL_ADMINPASS=”password

export BM_UPLOAD_METHOD=”s3"

export BM_UPLOAD_S3_DESTINATION=”s3bucketname

export BM_UPLOAD_S3_ACCESS_KEY=”s3accesskey

export BM_UPLOAD_S3_SECRET_KEY=”s3secretkey

Note: - Yellow marked fields should be updated with respect to your settings.  

Automating the process can be as simple as adding a cron job for the mysqldump command. 

Cron Job for backups

Scheduling a cron job for taking periodic backups



sudo crontab -e

//select nano editor (easiest to work with)

//Schedule the job to run daily at 4 am in the morning

4 2 * * * /usr/sbin/backup-manager



There is no content with the specified labels