innobackupex mysql备份及恢复(全量和增量)

本文详细介绍了如何在Ubuntu 12.04.5 LTS环境下使用innobackupex进行MySQL的全量和增量备份及恢复。全量备份完成后,可通过指定参数加速备份过程。恢复时,需确保MySQL数据目录为空,依次执行应用日志、拷贝文件和修改权限等步骤。增量备份基于全量备份,并通过检查点文件跟踪备份状态,增量恢复时需依次应用所有增量日志。
摘要由CSDN通过智能技术生成

环境:

Ubuntu 12.04.5 LTS
mysql 5.5.47
备份路径 /backup/

安装

 apt-get install percona-xtrabackup

一、 全量备份

root@iZu1dc59z8tZ:/var/lib# innobackupex --defaults-file=/etc/mysql/my.cnf --user=root --password=123123 /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/ubuntu

160217 11:17:53  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/mysql/my.cnf;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
160217 11:17:53  innobackupex: Connected to MySQL server
160217 11:17:53  innobackupex: Executing a version check against the server...
160217 11:17:53  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.5.47-0ubuntu0.14.04.1

innobackupex: Created backup directory /backup/2016-02-17_11-17-53

160217 11:17:53  innobackupex: Starting ibbackup with command: xtrabackup_55  --defaults-file="/etc/mysql/my.cnf"  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backup/2016-02-17_11-17-53 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=30486) to suspend
innobackupex: Suspend file '/backup/2016-02-17_11-17-53/xtrabackup_suspended_2'

xtrabackup_55 version 2.1.8 for Percona Server 5.5.35 Linux (x86_64) (revision id: undefined)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = ./
xtrabackup:   innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 5242880
>> log scanned up to (3233814)
[01] Copying ./ibdata1 to /backup/2016-02-
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值