How can I retrieve a postgres database backup and send It to my local machine?

November 30, 2015 2k views
PostgreSQL Backups Git Arch Linux

I need to get back a postgres backup, but the backup is generated in the remotly server, How can I send me back this backup?

1 comment
  • In Ubuntu, try this

    sudo su - postgres
    pg_dump db_name > db_name.bak

    and find backup in /var/lib/postgresql

1 Answer
by Justin Ellingwood
SFTP is a secure way to transfer files between local and remote servers. Much more secure than FTP, this protocol uses an SSH tunnel to establish a connection and uses encryption to transfer files in an interactive session.
Have another answer? Share your knowledge.