问题
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