当前位置: 首页 > 工具软件 > XtraBackup > 使用案例 >

Xtrabackup full backup

刘辰钊
2023-12-01

Step:

create full backup:
innobackupex --defaults-file=/etc/my.cnf --user=root --password=mysql /tmp/backup

shutdown mysql:
mysqladmin -uroot -p'mysql' -S /tmp/mysql.sock shutdown


prepare:
innobackupex --defaults-file=/etc/my.cnf --apply-log --redo-only /data/backup/full/2011-06-17_12-04-51 --user=root --password='mysql'

recover:
innobackupex --defaults-file=/etc/my.cnf --copy-back /tmp/backup


startup mysql:
mysqld_safe --defaults-file=/etc/my.cnf &

 

NOTES:

[root@SLAVE bin]# innobackupex --defaults-file=/etc/my.cnf --copy-back /tmp/backup

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012.  All Rights Reserved.

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

IMPORTANT: Please check that the copy-back run completes successfully.
           At the end of a successful copy-back run innobackupex
           prints "completed OK!".

sh: xtrabackup: command not found
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options

SOLUTION:

ln -s /tmp/xtrabackup-1.6.5/mysql-5.1/storage/innobase/xtrabackup/xtrabackup_51 /usr/local/mysql/bin/xtrabackup

 类似资料:

相关阅读

相关文章

相关问答