You could do the following to transfer it across with pg_dump:
ssh blau08@blau08 'pg_dump -C fieldfacts' | psql template1
This way you run pg_dump
on the remote server, and direct the output to your locally-running psql. This system is effective for large databases, since it doesn't create any intermediate files, and is (relatively) fast and secure. If the database is large, compressing the output and using aes128-gcm@openssh.com may improve performance ( ssh -C -c aes128-gcm@openssh.com ...
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.