I want to upgrade the postgresql 9.1 database to postgresql 11. First I want to get the data on the remote pg9.1 server with pg_dump from the pg11 server to make an experiment. How do I copy the database on the remote server to the new server with the new pg_dump.
The following code is using old pg_dump and it doesn't work.
ssh user @ remote_machine "pg_dump -U dbuser -h localhost -C --column-inserts" \\ >> backup_file_on_your_local_machine.sql
pg11 on the network connected to the old database by taking full dump I solved
pg_dumpall -U postgres -h 10.100.80.100 -p 5432 --clean --file=/pg11localstoragepath/backup/mydb_backup.dump
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.