Netapp SnapManager Snapshots

Network Appliance Snapshots

Network Appliance storage systems include the Network Appliance SnapManager software, which facilitates near-instantaneous hot backups and rapid restores.

ZRM for MySQL includes an optional snapshot plugin that integrates with SnapManager software to create consistent MySQL backups using ONTAP API. It creates temporary snapshots of the Network Appliance volumes to back up. The snapshots are removed when the backup run is completed (if regular backups are being performed). ZRM for MySQL using snapshots performs backups with minimal impact on MySQL applications.

This page describes the command-line configuration of Network Appliance snapshot backups, including requirements for the MySQL database.

 

MySQL Configuration Requirements

  • Sudo privileges must be configured for mysql user on the MySQL server (see the next section). On Solaris platforms, this means the SMCsudo package must be installed.
  • If you are backing up a remote MySQL server, the destination directory specified on the Backup Where page must exist on the MySQL server as well as the ZRM server. The MySQL backup user (OS-level) must have read/write permission to access this directory.

All MySQL data and logs must reside on Network Appliance volumes. The following are some of the possible configurations

  • All MySQL data is on a single Network Appliance Volume
  • Specific database directories are on different volumes
  • For databases containing InnoDB-based tables, the snapshot can only be used if the database directory, the InnoDB data files and the InnoDB logs are all on Network Appliance volumes.
    • The InnoDB shared data files are on a separate Network Appliance volume
    • The InnoDB logs are on a separate Network Appliance volume

 

netapp_snapshot.png

 

The Network Appliance volumes must be mounted on the ZRM server using NFS. The ZRM server's mysql user must have permissions to read and write to the volumes. If the Network Appliance volumes are accessed using some other protocol such as iSCSI, please contact Zmanda Support Team.

Pre-conditions for Using Network Appliance Snapshots

  • The mysql operating system user must be granted sudo privileges to execute Network Appliance commands on the MySQL server. Add a line similar to the following example to /usr/local/etc/sudoers on the MySQL server:
mysql MySQLserver.mycompany.com=NOPASSWD:/usr/sbin/mount,NOPASSWD:/usr/sbin/umount,NOPASSWD:/usr/local/bin/df,NOPASSWD:/sbi
n/fuser
where MySQLserver.mycompany.com is the fully-qualified domain name of the MySQL server. Note that if themountumount and df commands are installed in non-standard locations, the above example would not work without editing it to reflect the different paths. Please see KB article for more information on sudo configuration.
  • The snap reserve for the Network Appliance volume must be adequate to accommodate changed data. The Network Appliance default of 20% may be low or high for your site, depending on data change rates.
  • To determine the snap reserve, use the Network Appliance snap reserve volumename command.
  • All MySQL database files (data, log, indexes) must be stored in Network Appliance volumes to ensure consistency.
  • If any of the files are not on Network Appliance volumes, a raw backup using mysqlhotcopy, or a logical backup using mysqldump will be taken based on the storage engines of the tables in each of the databases.
  • If you using Netapp snapshots from a remote MySQL server (ZRM client installation), you will have to install Perl LWP-UserAgent module in the default perl installation.

Configuring ZRM for MySQL to use Netapp snapshots

To activate use of Network Appliance Snapshots, you must select the NetApp SnapShot Type for Backup Method from the Backup How page:

 BackupHow-Netapp-ZRM-3.4.png

NetApp User/Password
Supply a valid Network Appliance username and password. The Netapp user should have privileges to perform snapshots on the appliance.
Backup Type
Choose the method of snapshot backup. The Standard (Copy) option specifies that the snapshot should be copied to a standard ZRM for MySQL backup archive. The Quick (No Copy) option specifies that the snapshot itself should be used as a near-line backup. Quick backups are convenient as they provide faster backups and restores, but because they remain on the MySQL server they do not protect against media or server failure. Note that if the quick option is specified, the compress and encrypt options are ignored. In addition, no checksums are performed, which means that quick snapshot backups cannot be verified. Quick snapshot backups may be converted to standard backups stored on the ZRM server using the Convert Backup option available from the Reports menu tab.

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.