简体   繁体   中英

Data Copy From one db server to another db server in java

For auditing purpose i need to copy data from one MYSQL db server to another. I don't want following solutions

1. mysqldump

2. Select from one location and insert to another

And my requirements are

1.Data transfer should be fast

2.Structure of both db is different

plz suggest some options

Are you using some kind of ORM? Hibernate maybe?. All in all workflow should be the same no mather how are you going to achieve this and is as follows:

  1. Fetch some data from source DB(maybe single row with it's all associations.
  2. Transform data into new database model
  3. Save new modeled data into new database.

For fast transfer I would suggest to dump old DB, and create temporary instance on machine where your new DB server is located. Mysql provides fast serverside transfer od DB dumps between MySQL server instances.

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