Install bitsCN.com in xtrabackup-2.1.2-611
Xtrabackup-2.1.2-611 download link:
Wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.2/binary/Linux/x86_64/percona-xtrabackup-2.1.2-611.tar.gz
Install the dependent packages required for compilation
Yum install libaio-devel perl-Time-HiRes curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel perl-ExtUtils-MakeMaker perl-DBD-MySQL. * package-y
Tar xvf percona-xtrabackup-2.1.2-611.tar.gz
Cd/percona-xtrabackup-2.1.2/bin/
[Root @ CcTalk-DB bin] # ll
Total 112420
-Rwxr-xr-x 1 root 110729 May 18 innobackupex
Lrwxrwxrwx 1 root 12 Aug 23 13:25 innobackupex-1.5.1-> innobackupex
-Rwxr-xr-x 1 root 2211237 May 18 xbcrypt
-Rwxr-xr-x 1 root 2285672 May 18 xbstream
-Rwxr-xr-x 1 root 13033745 May 18 xtrabackup
-Rwxr-xr-x 1 root 16333506 May 18 xtrabackup_55
-Rwxr-xr-x 1 root 80988093 May 18 xtrabackup_56
[Root @ CcTalk-DB bin] #
3. copy files such as innobackupex and xtrabackup to the/bin and Directory of the mysql program.
Cp */usr/local/mysql/bin/
4. soft link the files in the mysql installation directory to the/usr/bin/directory. This is more convenient than variables, so deployment and installation are completed !!!
Ln-s/usr/local/mysql/bin/*/usr/bin/
5. verification:
Run the following command and press the tab key to automatically complete the association!
[Root @ slave1 ~] # Innobackupex
Innobackupex-1.5.1 innobackupex
[Root @ slave1 ~] # Xtrabackup
Xtrabackup xtrabackup_55 xtrabackup_56
[Root @ CcTalk-DB bin] # innobackupex -- help
Options:
-- Apply-log
Prepare a backup in BACKUP-DIR by applying the transaction log file
Named "xtrabackup_logfile" located in the same directory. Also,
Create new transaction logs. The InnoDB configuration is read from
The file "backup-my.cnf ".
-- Compact
Create a compact backup with all secondary index pages omitted. This
Option is passed directly to xtrabackup. See xtrabackup
Documentation for details.
-- Compress
This option instructs xtrabackup to compress backup copies of InnoDB
Data files. It is passed directly to the xtrabackup child process.
Try 'xtrabackup -- help' for more details.
-- Compress-threads
This option specifies the number of worker threads that will be used
For parallel compression. It is passed directly to the xtrabackup
Child process. Try 'xtrabackup -- help' for more details.
-- Compress-chunk-size
This option specifies the size of the internal working buffer
Each compression thread, measured in bytes. It is passed directly
The xtrabackup child process. Try 'xtrabackup -- help' for more
Details.
-- Copy-back
Copy all the files in a previusly made backup from the backup
Directory to their original locations.
-- Databases = LIST
This option specifies the list of databases that innobackupex shocould
Back up. The option accepts a string argument or path to file that
Contains the list of databases to back up. The list is of the form
"Databasename1 [. table_name1] databasename2 [. table_name2]...". If
This option is not specified, all databases containing MyISAM and
InnoDB tables will be backed up. Please make sure that -- databases
Contains all of the InnoDB databases and tables, so that all of
Innodb. frm files are also backed up. In case the list is very long,
This can be specified in a file, and the full path of the file can
Be specified instead of the list. (See option -- tables-file .)
-- Debug-sleep-before-unlock = SECONDS
This is a debug-only option used by the XtraBackup test suite.
-- Defaults-file = [MY. CNF]
This option specifies what file to read the default MySQL options
From. The option accepts a string argument. It is also passed
Directly to xtrabackup's -- defaults-file option. See the xtrabackup
Documentation for details.
-- Defaults-extra-file = [MY. CNF]
This option specifies what extra file to read the default MySQL
Options from before the standard defaults-file. The option accepts
String argument. It is also passed directly to xtrabackup's
-- Defaults-extra-file option. See the xtrabackup documentation
Details.
-- Encrypt = ENCRYPTION_ALGORITHM
This option instructs xtrabackup to encrypt backup copies of InnoDB
Data files using the algorithm specified in
ENCRYPTION_ALGORITHM. It is passed directly to the xtrabackup child
Process. Try 'xtrabackup -- help' for more details.
-- Encrypt-key = ENCRYPTION_KEY
This option instructs xtrabackup to use the given ENCRYPTION_KEY
When using the -- encrypt option. It is passed directly to
Xtrabackup child process. Try 'xtrabackup -- help' for more details.
-- Encrypt-key-file = ENCRYPTION_KEY_FILE
This option instructs xtrabackup to use the encryption key stored in
The given ENCRYPTION_KEY_FILE when using the -- encrypt option. It is
Passed directly to the xtrabackup child process. Try 'xtrabackup
-- Help' for more details.
-- Encrypt-threads
This option specifies the number of worker threads that will be used
For parallel encryption. It is passed directly to the xtrabackup
Child process. Try 'xtrabackup -- help' for more details.
-- Encrypt-chunk-size
This option specifies the size of the internal working buffer
Each encryption thread, measured in bytes. It is passed directly
The xtrabackup child process. Try 'xtrabackup -- help' for more
Details.
-- Export
This option is passed directly to xtrabackup's -- export option. It
Enables exporting inpidual tables for import into another server.
See the xtrabackup documentation for details.
-- Extra-lsndir = DIRECTORY
This option specifies the directory in which to save an extra copy
Of the "xtrabackup_checkpoints" file. The option accepts a string
Argument. It is passed directly to xtrabackup's -- extra-lsndir
Option. See the xtrabackup documentation for details.
-- Galera-info
This options creates the xtrabackup_galera_info file which contians
The local node state at the time of the backup. Option shocould be
Used when login Ming the backup of Percona-XtraDB-Cluster.
-- Help
This option displays a help screen and exits.
-- Host = HOST
This option specifies the host to use when connecting to
Database server with TCP/IP. The option accepts a string argument.
It is passed to the mysql child process without alteration. See
Mysql -- help for details.
-- Ibbackup = IBBACKUP-BINARY
This option specifies which xtrabackup binary shocould be used.
Option accepts a string argument. IBBACKUP-BINARY shocould be
Command used to run XtraBackup. The option can be useful if
Xtrabackup binary is not in your search path or working directory.
If this option is not specified, innobackupex attempts to determine
The binary to use automatically. By default, "xtrabackup" is
Command used. However, when option -- copy-back is specified,
"Xtrabackup_51" is the command used. And when option -- apply-log is
Specified, the binary is used whose name is in the file
"Xtrabackup_binary" in the backup directory, if that file exists.
-- Include = REGEXP
This option is a regular expression to be matched against table
Names in databasename. tablename format. It is passed directly
Xtrabackup's -- tables option. See the xtrabackup documentation
Details.
-- Incremental
This option tells xtrabackup to create an incremental backup, rather
Than a full one. It is passed to the xtrabackup child process. When
This option is specified, either -- incremental-lsn or
-- Incremental-basedir can also be given. If neither option is given,
Option -- incremental-basedir is passed to xtrabackup by default, set
To the first timestamped backup directory in the backup base
Directory.
-- Incremental-basedir = DIRECTORY
This option specifies the directory containing the full backup that
Is the base dataset for the incremental backup. The option accepts
String argument. It is used with the -- incremental option.
-- Incremental-dir = DIRECTORY
This option specifies the directory where the incremental backup
Will be combined with the full backup to make a new full backup.
Option accepts a string argument. It is used with the -- incremental
Option.
-- Incremental-force-scan
This options tells xtrabackup to perform full scan of data files
Taking an incremental backup even if full changed page bitmap data
Is available to enable the backup without the full scan.
-- Log-copy-interval
This option specifies time interval between checks done by log
Copying thread in milliseconds.
-- Incremental-lsn
This option specifies the log sequence number (LSN) to use for
Incremental backup. The option accepts a string argument. It is used
With the -- incremental option. It is used instead of specifying
-- Incremental-basedir. For databases created by MySQL and Percona
Server 5.0-series versions, specify the LSN as two 32-bit integers
In high: low format. For databases created in 5.1 and later, specify
The LSN as a single 64-bit integer.
-- Move-back
Move all the files in a previusly made backup from the backup
Directory to the actual datadir location. Use with caution, as it
Removes backup files.
-- No-lock
Use this option to disable table lock with "FLUSH TABLES WITH READ
LOCK ". Use it only if ALL your tables are InnoDB and you DO NOT CARE
About the binary log position of the backup. This option shouldn't
Be used if there are any DDL statements being executed or if any
Updates are happening on non-InnoDB tables (this includes des the system
MyISAM tables in the mysql database), otherwise it cocould lead to
Inconsistent backup. If you are considering to use -- no-lock because
Your backups are failing to acquire the lock, this cocould be because
Of incoming replication events preventing the lock from succeeding.
Please try using -- safe-slave-backup to momentarily stop
Replication slave thread, this may help the backup to succeed and
You then don't need to resort to using this option.
-- No-timestamp
This option prevents creation of a time-stamped subdirectory of
BACKUP-ROOT-DIR given on the command line. When it is specified,
Backup is done in BACKUP-ROOT-DIR instead.
-- Parallel = NUMBER-OF-THREADS
This option specifies the number of threads the xtrabackup child
Process shocould use to back up files concurrently. The option accepts
An integer argument. It is passed directly to xtrabackup's
-- Parallel option. See the xtrabackup documentation for details.
-- Password = WORD
This option specifies the password to use when connecting to
Database. It accepts a string argument. It is passed to the mysql
Child process without alteration. See mysql -- help for details.
-- Port = PORT
This option specifies the port to use when connecting to
Database server with TCP/IP. The option accepts a string argument.
It is passed to the mysql child process. It is passed to the mysql
Child process without alteration. See mysql -- help for details.
-- Rebuild-indexes
This option only has effect when used together with the -- apply-log
Option and is passed directly to xtrabackup. When used, makes
Xtrabackup rebuild all secondary indexes after applying the log.
This option is normally used to prepare compact backups. See
XtraBackup manual for more information.
-- Rebuild-threads
This option only has effect when used together with the -- apply-log
And -- rebuild-indexes option and is passed directly to xtrabackup.
When used, xtrabackup processes tablespaces in parallel with
Specified number of threads when rebuilding indexes. See
XtraBackup manual for more information.
-- Redo-only
This option shoshould be used when preparing the base full backup and
When merging all incrementals failed t the last one. This option is
Passed directly to xtrabackup's -- apply-log-only option. This forces
Xtrabackup to skip the "rollback" phase and do a "redo" only. This
Is necessary if the backup will have incremental changes applied
It later. See the xtrabackup documentation for details.
-- Rsync
Uses the rsync utility to optimize local file transfers. When this
Option is specified, innobackupex uses rsync to copy all non-InnoDB
Files instead of spawning a separate cp for each file, which can be
Much faster for servers with a large number of databases or tables.
This option cannot be used together with -- stream.
-- Safe-slave-backup
Stop slave SQL thread and wait to start backup
Slave_open_temp_tables in "show status" is zero. If there are no
Open temporary tables, the backup will take place, otherwise the SQL
Thread will be started and stopped until there are no open temporary
Tables. The backup will fail if Slave_open_temp_tables does not
Become zero after -- safe-slave-backup-timeout seconds. The slave SQL
Thread will be restarted when the backup finishes.
-- Safe-slave-backup-timeout
How many seconds -- safe-slave-backup shocould wait
Slave_open_temp_tables to become zero. (default 300)
-- Slave-info
This option is useful when backing up a replication slave server. It
Prints the binary log position and name of the master server. It
Also writes this information to the "xtrabackup_slave_info" file
A "change master" command. A new slave for this master can be set up
By starting a slave server on this backup and issuing a "CHANGE
MASTER "command with the binary log position saved in
"Xtrabackup_slave_info" file.
-- Socket = SOCKET
This option specifies the socket to use when connecting to the local
Database server with a UNIX domain socket. The option accepts
String argument. It is passed to the mysql child process
Alteration. See mysql -- help for details.
-- Stream = STREAMNAME
This option specifies the format in which to do the streamed backup.
The option accepts a string argument. The backup will be done
STDOUT in the specified format. Currently, the only supported
Formats are tar and xbstream. This option is passed directly
Xtrabackup's -- stream option.
-- Tables-file = FILE
This option specifies the file in which there are a list of names
The form database. The option accepts a string argument. table, one
Per line. The option is passed directly to xtrabackup's
-- Tables-file option.
-- Throttle = IOS
This option specifies a number of I/O operations (pairs
Read + write) per second. It accepts an integer argument. It is passed
Directly to xtrabackup's -- throttle option.
-- Tmpdir = DIRECTORY
This option specifies the location where a temporary file will be
Stored. The option accepts a string argument. It shocould be used when
-- Stream is specified. For these options, the transaction log will
First be stored to a temporary file, before streaming. This option
Specifies the location where that temporary file will be stored. If
The option is not specified, the default is to use the value
Tmpdir read from the server configuration.
-- Use-memory = B
This option accepts a string argument that specifies the amount
Memory in bytes for xtrabackup to use for crash recovery while
Preparing a backup. Multiples are supported providing the unit (e.g.
1 MB, 1 GB). It is used only with the option -- apply-log. It is passed
Directly to xtrabackup's -- use-memory option. See the xtrabackup
Documentation for details.
-- User = NAME
This option specifies the MySQL username used when connecting to
Server, if that's not the current user. The option accepts a string
Argument. It is passed to the mysql child process
Alteration. See mysql -- help for details.
-- Defaults-group = GROUP-NAME
This option specifies the group name in my. cnf which shocould be used.
This is needed for mysqld_multi deployments.
-- Version
This option displays the xtrabackup version and copyright notice and
Then exits.
[Root @ CcTalk-DB bin] #
BitsCN.com