使用innobackupex远程备份 [英] Taking backup remotely using innobackupex

查看:782
本文介绍了使用innobackupex远程备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用innobackupex从远程计算机进行备份.

I am trying to take backup from a remote machine using innobackupex.

./innobackupex --host=<mysql_server> --user=<username> <backup_dir>.

由于无法在服务器中找到目录而失败.

Its failing as it is unable to locate a directory in the server.

 (Errcode: 2 - No such file or directory)

我假设它正在本地计算机中搜索目录. 请让我知道如何远程运行备份?

I am assuming it is searching for the directory in the local machine. Please let me know how can we run the backup remotely ?

推荐答案

我怀疑您将innobackupex与类似mysqldump的东西混淆了.前者备份实际的表文件,而后者连接到数据库服务器并提取数据.

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.

您可以做的是流备份内容到远程计算机:

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

或者只是使用您选择的方法将生成的备份文件保存到其他服务器上(例如共享驱动器,scprsync)

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

这篇关于使用innobackupex远程备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆