使用innobackupex备份时报错

环境:


OS:linux 6.4

数据库:maraidb 10

xtrabackup:2.1.9



 innobackupex  --user=root --password=root  --defaults-file=/home/mariadb/my.cnf  /home/mariadb/backup

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.


Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p


141017 08:54:11  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/home/mariadb/my.cnf;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
141017 08:54:11  innobackupex: Connected to MySQL server
141017 08:54:11  innobackupex: Executing a version check against the server...
141017 08:54:11  innobackupex: Done.
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 10.0.13-MariaDB-log


innobackupex: Created backup directory /backup/blog/data/2014-10-17_08-54-11


141017 08:54:11  innobackupex: Starting ibbackup with command: xtrabackup_56  --defaults-file="/home/mariadb/my.cnf"  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backup/blog/data/2014-10-17_08-54-11 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=4160) to suspend
innobackupex: Suspend file '/backup/blog/data/2014-10-17_08-54-11/xtrabackup_suspended_2'


xtrabackup_56 version 2.1.9 for MySQL server 5.6.17 Linux (x86_64) (revision id: 744)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to 
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = /home/mariadb/data
xtrabackup:   innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = /home/mariadb/data
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 5242880
>> log scanned up to (1633080)
2014-10-17 08:54:12 7ff2ecf94720  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2622.
[mysql@mysql1 ~]$ exit


后来通过多种方法排除还是不行,看错误应该是和权限有关,经过在google上面搜索,尝试用root备份,果然成功了。


[root@mysql1 xtrabackup_el6]# innobackupex  --user=root --password=root  --defaults-file=/home/mariadb/my.cnf  /


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.


Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p


141017 08:57:08  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/home/mariadb/my.cnf;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
141017 08:57:08  innobackupex: Connected to MySQL server
141017 08:57:08  innobackupex: Executing a version check against the server...
141017 08:57:08  innobackupex: Done.
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 10.0.13-MariaDB-log


innobackupex: Created backup directory /backup/blog/data/2014-10-17_08-57-08


141017 08:57:08  innobackupex: Starting ibbackup with command: xtrabackup_56  --defaults-file="/home/mariadb/my.cnf"  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backup/blog/data/2014-10-17_08-57-08 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=4192) to suspend
innobackupex: Suspend file '/backup/blog/data/2014-10-17_08-57-08/xtrabackup_suspended_2'


xtrabackup_56 version 2.1.9 for MySQL server 5.6.17 Linux (x86_64) (revision id: 744)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to 
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = /home/mariadb/data
xtrabackup:   innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = /home/mariadb/data
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 5242880
>> log scanned up to (1633080)
[01] Copying /home/mariadb/data/ibdata1 to /backup/blog/data/2014-10-17_08-57-08/ibdata1
[01]        ...done
>> log scanned up to (1633080)
xtrabackup: Creating suspend file '/backup/blog/data/2014-10-17_08-57-08/xtrabackup_suspended_2' with pid '4192'


141017 08:57:10  innobackupex: Continuing after ibbackup has suspended
141017 08:57:10  innobackupex: Starting to lock all tables...
>> log scanned up to (1633080)
141017 08:57:10  innobackupex: All tables locked and flushed to disk


141017 08:57:10  innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '.'
141017 08:57:10  innobackupex: Finished backing up non-InnoDB tables and files


141017 08:57:10  innobackupex: Waiting for log copying to finish


xtrabackup: The latest check point (for incremental): '1633080'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1633080)


xtrabackup: Creating suspend file '/backup/blog/data/2014-10-17_08-57-08/xtrabackup_log_copied' with pid '4192'
xtrabackup: Transaction log of lsn (1633080) to (1633080) was copied.
141017 08:57:11  innobackupex: All tables unlocked


innobackupex: Backup created in directory '/backup/blog/data/2014-10-17_08-57-08'
innobackupex: MySQL binlog position: filename 'mysql-bin.000024', position 326
141017 08:57:11  innobackupex: Connection to database server closed
141017 08:57:11  innobackupex: completed OK!




由于权限问题,导致备份测试失败,,,下面继续测试,,,,


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值