Custom PostGreSql version ( 9.6 ) pg_dump and restore from and to remote host

(0 comments)

Backup PostgreSQL Remote DB:

/usr/lib/postgresql/9.6/bin/pg_dump --host <host_address> --port 5432 --username <uname> --no-owner --file "/home/priyank/backups/db.sql" "<db_name>"

Restore backup to Remote DB Instance:

/usr/lib/postgresql/9.6/bin/psql -d '<dbname>' -h '<host_address>' -p 5432 -U '<uname>' -f <abs_path_of_backup.sql>
Current rating: 5

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required