Consultor Eletrônico



Kbase P6772: How to automate and validate offline backup on Windows for databases < 2GB
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/01/2006
Status: Verified

GOAL:

How to automate and validate offline backup on Windows for databases < 2GB

FACT(s) (Environment):

Windows NT 32 Intel/Windows 2000

FIX:

The following script will:
- perform an off-line backup of the sports2000 database and
- if successful, perform a full verification of the backup.

"Test.out" will record checkpoints of pass/failure.

REM - - - - - - - START - - - - - ->>
@echo off

echo Test started. >> test.out
"%DLC%\bin\_dbutil" probkup .\sports2000 backup\sports2000.bak
if %errorlevel% == 0 goto BKUPOK
echo Backup failed. >> test.out
goto ENDPROG

:BKUPOK
echo Backup successful. >> test.out
"%DLC%\bin\_dbutil" prorest .\sports2000 backup\sports2000.bak -vf
if %errorlevel% == 0 goto VERIFOK
echo Backup Verify failed. >> test.out
goto ENDPROG

:VERIFOK
echo Backup Verify successful. >> test.out
goto ENDPROG

:ENDPROG
REM <<- - - - - - END - - - - - - -