tailieunhanh - MySQL High Availability- P10

MySQL High Availability- P10: A lot of research has been done on replication, but most of the resulting concepts are never put into production. In contrast, MySQL replication is widely deployed but has never been adequately explained. This book changes that. Things are explained here that were previously limited to people willing to read a lot of source code and spend a lot of time debugging it in production, including a few late-night sessions. | Restoring data with ibbackup Restoring data requires applying the log described in the previous section. This operation essentially points the MySQL instance to the backup copies of the database. It does not copy the files to the normal MySQL datadir location. If you want to do this you must copy the files manually or use the innobackup script. The reason for this is that the ibbackup utility is designed to refuse to overwrite any data. To start a MySQL instance and use a backup of your data execute a command like the following mysqld -defaults-file home cbell The innobackup script The innobackup file is a Perl script designed to automate many of the operations of ibbackup. It can create backups restore data start a MySQL instance using the data from a backup or copy data index and logfiles from a backup directory back to their original locations. The innobackup script is currently not available for use on Windows. Unlike the ibbackup utility you do not need to specify the commands in a separate configuration file for innobackup. Rather you specify the parameters for the backup or restore using command-line options. These options are described in Table 12-2. Table 12-2. innobackup options Option Function --help --version Displays a list of all options. Displays the version of the script. --apply-log --copy-back Applies the backup log to the backup in preparation for starting a MySQL server with the backup files. Copies data and index files from the backup location to their original locations. --use-memory MB --sleep MS Passed to ibbackup this option controls how much memory is used during restoration. Passed to ibbackup this option causes the utility to pause after every 1 Mb of data is copied. --compress LEVEL --include REGEXP Passed to ibbackup this option provides the compression level to use. Passed to ibbackup this option instructs the process to back up only those table files that match the regular expression. This is used for a selective backup. .

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN