Číst česky →

How to export PostgreSQL database

1 min read Hukot net PostgreSQL

If you need to back up or move a database, you'll need to create a database dump. You can create a database dump on our web hosting via SSH.

You can find a guide on generating SSH keys and setting up SSH connections here.

After SSH connecting to web hosting, create a database dump using the following command:

pg_dump -h localhost --clean -U %username% -f %filename%.dump -W %database%

Subsequently, a file named %filename%.dump will be created in the current directory.

This guide is also applicable to VPS and similar systems.