使用pg_dump时,可以使用postgres连接字符串指定主机/数据库/用户名/密码:
pg_dump postgres://someuser:somepassword@somehost.com:5432/somedatabase
我想在pg_还原中使用相同类型的连接字符串:
pg_restore -f dump.dump postgres://userb:somepassword@somehost.com:5432/otherdatabase
但我有一个错误:
pg_restore: [archiver] could not open input file "postgres://userb:somepassword@somehost.com:5432/otherdatabase": No such file or directory