Netapp SnapVault Snapshots

Netapp SnapVault Snapshots

Network Appliance storage systems include the Network Appliance SnapVault software, which facilitates near-instantaneous hot backups and replicating the snapshot to another Netapp filer. ZRM also uses Snaprestore to perform rapid restores from the snapshots.

ZRM for MySQL includes an optional snapshot plugin that integrates with SnapVault software to create consistent MySQL backups using ONTAP API. It creates temporary snapshots of the Network Appliance volumes to back up. The quick snapshot backups are replicated to another Netapp filer using Snapvault replication. ZRM for MySQL using SnapVault 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.
  • Only quick backup method is supported. Log incremental backups are copied over to the ZRM server.

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

  • All MySQL data is on one or more Network Appliance Volume(s).
  • 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




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.

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:
where 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 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.
  • Snapvault configuration between primary and secondary filer should be configured. ZRM does not set up this configuration. The snapshot is replicated to the remote filer on its schedule (not kicked off by the ZRM backups).

Configuring ZRM for MySQL to use Netapp SnapManager

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



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
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, thecompress and encrypt options are ignored. In addition, no checksums are performed, which means that quick snapshot backups cannot be verified.  Only Quick (No Copy) option is supported for this backup method.

Netapp Snapvault Retention

The number of snapshot copies retained. The default is 10.

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.