CAD Admin advice, Pro/E + Intralink tips + resources.
This stuff contains my personal opinions, please don't take it as representative of my employer.

April 05, 2008

Intralink Backup

Recently I've heard questions about Intralink backup scripts, so here's an example of one I use, built over the years with info from various sources... Please add comments, suggestions, improvements below.

These are the CORE (minimal) commands: Set Read-only, Run Export, Set Read-write

set PDM_ORA_APPL=intralink
cd ???\dataserver\intralink\obj
PDMTransactionSetRO %ILUSER% %ILPASS%

cd ???\dataserver\intralink\export
call ilink_export manager ???\dump.dmp

cd ???\dataserver\intralink\obj
PDMTransactionSetRW %ILUSER% %ILPASS%

Summary for "complete" backup script:
  • Set variables based on script location (disk, folder, computername)
  • Set default Intralink passwords, etc
  • Run ilink_vars.bat file if it exists (allow to set non-default variables for server/location)
  • Set path, make copy of backup log
  • Put Database in Read-only mode (avoids any conflict from checkins during backup)
  • Specify Dump sub-folder + keep 3 previous dump files
  • Call the export command
  • Record date/time to log
  • Put Database back in Read-Write mode

:: Intralink backup file
:: E Muirhead Nov 2007

::Find active disk
set DISK=%~d0
set BAK=%~dp0
set LOG=il_bak_%COMPUTERNAME%.txt
set PDM_ORA_APPL=intralink
set DS=%DISK%\ptc\ilink\dataserver\
set ILUSER=INTRALINK
set ILPASS=INTRALINK

if exist %BAK%ilink_vars.bat call %BAK%ilink_vars.bat

set PATH=%PATH%;%DS%intralink\ilink_lib

%DISK%
cd %BAK%
copy /Y %LOG% %LOG%.bak

cd %DS%intralink\obj
PDMTransactionSetRO %ILUSER% %ILPASS%

set DUMP=%BAK%dump_files
if not exist %DUMP% md %DUMP%

if not exist %DUMP%\dump.dmp goto nodump

del %DUMP%\dump3.dmp*
ren %DUMP%\dump2.dmp* dump3.dmp*
ren %DUMP%\dump1.dmp* dump2.dmp*
ren %DUMP%\dump.dmp* dump1.dmp*

:nodump

cd %DS%intralink\export
call ilink_export manager %DUMP%\dump.dmp

echo Intralink Dump - %DATE% %TIME% > %BAK%%LOG%

cd %DS%intralink\obj
PDMTransactionSetRW %ILUSER% %ILPASS%

cd %BAK%
copy /b %LOG%+%LOG%.bak %LOG%

I just work with hot backups in read-only mode, and they've served well for recoveries over the years. You can also do full cold backups with the database off, see PTC KDB for more info.

0 comments: