ZRM for MySQL & MariaDB can backup MySQL servers running on Amazon EC2 instances in Amazon cloud. The backups are stored in Amazon S3 cloud storage. The backup images can be restored only to an Amazon EC2 instance. The backups are performed using Elastic Block Store (EBS) snapshots to S3.
If you purchase the feature license from Zmanda (available at the Zmanda Network Downloads page), ZRM for MySQL & MariaDB includes an optional snapshot plugin th `1QZDQARat integrates with Amazon EBS to create consistent MySQL full backups. It creates snapshots of the EBS volumes on which to perform a full backup. When snapshots are enabled, ZRM for MySQL & MariaDB can perform backups with minimal impact on MySQL applications. Database writes will be blocked only during snapshot creation, which typically takes less than a second regardless of database size.
This page describes the configuration of Amazon EBS snapshot backups, including requirements for the MySQL databases in the cloud.
# /opt/zmanda/zrm/perl/bin/cpan At CPAN prompt, type "install Net::Amazon::EC2"
mysql ec2-75-101-206-181.compute-1.amazonaws.com=NOPASSWD:/bin/df,NOPASSWD:/usr/sbin/xfs_freeze,NOPASSWD:/bin/mount,NOPASSW D:/bin/umount,NOPASSWD:/sbin/fuser
Amazon EC2 Access Key
Amazon account access key identifier. This information can be obtained from Amazon account page (Select Your Account -> Access Identifiers)
Fallback for Logical
If this field is set to yes and snapshot backup fails, the logical backup is attempted. Set the value to No if you do not want to do logical backup if there is a snapshot backup failure.
Remote MySQL Binary Path
Path to the MySQL commands on the MySQL server.
Binary Log Path
Location of binary logs on the MySQL server that are used for log incremental backups.
Elastic Block store snapshot backups can be restored only to an Amazon EC2 instance. There are two ways to do restoration of EBS snapshot backups.
Restoration of EBS snapshots to an EC2 where MySQL server is already running. This method is the recommended method. It can be used to restore MySQL backups back to original EC2 instance. This method is supported by Zmanda Management Console. For more details on how to configure destination Amazon EC2 instance id and other EBS parameters in the restore process, please see Restore Where page.
Restoration of EBS snapshots to an EC2 where MySQL server is not running. This method is useful for quick recovery of MySQL data. This restoration option is available in command line only.
mysql-zrm-manage-backup --mount-snapshots --source-directory <directory where backup images are stored> \
--ec2-instance-id <instance id of amazon ec2 where the snapshots have to be mounted> \
--device-fs-map <name of the mapping file containing devices and mount points>
The EBS devices are mounted at the mount points specified in the device mapping file on the destination amazon ec2 instance. The user can start a MySQL server with the datadir and logdir pointing to the mounted EBS devices to start accessing restored data.
An example of device mapping file:
/dev/sdf=/db
/dev/sdk=/innodb_data
/dev/sdn=/innodb_logs
and MySQL server to use the above data will have to be configured as follows in the MySQL server options file (my.cnf)
datadir=/db
innodb_data_home_dir=/innodb_data
innodb_log_group_home_dir=/innodb_logs
Use --dismount-existing option to mysql-zrm-manage-backup command if the EC2 where backups are being restored to already has EBS volumes mounted at the mount points.