さらに、pg_dumpallは、全てのデータベースに共通するグローバルオブジェクトもダンプします (pg_dumpはこれらのオブジェクトを保存しません)。 現時点では、これにはデータベースユーザとグループ、テーブル空間、データベース全体に適用するアクセス制限などの属性に関する情報が含まれています。
pg_dumpall
https://www.postgresql.jp/document/10/html/app-pg-dumpall.html
pg_dumpall のリファレンスを読む限り、-h スイッチでホストを指定できますね。問題なさそう。ただし、PostgreSQL 9.5 がインストールされたシステムから同 10 がインストールされたシステムへの接続テストは実施したけれど、その逆は実施していない(し、設定もしていない)ので、まずはそこの対応が必要になりそう。
https://www.postgresql.jp/document/10/html/app-pg-dumpall.html
senooken JP Social is a social network, courtesy of senooken. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All senooken JP Social content and data are available under the Creative Commons Attribution 3.0 license.