重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2624|回复: 1
打印 上一主题 下一主题

XtraBackup 2.2.8 安装

[复制链接]
跳转到指定楼层
楼主
发表于 2015-4-22 19:09:10 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

一、XtraBackup安装

下载地址:http://www.percona.com/downloads/XtraBackup/XtraBackup-2.2.8/source/

安装步骤:

   参考文件:BUILD.XtraBackup.txt,下面的具体的内容:
================================
How to build XtraBackup on Linux
================================

Prerequisites
-------------
$ yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr bison libtool ncurses5-devel Compiling with CMake -------------------- $ cmake -DBUILD_CONFIG=xtrabackup_release && make -j4
Installation ------------ $ make install

  will install all XtraBackup binaries, the innobackupex script and tests to /usr/local/xtrabackup. You can override this either with “make DESTDIR=... install” or by changing the installation layout with “cmake -DINSTALL_LAYOUT=...”.

 

 

如果出现下面报错,需要 yum install crypt* ; yum install libgcrypt*

 
CMake Error at cmake/gcrypt.cmake:25 (MESSAGE):
  Cannot find gcrypt.h in /usr/include;/usr/local/include;/opt/local/include.
  You can use libgcrypt-config --cflags to get the necessary path and pass it
  to CMake with -DGCRYPT_INCLUDE_PATH=<path>
Call Stack (most recent call first):
  storage/innobase/xtrabackup/src/CMakeLists.txt:20 (FIND_GCRYPT)


CMake Error at cmake/gcrypt.cmake:36 (MESSAGE):
  Cannot find libgcrypt shared libraries in
  /usr/lib;/usr/local/lib;/opt/local/lib.  You can use libgcrypt-config
  --libs to get the necessary path and pass it to CMake with
  -DGCRYPT_LIB_PATH=<path>
Call Stack (most recent call first):
  storage/innobase/xtrabackup/src/CMakeLists.txt:20 (FIND_GCRYPT)
 
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2015-4-22 19:18:41 | 只看该作者

最后加上路径:

 

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

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-25 00:32 , Processed in 0.107274 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表