Backing up your database is a fairly simple process in iDempiere. When you first install iDempiere, all the files are placed in /opt/idempiere-server. There is an export script called RUN_DBExport.sh in the utils folder (i.e. /opt/idempiere-server/utils). This script exports your database to a dump file and should be run with the user that has rights to the folder. (ex. sudo -u idempiere /opt/idempiere-server/utils/RUN_DBExport.sh).
You can backup your database while the server is running. Thus, it is possible to backup your database several times during the day with a job scheduler. You can restore the database to the last backup point and in worst case scenario, you only lose a few hours work.
You can verify if the backup was successful by checking the backup file which would have been created in the /opt/idempiere-server/data folder. 2 new files are created everytime you backup your database. First, you will get an ExpDat.dmp file which is the uncompressed version of the database. Second, you will get a time-stamped compressed JAR version of the database. You can store the JAR file in an offsite backup location to ensure that the backup doesn’t get lost.
To restore a database, you need uncompressed your selected jar file to the dmp file. Go to /opt/idempiere-server/data. The ExpDat.dmp file may or may not be the dmp file you want. It is recommended that you remove/delete the ExpDat.dmp file. After removing ExpDat.dmp, select the jar file that you want (from the list of jar files in the folder, if any) and then, uncompress the selected jar file. You will now get a new ExpDat.dmp file.
Go back to the utils folder and stop the idempiere server. After the stopping the idempiere server, run the ./RUN_DBRestore.sh script. Please note that you should always be careful when restoring the database specially if it is in a Production environment. Restoring will remove the existing database and will restore your backed up process in its place.