Nuclos pg_dump: PostgreSQL backup console, script, custom format, pg_restore, schema nuclos, dump.

globe with meridians Language: Deutsch · English

hammer and wrench Postgres backup via console/script

PostgreSQL backup via pg_dump – scriptable custom-format dump incl. parameter explanation.

On this page

The recommended, scriptable method for a PostgreSQL backup is pg_dump in custom format.

Steps

  1. Open a terminal or cmd.
  2. Run the following command:
pg_dump -U postgres -h localhost -d nuclosdb -n nuclos -F c > /home/backup/nuclos.backup

Parameters

OptionMeaning
-Udatabase user
-hserver/host name
-ddatabase name
-nschema name (Nuclos: nuclos)
-F ccustom format (recommended, compressed, for pg_restore)

After the run, check that the file size is plausible. Use pg_restore to restore a custom dump.

Related pages

gear Backup


Overview.

Öffnen →

gear Create a Postgres backup


pgAdmin.

Öffnen →