我已经成功地在数据库服务器上运行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.
我可以在另一台机器上运行备份吗? 如果是的话,我还需要安装什么? 谢谢!
不,你不能在另一台机器上运行它,因为它直接读取数据文件,而不是通过mysql服务器进程。
但是,可以在数据库主机上装载另一台计算机的磁盘空间,并将该空间用作备份的目标目录。
如果你使另一台机器成为你想要备份的服务器的mysql slave,你可以在那台机器上使用xtrabackup。