innobackupex参数之--incremental

来源:互联网 发布:通达信主图源码 编辑:程序博客网 时间:2024/06/05 17:58

--incremental

增量备份,前提是之前至少有一次全备份,否则报错:

innobackupex --user=root --password=123456 --parallel=16 --incremental /tmpUse of uninitialized value $inc_dir in scalar chomp at /usr/local/bin/innobackupex line 3870.
增量备份要与之前全备的目录要一致,否则报错:

innobackupex --user=root --password=123456 --parallel=16 --incremental /home/mysql/bakup/InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.Get the latest version of Percona XtraBackup, documentation, and help resources:http://www.percona.com/xb/p150817 11:38:13  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/home/mysql/run/mysql.sock' as 'root'  (using password: YES).150817 11:38:13  innobackupex: Connected to MySQL server150817 11:38:13  innobackupex: Executing a version check against the server...150817 11:38:13  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 5.6.21-loginnobackupex: Created backup directory /home/mysql/bakup/2015-08-17_11-38-13150817 11:38:14  innobackupex: Starting ibbackup with command: xtrabackup_56  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/home/mysql/bakup/2015-08-17_11-38-13 --tmpdir=/tmp --incremental-basedir='/home/mysql/bakup/dcqz.log' --parallel=16innobackupex: Waiting for ibbackup (pid=6010) to suspendinnobackupex: Suspend file '/home/mysql/bakup/2015-08-17_11-38-13/xtrabackup_suspended_2'xtrabackup: Error: cannot open /home/mysql/bakup/dcqz.log/xtrabackup_checkpointsxtrabackup: error: failed to read metadata from /home/mysql/bakup/dcqz.log/xtrabackup_checkpointsinnobackupex: Error: The xtrabackup child process has died at /usr/local/bin/innobackupex line 2642.
此问题的另一种解决方式:添加--incremental-basedir参数来指定之前全备份目录,如:

innobackupex --user=root --password=123456 --parallel=16 --incremental --incremental-basedir=/tmp/2015-08-17_11-28-10 /home/mysql/bakup/




0 0
原创粉丝点击