Quando si utilizza pg_dump, è possibile utilizzare una stringa di connessione Postgres per specificare l'host/database/nome utente/password:In pg_restore, come si può usare una stringa di connessione postgres per specificare l'host/database/nome utente/password?
pg_dump postgres://someuser:[email protected]:5432/somedatabase
voglio usare lo stesso tipo di stringa di connessione per pg_restore:
pg_restore -f dump.dump postgres://userb:[email protected]:5432/otherdatabase
ma ottengo un errore:
pg_restore: [archiver] could not open input file "postgres://userb:[email protected]:5432/otherdatabase": No such file or directory
Il [manuale è chiaro] (http://www.postgresql.org/docs/current/static/app-pgrestore.html) sui flag che è necessario utilizzare. – pozs
Il manuale dice: pg_restore [connessione-opzione ...] [opzione ...] [nome file] quando provo: pg-restore postgres: // userb: [email protected]: 5432/otherdatabase -f dump.dump Ricevo lo stesso errore –
e perché pensi che * [connection-options] * possa accettare un URL di connessione completa? Questo non è ciò che dice il manuale. – pozs