Backup

Aus FreiBier
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Backup of the ADempiere database

You can use the PGAdmin3 GUI Tool or the pg_dump command line Tool for a backup. If you have configured the server to accept remote connections (for a remote ADempiere Client) it is no problem to make the backup/restore also to/from a remote system.

I myself prefer the pg_dump tool because I can write down the exact command and do not have to memorize which buttons and checkmarks I clicked in the GUI (read Documentation).


version 1: fast and complete backup

A command to backup an adempiere database is:

 pg_dump -F c -h adempiereserver -U postgres adempiere >adempiere-db.backup

Where "adempiereserver" is the name of the PostgreSQL Server (you may use also "localhost" when appropriate) and "adempiere" is the name of the database. (The standard name of the database is "adempiere" but you may create other databases if you want).

To restore the database use this command:

 pg_restore -h adempiereserver -U postgres -d testdb <adempiere-db.backup


version 2: backup as SQL code

Another way of do a backup is to create a plain text SQL file:

 pg_dump -F p --inserts -c -h adempiereserver -U postgres mydatabase >mydatabase-`date +%Y%m%d`.sql

This format may be better for some purposes becaus it is a text file and you can read it manually. It is much bigger than the customized format (up to 10 times in my tests). I myself use it for synchronizing a remote server. It seems to be a bad idea to use a bigger file for synchronizing but it has the advantage that rsync may understand the content and transmit just the changed part of the file. You can restore this data with

 psql --set ON_ERROR_STOP= -1  -h localhost -U postgres -d freibier <freibier-20120220-2.sql

but be aware this is veeery slow!


version 3: backup just adempiere data

/usr/bin/pg_dump --host localhost --port 5432 --username "postgres" --format custom --blobs --verbose --file "/home/user/Backups/adempiere-120222.backup" --schema "adempiere" "adempiere"



How do I know/set my database admin password?

Read SQL_Queries#Set_a_password_for_the_admin_user


Backup of the old (sourceforge hosted app) Wiki

This procedure is for the legacy sourceforge wiki and is here written down just for historical reasons.

This Wiki is a Hosted App at Sourceforge. In the sourceforge project there is also a Backup Page to download the wiki content. For a full backup you have to download the file and the database section. The files Backup includes the Files that are uploaded to the wiki. The Database Backup includes the main wiki content and other data.

Up to now the backup is not included in an automatic backup system so I have to do it from time to time manually.


Backup of this (new) wiki

With a backup of the whole PostgreSQL Cluster the mediawiki database will be saved. You may also want to backup only the "wikidb" database. For the uploaded files and images do a backup of "/var/lib/mediawiki/images/".

Up to now the backup is not included in an automatic backup system so I have to do it from time to time manually.

Meine Werkzeuge
Namensräume

Varianten
Aktionen
Navigation
Werkzeuge