Taking backup remotely using innobackupex

*爱你&永不变心* 提交于 2019-12-01 03:41:19

I suspect you are confusing innobackupex with something like mysqldump. The former backs up the actual table files, while the latter connects to the database server and pulls the data.

Since it is trying to backup the database files it will of course need access to the filesystem on the database server, and can't be run remotely.

What you can do is stream the contents of the backup to a remote machine:

innobackupex --stream=tar ./ | ssh user@desthost "cat - > /data/backups/backup.tar"

Or just save the resulting backup file onto a different server with the method of your choice (e.g. shared drive, scp, rsync)

I have the same needs, and I use nfs to solve it.

mysql on server A, and i want to backup to server B.


on server A mount server B's directory /data/mysql_data:
[root@server_a ~]# mount -t nfs server_b:/data/mysql_data /mysql_data_server_b
and then jest point the output to mysql_data_server_b;


nfs environment is needed: yum install -y nfs-utils

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!