最后加上路径:
export PATH=$PATH:/usr/local/xtrabackup/bin
[root@sztech1 ~]# xtrabackup xtrabackup version 2.2.8 based on MySQL server 5.6.22 Linux (x86_64) (revision id: ) Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2013 Percona LLC and/or its affiliates. Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt
Usage: [xtrabackup [--defaults-file=#] --backup | xtrabackup [--defaults-file=#] --prepare] [OPTIONS]
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/local/xtrabackup/etc/my.cnf ~/.my.cnf The following groups are read: mysqld xtrabackup The following options may be given as the first argument: --print-defaults Print the program argument list and exit. --no-defaults Don't read default options from any option file, except for login file. --defaults-file=# Only read default options from the given file #. --defaults-extra-file=# Read this file after the global files are read. --defaults-group-suffix=# Also read groups with concat(group, suffix) --login-path=# Read this path from the login file. -v, --version print xtrabackup version information --target-dir=name destination directory --backup take backup to target-dir --stats calc statistic of datadir (offline mysqld is recommended) --tables-file=name filtering by list of the exact database.table name in the file. --databases=name filtering by list of databases. --databases-file=name filtering by list of databases in the file. --create-ib-logfile ** not work for now** creates ib_logfile* also after '--prepare'. ### If you want create ib_logfile*, only re-execute this command in same options. ### -h, --datadir=name Path to the database root. -t, --tmpdir=name Path for temporary files. Several paths may be specified, separated by a colon (:), in this case they are used in a round-robin fashion. --parallel=# Number of threads to use for parallel datafiles transfer. Does not have any effect in the stream mode. The default value is 1. --stream=name Stream all backup files to the standard output in the specified format. Currently the only supported format is 'tar'. --compress[=name] Compress individual backup files using the specified compression algorithm. Currently the only supported algorithm is 'quicklz'. It is also the default algorithm, i.e. the one used when --compress is used without an argument. --compress-threads=# Number of threads for parallel data compression. The default value is 1. --compress-chunk-size=# Size of working buffer(s) for compression threads in bytes. The default value is 64K. --encrypt=name Encrypt individual backup files using the specified encryption algorithm. --encrypt-key=name Encryption key to use. --encrypt-key-file=name File which contains encryption key to use. --encrypt-threads=# Number of threads for parallel data encryption. The default value is 1. --encrypt-chunk-size=# Size of working buffer(S) for encryption threads in bytes. The default value is 64K. --log[=name] Ignored option for MySQL option compatibility --innodb[=name] Ignored option for MySQL option compatibility --innodb-adaptive-hash-index Enable InnoDB adaptive hash index (enabled by default). Disable with --skip-innodb-adaptive-hash-index. (Defaults to on; use --skip-innodb-adaptive-hash-index to disable.) --innodb-additional-mem-pool-size=# Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures. --innodb-autoextend-increment=# Data file autoextend increment in megabytes --innodb-buffer-pool-size=# The size of the memory buffer InnoDB uses to cache data and indexes of its tables. --innodb-checksums Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums. (Defaults to on; use --skip-innodb-checksums to disable.) --innodb-log-file-size=# Size of each log file in a log group. --innodb-log-files-in-group=# Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here. --innodb-log-group-home-dir=name Path to InnoDB log files. --innodb-max-dirty-pages-pct=# Percentage of dirty pages allowed in bufferpool. --innodb-open-files=# How many files at the maximum InnoDB keeps open at the same time. --innodb-use-native-aio Use native AIO if supported on this platform. --innodb-page-size=# The universal page size of the database. --innodb-log-block-size=# The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk! --innodb-fast-checksum Change the algorithm of checksum for the whole of datapage to 4-bytes word based. --innodb-doublewrite-file=name Path to special datafile for doublewrite buffer. (default is : not used) --innodb-buffer-pool-filename=name --close-files do not keep files opened. Use at your own risk. --core-file Write core on fatal signals |