Congratulations to you if PostgreSQL is up and running! You have finished the most complicate task of all. The next task is restoring PostERP database backup file to PostgreSQL server.
Windows users:
Place the downloaded file posterp.db in subdirectory C:\. Open a DOS window, subsequently issue the following commands (and answer the password of account postgres when asked):
C: CD:\ C:\Program Files\PostgreSQL\11\bin\createdb -h 192.168.0.1 -U postgres -E UTF8 posterp C:\Program Files\PostgreSQL\11\bin\pg_restore -h 192.168.0.1 -U postgres -d posterp posterp.db |
Unix users:
Place the downloaded file posterp.db in /tmp/. Issue the following commands (and answer the password of account postgres when asked):
createdb -h 192.168.0.1 -U postgres -E UTF8 posterp export PGCLIENTENCODING=UTF8 pg_restore -h 192.168.0.1 -U postgres -d posterp -v posterp.db |
Parameter -E UTF8 given by previous command is extremely important! This is because PostERP database backup must be restored to the database space supporting UTF8 characterset encoding. If you fail to make database cluster support UTF8 when installing PostgreSQL server, parameter -E UTF8 might be your last solution. Error message should not show up from the above commands. Otherwise, go back and investigate your PostgreSQL installation and fix all problems first. |
Restoring process takes approximately one miniute. Verify database backup file is succefully restored:
Run psql Section 13.1.4:
In psql prompt, send the following commands:
\c posterp \d |
Database backup file has been successfully restored if 200 ~ 300 tables are displayed. To leave psql, type:
\q |
Database posterp will hold all your organization's data. Schedule to back it up reguarly as it is of extreme importance to you. |