home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Collection - Online Library - January 1996
/
CKITOS2196.ISO
/
diskette
/
gg244043.dsk
/
unc.dsk
/
LS30UTIL
/
BXC4ES.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-03-03
|
4KB
|
93 lines
/****************************************************************************/
/* REXX LAN Server 3.0 Entry XCOPY Backup procedure. BXC4ES.CMD */
/* */
/* The following parameters are required */
/* */
/* copytype The extent of the xcopy option */
/* landrive The IBMLAN drive like for example C: */
/* destpath The destination drive for XCOPY like X:\BACKUP\TODAY */
/* logfile The logfile path and file name */
/* */
/****************************************************************************/
Parse Upper Arg copytype landrive destpath logfile
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
SELECT
WHEN copytype='ALL' THEN XC_OPT = '/S /E';
WHEN copytype='CHANGES' THEN XC_OPT = '/S /E /M';
OTHERWISE DO
CALL DSP_HELP;
EXIT 9
END
END
/************************/
/* Append to log file */
/************************/
rc = LINEOUT(logfile, 'XCOPY of Server files started ' time() date() )
if rc <> 0 then do
say 'Error opening ' logfile ' Program stopped'
EXIT 99
END
'backacc'
Call "LINEOUT" logfile, 'XCOPY of Access Control Profiles started '
root = landrive || '\IBMLAN\'
'XCOPY ' root || 'ACCOUNTS\*.BKP ' destpath ||'\ACCOUNTS\*.BKP /S'
/* Is this a Domain Controller or Backup Domain Controller? */
rc = SysMkDir(root || 'DCDB')
if rc <> 0 then do
Call "LINEOUT" logfile, 'XCOPY of DCDB files started ' time() date()
'XCOPY ' root || 'DCDB\APPS\*.* ' destpath||'\DCDB\APPS\*.*' XC_OPT
'XCOPY ' root || 'DCDB\DATA\*.* ' destpath||'\DCDB\DATA\*.*' XC_OPT
'XCOPY ' root || 'DCDB\DEVICES\*.* ' destpath||'\DCDB\DEVICES\*.*' XC_OPT
'XCOPY ' root || 'DCDB\IMAGES\*.DEF ' destpath||'\DCDB\IMAGES\*.DEF' XC_OPT
'XCOPY ' root || 'DCDB\FILES\*.* ' destpath||'\DCDB\FILES\*.*' XC_OPT
'XCOPY ' root || 'DCDB\LISTS\*.* ' destpath||'\DCDB\LISTS\*.*' XC_OPT
'XCOPY ' root || 'DCDB\PRINTERS\*.* ' destpath||'\DCDB\PRINTERS\*.*' XC_OPT
'XCOPY ' root || 'DCDB\USERS\*.* ' destpath||'\DCDB\USERS\*.*' XC_OPT
'XCOPY ' root || 'LOGS\*.* ' destpath||'\LOGS\*.*' XC_OPT
end
else do
rc = SysRmDir(root || 'DCDB')
end
/* RIPL services installed? */
rc = SysMkDir(root || 'RPL')
if rc = 0 then do
rc = SysRmDir(root || 'RPL')
Call "LINEOUT" logfile
exit 0
end
else do
Call "LINEOUT" logfile, 'XCOPY of RIPL files started ' time() date()
'XCOPY ' root || 'RPLUSER\*.* ' destpath||'\RPLUSER\*.*' XC_OPT
'XCOPY ' root || 'RPL\FITS\*.* ' destpath||'\RPL\FITS\*.*' XC_OPT
'XCOPY ' root || 'RPL\IBMCOM\*.* ' destpath||'\RPL\IBMCOM\*.*' XC_OPT
'XCOPY ' root || 'RPL\IBMLAN\*.* ' destpath||'\RPL\IBMLAN\*.*' XC_OPT
'XCOPY ' root || 'RPL\MACHINES\*.* ' destpath||'\RPL\MACHINES\*.*' XC_OPT
end
/* close response files */
Call "LINEOUT" logfile
exit 0
/**************************************************************************/
/* Display options */
/**************************************************************************/
DSP_HELP:
say
say ' BXC4ES copytype landrive destpath logfile'
say ' where'
say ' copytype ALL files or file CHANGES'
say ' landrive The IBMLAN drive like for example C:'
say ' destpath The destination path for XCOPY like X:\BACKUP\TODAY'
say ' logfile The logfile path and file name'
return