Setting Up Routine Backup for Epicor Progress Database

Looking to set up and schedule a routine backup for your Epicor Progress database? How about one that will remove old backups after a specified number of days and compresses the backup file to save space?

This week’s Tech Toolbox has an example of a batch file that does just that. It also creates a database verification log to confirm the backup is executing successfully.

Copy the text between the copy below/copy above lines into a text file with a bat file extension.

< – – – – – – – – – – COPY BELOW THIS LINE – – – – – – – – – – >

@ECHO off
::change the OEDIR value to the location of your oe102a\bin folder on your server. NOTE: You can determine where your oe102a folder is by navigating to Start > Programs > OpenEdge > PROENV. The DLC value listed will point to your oe102a folder.
::change the DBDIR value to the location of your Epicor database files; this is where the database where you want to backup resides.
::change DBBKUPDIR to the location where you want the backup files to go.
::change the DBKUPNAME value to the name of your backup files.
::change the TESTRESTORELOG value to the name of database verification log; this will end up in the same folder as the db backups themselves.
SET OEDIR=e:\epicor\oe102a\bin
SET DBDIR=e:\epicor905\db
SET DBBKUPDIR=f:\epicorbackups
SET DBBKUPNAME=Epicor905LiveBkup
SET TESTRESTORELOG=dbverification.log
::this will keep the last 8 database backups and will delete the backup with 7.bkup at the end of the name before starting this process.
DEL %DBBKUPDIR%\%DBBKUPNAME%7.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%6.bkup %DBBKUPNAME%7.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%5.bkup %DBBKUPNAME%6.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%4.bkup %DBBKUPNAME%5.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%3.bkup %DBBKUPNAME%4.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%2.bkup %DBBKUPNAME%3.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%1.bkup %DBBKUPNAME%2.bkup
REN %DBBKUPDIR%\%DBBKUPNAME%.bkup %DBBKUPNAME%1.bkup
::the -com parameter will compress the database backup as it can reduce the size of the backup by 10 to 40 percent.
::the -Bp parameter will use private buffers instead of using the before image file.
ECHO starting Online database backup
CALL %OEDIR%\probkup online %DBDIR%\mfgsys %DBBKUPDIR%\%DBBKUPNAME%.bkup -com -Bp 10
:: this will verify the backup and output the results to a log.
ECHO starting database backup verification
ECHO *********** >> %DBBKUPDIR%\%TESTRESTORELOG%
ECHO %DATE% %TIME% >> %DBBKUPDIR%\%TESTRESTORELOG%
CALL %OEDIR%\prorest %DBBKUPDIR%\testrestore %DBBKUPDIR%\%DBBKUPNAME%.bkup -vp >> %DBBKUPDIR%\%TESTRESTORELOG%

< – – – – – – – – – – COPY ABOVE THIS LINE – – – – – – – – – – >

Additional Information

You should review the database verification log to confirm that it was successful. You should see an entry like the following below – a message of 6758 in the log means that the database passed verification (which is good):

Fri 09/07/2012 17:25:37.36
OpenEdge Release 10.2A03 as of Mon Mar 19 19:14:30 EDT 2012s
This is a full backup of e:\epicor905\db\mfgsys.db. (6759)
This backup was taken Fri Sep 07 17:24:52 2012. (6760)
The blocksize is 4096. (6994)
Partial verification successfully read backup volume. (6765)
Verify pass started. (3751)
Verified 478909 db blocks in 00:00:22
Backup for e:\epicor905\db\mfgsys.db verified ok. (6758)

Afterwards, you can execute this batch file on a schedule using a Windows Scheduled Task. To validate that the backup is working I recommend reviewing the verification log gives the above results and also doing a test restore to a test database.

Please don’t hesitate to contact Datix if you have any questions or would like assistance setting this up!

Leave a Comment

Your email address will not be published. Required fields are marked *