I'm migrating PostgreSQL RDS instance from AWS located in Frankfurt to the RDS instance in Alibaba Cloud also located in Frankfurt. I use Data Transmission tool from Alibaba Cloud. It connects both DB fine, there are no errors on the connections. The only problem is with versioning:
I've tried downgrading the source DB, but it seems to be impossible. Does anybody have ideas how it could be done?
1 Answer 1
You can downgrade postgresql database from the command line.
Simply extract the database with a
pg_dump --host=... --port=... --dbname=.... --user=.... >dump
command. Then you will have your database in the file dump
in your local directory.
Then insert the dump into your new database with the command
psql --host=... --port=... --dbname=.... --user=.... <dump
It won't work at first. Typically, you will have syntax errors or similar. But get a good text editor, and edit it all out, until it won't be clean.
-
Yes! Thanks, managed to work with this solution.Nikita Zavyalov– Nikita Zavyalov2018年08月22日 08:14:19 +00:00Commented Aug 22, 2018 at 8:14