下载xtrabackup
percona-xtrabackup-8.0.22-15.tar.gz
编译
cd percona-xtrabackup-8.0.22-15
mkdir build
cd build
cmake .. -DBUILD_CONFIG=xtrabackup_release -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15 -DMYSQL_CLIENT=1 -DCMAKE_INSTALL_PREFIX=/data1/mycode/mysql_debugpercona-xtrabackup-8.0.22-15/install -DGCRYPT_INCLUDE_PATH=/usr/include
make -j4 && make install
出现的问题及解决
问题:
CMake Error at cmake/build_configurations/xtrabackup_release.cmake:44 (MESSAGE):
aio is required on Linux, you need to install the required library:
Debian/Ubuntu: apt-get install libaio-dev
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
解决:
删除CMakeCache.txt
rm -rf /data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/cmake-build-debug/CMakeCache.txt
libaio-dev包的作用是为了支持同步I/O
apt-get install libaio-dev
问题:
CMake Error at /snap/clion/137/bin/cmake/linux/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
解决:
apt-get install libcurl4-openssl-dev
问题:
CMake Error at cmake/ssl.cmake:61 (MESSAGE):
Please install the appropriate openssl developer package.
解决:
apt install libssl-dev
问题:
CMake Warning at cmake/sasl.cmake:264 (MESSAGE):
Could not find SASL
解决:
apt-get install libsasl2-dev
问题:
CMake Warning at cmake/ldap.cmake:158 (MESSAGE):
Could not find LDAP
解决:
apt-get install slapd ldap-utils
问题:
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>
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>
解决:
apt install crypt*
apt install libgcrypt*
问题:
CMake Error at cmake/libev.cmake:23 (MESSAGE):
Could not find libev on your system
解决:
apt install libev-dev
问题:
CMake Warning at cmake/compile_flags.cmake:36 (MESSAGE):
-DMYSQL_CLIENT should be in COMPILE_DEFINITIONS not COMPILE_FLAGS
解决:
-DMYSQL_CLIENT
物理备份
/data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/cmake-build-debug/bin/xtrabackup -S /data1/mycode/mysql_debug/mysql-8.0.18/mysql_stuff/data/mysql.sock --user=root --password=devin --parallel=3 --tmpdir=/data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/data --stream=xbstream --backup |gzip - > /data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/data/full.xbstream.gz
解压
/data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/cmake-build-debug/bin/xbstream -x < /data1/mycode/mysql_debug/percona-xtrabackup-8.0.22-15/data/full.xbstream
网友评论