innobackupex能远程备份吗

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了innobackupex能远程备份吗相关的知识,希望对你有一定的参考价值。

参考技术A 可以的 加-H 参数 但要注意本地的参数文件要和远程的一致 参考技术B 生产环境究竟是使用mysqldump还是xtrabackup来备份与恢复数据库 root@client2:/var/lib/my;total77860;drwx------8mysqlmysql409;drwxr-xr-x38rootroot4096;-rw-r--r--1rootroot0Jan5;drwx------2mysqlmysql409;-rw-rw----1mysqlmysql692...本回答被提问者和网友采纳

innobackupex 远程备份

应用于DC1 -> DC2

或者 mysql replication



DC2,接收端:

监听接口1234

nc -l 1234 | tar ixvf - 2> xtrabackup.log

[email protected]:/script/slave# nc -l 1234 | tar ixvf - 2> xtrabackup.log


DC1,发送端,备份端


innobackupex --defaults-file=/data/3308/my.cnf --user=root --password=123456 --stream=tar ./ |  nc 192.168.134.130 1234


[[email protected] backup]# innobackupex --defaults-file=/data/3308/my.cnf --user=root --password=123456 --slave-info  --stream=tar ./ |  nc 192.168.134.130 1234


170619 16:57:07 [01] Streaming ./pcik_log_dep/t_redbag_get.frm to <STDOUT>

170619 16:57:07 [01]        ...done

170619 16:57:07 [01] Streaming ./pcik_log_dep/t_trade.frm to <STDOUT>

170619 16:57:07 [01]        ...done

170619 16:57:07 [01] Streaming ./pcik_log_dep/t_mail_del.frm to <STDOUT>

170619 16:57:07 [01]        ...done

170619 16:57:07 Finished backing up non-InnoDB tables and files

170619 16:57:07 [00] Streaming xtrabackup_slave_info

170619 16:57:07 [00]        ...done

170619 16:57:07 [00] Streaming xtrabackup_binlog_info

170619 16:57:07 [00]        ...done

170619 16:57:07 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...

xtrabackup: The latest check point (for incremental): ‘370373412‘

xtrabackup: Stopping log copying thread.

.170619 16:57:07 >> log scanned up to (370373421)


170619 16:57:07 Executing UNLOCK TABLES

170619 16:57:07 All tables unlocked

170619 16:57:07 [00] Streaming ib_buffer_pool to <STDOUT>

170619 16:57:07 [00]        ...done

170619 16:57:07 Backup created in directory ‘/backup‘

MySQL binlog position: filename ‘mysql-bin.000017‘, position ‘4497‘

MySQL slave binlog position: master host ‘127.0.0.1‘, filename ‘mysql-bin.000028‘, position ‘154‘

170619 16:57:07 [00] Streaming backup-my.cnf

170619 16:57:07 [00]        ...done

170619 16:57:07 [00] Streaming xtrabackup_info

170619 16:57:07 [00]        ...done

xtrabackup: Transaction log of lsn (370373412) to (370373421) was copied.

170619 16:57:07 completed OK!


出现completed OK! 代表备份完成



以上是关于innobackupex能远程备份吗的主要内容,如果未能解决你的问题,请参考以下文章

innobackupex 远程备份

xtrabackup能同时备份myisam和innodb吗

mysql数据库迁移多端口运行innobackupex备份

mysql 远程备份

mysql热备份完全备份

xtrabackup的使用