a

a

Repository Backup using command Line............

Sample script  for backup repository
rem ==================================================================================
rem = This batch files preforms a Repository backup of the Informatica repository
rem = The Informatica supplied cmd PMREP is used to iniate the backup, unless otherwise
rem = specified, output from the backup will default to %INFA_PATH%\server\infa_shared\Backup
rem =
rem =  Example using a backup folder other than the default
rem =   SET OUTPUT_PATH=D:\Archive\pmrep_cmd\temp
rem =   pmrep backup -o %OUTPUT_PATH%\backups\%INFA_REPOSITORY%_%yyyymmdd%.rep      
rem =
rem ==================================================================================

SET PATH=%INFA_PATH%\server\bin;%PATH%

rem -- Step 1 - get the date and parse it so it can be used as part of the backup file name
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set yyyymmdd=%%k_%%i_%%j

rem -- Step 2 - connect to the repository
pmrep  connect -r %INFA_REPOSITORY% -d %INFA_DEFAULT_DOMAIN% -n %INFA_PM_USER% -X INFA_PM_PASSWORD >log.txt

rem -- Step 3 - issue backup option - the pmrep backup automatically uses the default PowerCenter backup folder
pmrep backup -o %INFA_REPOSITORY%_%yyyymmdd%.rep >>log.txt

rem -- Step 4 - Delete old backups
<>DeleteFilesByAge.vbs  %INFA_PATH%\server\infa_shared\Backup 14 >>log.txt

rem -- last step

echo -- Batch file has ended -- >>log.txt