简体   繁体   中英

how do i automatically backup mysql database from remote center using the internet to another database

嗨,我是一名初学者应用程序开发人员,在我的新工作中,我被委托设计一种体系结构,该体系结构允许我使用Internet将来自3个不同地理位置的中心的MySQL数据库的数据自动备份到中央数据库,有人可以指出我吗?正确的方向,以及是否有可能以编程方式解决诸如此类的问题。谢谢

If you just want to backup the actual data, a combination of mysqldump, gzip, and scp will move a backup of the database to a remote location. Or you can use database replication.

If what you want to do is merge the data from 3 sources into another database, thats an entirely different problem from backing up.

Have them each backup locally, then download them using ftp or something.

For merging you need to restore then each to there own db, Then create an empty schema with the same table structure. Each table gets an additional Field for "SourceSystem"

then Load each DB in the Central DB then while updating the "SourceSystem" field. The "SourceSystem" + the original Pk become the new Pk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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