How to use flyway to migrate data from one DB to another DB?

微笑、不失礼 提交于 2019-12-10 10:56:52

问题


I have two postgreSql DB on different server lets say A and B. Can I use flyway some how to copy all data from DB A to B which is newly setup and empty. Its will be helpful if anyone point me to correct direction and tool, requirement is to copy data from one DB to another through some tool automation huge data volume need to consider in solution.


回答1:


Flyway doesn't directly support such a capability. However, you could do the following:

  • As Laurenz says, use pg_dump to extract DB A into a script file
  • Create a Flyway migration script and copy in the contents of the script file
  • Run the Migrate command against DB B


来源:https://stackoverflow.com/questions/57602306/how-to-use-flyway-to-migrate-data-from-one-db-to-another-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!