我可以在我的桌面上运行 Percona xtrabackup 吗?

我可以在我的桌面上运行 Percona xtrabackup 吗?

我已成功在数据库服务器上运行 xtracbackup,但我真的想在另一台机器上运行备份(不是运行 MySQL 的机器)。
我尝试在给定主机/端口选项的情况下在桌面上运行 xtrabackup 工具,但出现以下错误:

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

150424 16:40:59  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=192.168.33.10;port=3306' as 'vagrant'  (using password: YES).
150424 16:40:59  innobackupex: Connected to MySQL server
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql server version 5.6.22-72.0

innobackupex: Created backup directory /home/WorkSpace/xtrabackup

150424 16:40:59  innobackupex: Starting ibbackup with command: xtrabackup  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/tmp --tmpdir=/tmp --extra-lsndir='/tmp' --stream=tar
innobackupex: Waiting for ibbackup (pid=10463) to suspend
innobackupex: Suspend file '/tmp/xtrabackup_suspended_2'

xtrabackup version 2.2.3 based on MySQL server 5.6.17 Linux (x86_64) (revision id: )
xtrabackup: uses posix_fadvise().
xtrabackup: Can't change dir to '/var/lib/mysql' (Errcode: 2 - No such file or directory)
xtrabackup: cannot my_setwd /var/lib/mysql
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2672.

我可以在另一台机器上运行备份吗?如果可以,我还需要安装什么?谢谢!

答案1

不,您不能在另一台机器上运行它,因为它直接读取数据文件,而不是通过 mysql 服务器进程。

但是,您可以在数据库主机上挂载另一台机器的磁盘空间,并使用该空间作为备份的目标目录。

答案2

如果您将另一台机器作为要备份的服务器的 mysql 从属机器,则可以在该机器上使用 xtrabackup。

相关内容