Symantec VxFS snapshots
Symantec Veritas file systems (a.k.a VxFSs) allow two technologies to minimize application downtime during backup runs:
- Snapshot devices, which mirror the original storage and allow "freezing" for backup while the original data stays live.
- Storage checkpoints, which use the same filesystem volumes as the original to only mirror changed data.
ZRM for MySQL includes an optional VxFS plugin that integrates with the Veritas File System to leverage native Storage Checkpoint capability.
This page describes the configuration of VxFS snapshot/storage checkpoint backups, including requirements for the MySQL database.
MySQL Configuration Requirements
- Both the ZRM server and MySQL server require the configuration of sudo privileges (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 VxFS volumes. The following are some of the possible configurations:
- All MySQL data is on a single VxFS 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 VxFS volumes.
- The InnoDB shared data files are on a separate VxFS volume
- The InnoDB logs are on a separate VxFS volume
Refer to Veritas-supplied VxFS documentation for details on VxFS storage checkpoint configuration.
The VxFS volumes are mounted on ZRM server. ZRM user "mysql" should have permissions to read and write to the volumes.
Pre-conditions for Using VxFS Snapshots
- The MySQL backup user must be granted sudo privileges to execute VxFS commands on the MySQL server. Add a line similar to the following example to /etc/sudoers on the MySQL server:
mysql MySQLserver.mycompany.com Server>=NOPASSWD:/bin/mount,NOPASSWD:/bin/umount,NOPASSWD:/bin/df, \
NOPASSWD:/sbin/fsckptadm, NOPASSWD:/sbin/fuser
where MySQLserver.mycompany.com is the fully-qualified domain name for the MySQL server. Note that if VxFScommands 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.
- All MySQL database files (data, log, indexes) must be stored in VxFS volumes to ensure consistency. If any of the files are not on VxFS volumes, a raw backup using mysqlhotcopy, or a logical backup using mysqldumpwill be taken based on the storage engines of the tables in each of the databases.
Configuring ZRM for MySQL to use VxFS Snapshots
To activate use of VxFS storage checkpoints, you must select the VxFS Snapshot Type for Backup Method from theBackup How page:
There are two options for VxFS snapshots:
- VxFS Binary Path
- Supply the path to VxFS fsckptadm command (the default is /opt/VRTS/bin
- 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 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.