Sunday 15 June 2014

postgresql - Restore dump on the remote machine -



postgresql - Restore dump on the remote machine -

i've got own machine postgres dmp file, want restore on remote virtual machine (e.g. ip 192.168.0.190 , postgres port 5432) in network. possible restore dump using pg_restore without copying dump remote machine? because size of dump 12gb , disk space on virtual machine 20gb. thanks

you can run restore on network without copying dump remote host.

just invoke pg_restore -h <hostname> , -p <port> (and -u <username> authenticate different user) on host got dump file, example:

pg_restore -h 192.168.0.190 -p 5432 -d databasename -u myuser mydump.dump

references:

pg_restore documentation

postgresql dump remote-server pg-restore

No comments:

Post a Comment