Resumen del contenido incluido en la página 1
TM
Using Sun Fire X4540 Server
With Zmanda Recovery Manager
TM
2.2 for MySQL Database
Thomas Hanvey (Sun Microsystems)
Dmitri Joukovski and Ken Crandall (Zmanda)
October 2008
Resumen del contenido incluido en la página 2
Copyright © 2008 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the Un
Resumen del contenido incluido en la página 3
Sun Microsystems, Inc. Table of Contents Introduction.....................................................................................................................................................1 Configuration ..................................................................................................................................................2 Overview..............................................................................................................................
Resumen del contenido incluido en la página 4
Resumen del contenido incluido en la página 5
1 Introduction Sun Microsystems, Inc. Introduction This paper discusses how to quickly configure and deploy the Sun Fire X4540 server with Zmanda Recovery Manager 2.2 for MySQL databases. For more information on ZRM Enterprise, see: http://zmanda.com/zrm-mysql-enterprise.html. TM MySQL software has become the world's most popular open source database because of its ease of use, high performance, and high reliability (see http://www.sun.com/software/products/mysql). Regardless of how you use M
Resumen del contenido incluido en la página 6
2 Configuration Sun Microsystems, Inc. Configuration Overview Figure 1 shows an example of Zmanda Recovery Manager (ZRM) running on the Sun Fire X4540 server and protecting remote MySQL servers running on Solaris OS, Linux, and Microsoft Windows machines with MyISAM and InnoDB tables, and a MySQL Cluster with NDB storage engine. Figure 1. Centralized Backup of MySQL Server With ZRM on Sun Fire X4540 Server Notes: X4540 here refers to Sun Fire X4540 Server. All figures reprinted with permissi
Resumen del contenido incluido en la página 7
3 Overview Sun Microsystems, Inc. Solaris Configuration For this guide, the Sun Fire X4540 server used for ZRM certification was running the Solaris 10 8/07 OS. This is the minimum recommended version to use because various ZFS improvements were introduced in this build. The Sun Fire X4540 server is powered by up to 8 CPUs operating at 2300 MHz and provides 48 SATA drives with a total capacity close to 50 Tbytes in a 4U enclosure. The two boot drives are mirrored using Solaris Volume Manager
Resumen del contenido incluido en la página 8
4 Zpool Configuration Sun Microsystems, Inc. Example zpool creation commands for a pool zmanda: bash-3.00# zpool create -f zmanda raidz2 c0t0d0 c1t0d0 c2t0d0 c3t0d0 c4t0d0 c5t0d0 bash-3.00# zpool add zmanda raidz2 c0t2d0 c1t2d0 c2t2d0 c3t2d0 c4t2d0 c5t2d0 bash-3.00# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT zmanda 10.9T 204K 10.9T 0% ONLINE - bash-3.00# zpool add zmanda spare c0t7d0 c1t7d0 bash-3.00# zpool list NAME
Resumen del contenido incluido en la página 9
5 Zpool Configuration Sun Microsystems, Inc. The next step was adding two spare drives. Lastly, we checked the pool status and verified the availability of the zmanda pool for configuring ZFS. RAIDZ2 is a natural choice for a backup server, which contains information vital to business operations. RAIDZ2 can survive up to two drive failures, regardless of whether they are due to corrupt data coming off the drives, a physical failure of the drives, or drives that are missing. With a suitably l
Resumen del contenido incluido en la página 10
6 ZRM Configuration Sun Microsystems, Inc. The dependency packages provided are as follows: • SMCcoreu • CSWgcc3corert • CSWgcc3g++rt • SMCgpgme • SMCgrep • SMClgcc346 • SMClgpger • SMCliconv • SMClintl • SMCpcre • SMCsudo • SMCtar These packages are also available from Sunfreeware at http://sunfreeware.org and from Blastwave at http://blastwave.org. Once the archive have been downloaded, use the gtar(1M) command to extract the prerequisite packages. Next, use the pkgadd(1M) utilit
Resumen del contenido incluido en la página 11
7 ZRM Configuration Sun Microsystems, Inc. The following software components are installed: • The ZRM for MySQL software • Zmanda Management Console with MySQL, PHP, Apache, PHPmyadmin, Perl and various Perl modules and their dependencies. These are installed under the /opt/zmanda/zrm and /opt/zmanda/common directories. Zmanda Management Console In addition to a powerful command line interface (CLI), ZRM also provides the Zmanda Management Console (ZMC). ZMC is a browser-based user interfac
Resumen del contenido incluido en la página 12
8 Sun Microsystems, Inc. • Backup time and parameters for backup-level scheduling • (OPTIONAL) Snapshot technology used to make backups • (OPTIONAL) Local storage location of snapshots for near-CDP protection of MySQL databases Each backup set contains at least one database or database table. Backup sets are easy to copy, add, and modify. All backup, reporting, monitoring, and restore actions are performed on the backup sets. This enables the backup administrator to abstract the backup policie
Resumen del contenido incluido en la página 13
9 Sun Microsystems, Inc. Note: For many ZMC forms, the fields change depending on the context; selecting different values can change the options that are displayed. For example, if you choose to back up the MySQL cluster, Backup What displays options that are different from what is shown in Figure 2. The Server Parameters section lets you specify the connection details for the MySQL server to back up. Choosing Port lets you enter a port number for communication with the MySQL server; choosin
Resumen del contenido incluido en la página 14
10 Sun Microsystems, Inc. Configuring Storage Figure 4 shows the Backup Where page, which specifies where the backup images for the backup set will be stored and how long to retain them. Figure 3. Backup Where Page for Configuring Storage Regardless of where the remote MySQL server is hosted, backups are stored under the backup directory of the local machine where ZMC runs. The default is /var/lib/mysql-zrm. If you specify another directory, you must create it yourself on both the ZRM serve
Resumen del contenido incluido en la página 15
11 Configuring Storage Sun Microsystems, Inc. ZMC creates temporary files and directories during backup on both the ZRM server and the MySQL server. The temporary directory specified here should exist on both machines, and should have sufficient space to hold at least one full backup on the MySQL server during backup and on the backup host during restore, plus 10%. How much space this requires in practice depends on the backup method. If mysqlhotcopy or the InnoDB Hot Backup plug-in are use
Resumen del contenido incluido en la página 16
12 Configuring ZFS Snapshots Sun Microsystems, Inc. To take advantage of ZFS snapshots, all MySQL database files (data, log, indexes) belonging to the backup set must be stored in ZFS volumes to ensure consistency. If any of the files are not on ZFS volumes, a raw backup (using mysqlhotcopy) or a logical backup (using mysqldump) is performed, depending on the storage engines of the tables in each of the databases. Refer to the ZFS documentation mentioned in the “For More Information” section
Resumen del contenido incluido en la página 17
13 Configuring ZFS Snapshots Sun Microsystems, Inc. ZRM Monitoring and Reporting The complexity of backup operations for MySQL databases makes it difficult to estimate how well you meet the business objectives of data protection. The comprehensive monitoring and backup reporting provided by ZRM helps you to ensure your MySQL data is protected well. Figure 5 shows the Monitor page. Figure 5. Monitor Page Showing Backup Progress Figure 6 shows the Summary view on the Reports page with an easy-t
Resumen del contenido incluido en la página 18
14 ZRM Monitoring and Reporting Sun Microsystems, Inc. Figure 6. Calendar View of Recent Backup Reports ZRM provides nine pre-defined reports, all of which can be easily customized: • Backup report • Backup application performance report • Backup status report • Backup methods report • Backup retention policies report • Backup performance report • Incremental backup report • Backup replication report • Cluster backup report In addition to the pre-defined reports, you can create and save for futu
Resumen del contenido incluido en la página 19
15 Database Events Viewer Sun Microsystems, Inc. The date and time of each database event is shown as an individual record. You can easily scroll through the entries and search the logs with queries. Using the search, you can locate any event that caused harm to your database. You can also jump to a given date and timestamp. To help you navigate through events, there is a special vertical, orange tool bar to the left of the date and timestamps in the database events list. As you move your
Resumen del contenido incluido en la página 20
16 Recovery Using ZMC Sun Microsystems, Inc. After selecting what to restore from, choose a recovery point objective (RPO). ZRM catalogs all full and incremental backups performed. When you request a point-in-time restore, ZRM automatically finds the full backup and all the incremental backups required to restore your database to the requested RPO. ZRM allows you to restore to a point in time regardless of whether logical-, raw-, or snapshot-based backup was executed; the only requirement is