Backing Up the Database

Home » Admin and Setup » General Information

Backing Up the Database


This document attempts to provide information for both experienced and novice users alike. If the command line is your preference, we have command line examples for you to follow. There are also simple GUI approaches, as described in the pgAdmin section.

Command line examples (all platforms):


The following examples all use the user name "admin". This is the default 
name created  when installing the PostBooks/OpenMFG software starting with version 3.
Earlier versions used the user name "mfgadmin" as the default user and 
it is possible that the databases can be configured with a different name. 
You should use the appropriate privileged username in place of "admin" 
for your system.

If logged in to the server running Postgres as a user with the correct permissions, and Postgres runs on default port of 5432:

pg_dump -U admin databasename > backupname.sql

This will create a backup of databasename called backupname.sql

If Postgres is running on a port other than 5432:

pg_dump -U admin -p 5433 databasename > backupname.sql

If you are running pg_dump from a remote client:

pg_dump -U admin -h mypgserver.mydomain.com -p 5433 databasename > backupname.sql

See also documentation related to installing the database and restoring the database.
最終更新:2011年07月26日 16:02
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。