简体   繁体   English

在本地服务器上自动进行MySQL数据库备份和还原

[英]Automated MySQL DB backup and restore on local server

I have several websites on several hosting packages utilizing several MySQL DBs. 我在几个使用几个MySQL DB的托管程序包上有几个网站。 What I want is to get daily instances of ALL these databases and restore them on a local server. 我想要的是获取所有这些数据库的每日实例,并将它们还原到本地服务器上。 So I will have all my databases locally updated from the online ones. 因此,我将从在线数据库中本地更新所有数据库。 Which is the best way to achieve this. 这是实现此目标的最佳方法。 Thank you. 谢谢。

I am facing the same issue. 我正面临着同样的问题。 My plan is to automate fetching the database backup from a sftp location and then restoring the database in the next location. 我的计划是自动从sftp位置获取数据库备份,然后在下一个位置还原数据库。 There are probably several intermediate steps to make sure this happens, like drop database if exists, etc. But I think it will work. 可能有几个中间步骤可确保这种情况发生,例如删除数据库(如果存在)等。但是我认为它将起作用。 I, like you, don't need database synchronisation. 我和您一样,不需要数据库同步。 My purposes are for data warehousing. 我的目的是用于数据仓库。 The external database is from an external vendor who is willing to share database dumps with me weekly. 外部数据库来自愿意与我每周共享数据库转储的外部供应商。

Hope that helps, your question is quite old now. 希望对您有所帮助,您的问题现在已经很老了。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM