> For the complete documentation index, see [llms.txt](https://dev-notes.vinguyen.blog/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-notes.vinguyen.blog/notes/deployment-and-operation/database/postgresql/postgesql-backup-database-via-remote-ssh-server.md).

# PostgeSQL - Backup database via remote ssh server

```bash

ssh remote_server "pg_dump -v -h $DB_HOST -p $DB_PORT -U $DB_USERNAME $DB_DATABASE" > $FILE_NAME

```
