how do i automatically backup mysql database from remote center using the internet to another database
hi i am a beginner application developer , on my new job i have been commission to design an arc开发者_StackOverflow中文版hitecture that will allow me automatically back up data off MySQL databases from 3 different geographical distant centers using the internet to a central database, can anybody please point me the right direction and if it is possible to solve such as problem programmatically.Thank you
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.
精彩评论