【问题标题】:migrating remote postgresql 9.1 database to local postgresql 11将远程 postgresql 9.1 数据库迁移到本地 postgresql 11
【发布时间】:2019-12-27 19:59:04
【问题描述】:

我想将postgresql 9.1的数据库升级到postgresql 11。首先我想从pg11服务器用pg_dump获取远程pg9.1服务器上的数据做一个实验。如何使用新的 pg_dump 将远程服务器上的数据库复制到新服务器。

以下代码使用旧的 pg_dump,它不起作用。

ssh user @ remote_machine "pg_dump -U dbuser -h localhost -C --column-inserts" \ >> backup_file_on_your_local_machine.sql

【问题讨论】:

    标签: postgresql-9.1 pg-dump postgresql-11 remote-backup pg-upgrade


    【解决方案1】:

    通过我解决的完整转储连接到旧数据库的网络上的pg11

    pg_dumpall -U postgres -h 10.100.80.100 -p 5432 --clean --file=/pg11localstoragepath/backup/mydb_backup.dump

    【讨论】:

      猜你喜欢
      • 2016-12-05
      • 2020-06-01
      • 2011-07-16
      • 2015-05-16
      • 2016-09-04
      • 1970-01-01
      • 2016-06-22
      • 2022-12-19
      • 2013-10-02
      相关资源
      最近更新 更多