Frequently Asked Questions - Restore

Assuming you have created a backup file using setup.pl or the following command on the command line (which is the command line equivalent of what setup.pl does):

 $ pg_dump -F c -f your_backup.bak your_company_database

 

You can restore your database using the command:

 $ pg_restore [options] your_backup.bak

If you want to restore into a new database, replace [options] with -C new_database. If you want to restore and replace an existing database, replace [options] with --clean -C new_database.

Note: You need to restore the roles backup before restoring the data backup.

Release: 
FAQ Category: 

As of 1.3.7 the backup functionality moved to setup.pl, the database administration interface.

Login with your ledgersmb database user / admin user. This can't be done using your normal LedgerSMB login account since it doesn't have enough rights to backup db and roles. The default address for setup.pl is http://localhost/ledgersmb/setup.pl.

The setup.pl backup facility consists of two parts:

  1. Backup of the data (parts, customers, accounting records, etc)
  2. Backup of the roles (your login accounts and rights)

The backup can be mailed to an e-mail account, or you can download it with your browser, depending on your output selection in the backup screen.

 

Note that alternative methods include the use of autopostgresqlbackup and PostgreSQL's command line utility pg_dump. See the Restore FAQ item for an example of the latter.

Release: 
FAQ Category: