Script to backup Groupwise configuration files on Netware Part I

I performed a Groupwise 6.5 to 7.0.3 upgrade this weekend on the domain and post office servers, and wrote a quick script to backup the agent configuration files.  It’s not a pretty script, but I wrote it in about 10 minutes and it worked on all my Netware servers.  I call this script part I since it only deals with files affected by my upgrade, which are all located on the sys volume.  I upgrade the gateways in two weeks, so I’ll backup the configuration files in the domain directories then.

You need to set SERVERNAME, SERVERVOL, BKUPLOC and BKUPDIR. If I’ve missed any files, please let me know and I’ll add them to the list.

[sourcecode language=’cpp’]
@echo off
REM script to backup Groupwise configuration files from Netware server
REM replace SERVERNAME with the name of your Netware/Groupwise server
SET SERVERNAME=\\grpwise4
SET SYSVOL=sys
REM replace SERVERVOL with the name of the volume to write the backup files to
SET SERVERVOL=vol1
REM SERVERPATH is combination of server and volume name in \\server\vol\ format
SET SERVERPATH=%SERVERNAME%\%SERVERVOL%
REM SYSVOLPATH is combination of server and volume name in \\server\sys\ format
SET SYSVOLPATH=%SERVERNAME%\%SYSVOL%
REM APACHEAPTH is sys:\apache2 Apache2 web server directory
SET APACHEPATH=%SERVERNAME%\%SYSVOL%\Apache2
REM NOVELLPATH is sys:\novell directory
SET NOVELLPATH=%SERVERNAME%\%SYSVOL%\Novell
REM TOMCATPATH is sys:\tomcat\4 directory
SET TOMCATPATH=%SERVERNAME%\%SYSVOL%\tomcat\4
REM BKUPLOC is the directory to save backup files to
REM this script has no error checking, so the directory’s existance will probably matter
SET BKUPLOC=gw65bkup
REM BKUPDIR is the full path to the backup directory
SET BKUPDIR=%serverpath%\%bkuploc%
REM Create the backup directory
md %bkupdir%
REM copy sys:\system\ config files
md %bkupdir%\system
copy %sysvolpath%\system\*.mta %bkupdir%\system
copy %sysvolpath%\system\*.poa %bkupdir%\system
copy %sysvolpath%\system\*.waa %bkupdir%\system
copy %sysvolpath%\system\*.cfg %bkupdir%\system
copy %sysvolpath%\system\*.ncf %bkupdir%\system
copy %sysvolpath%\system\*.xml %bkupdir%\system
copy %sysvolpath%\system\*.bin %bkupdir%\system
copy %sysvolpath%\system\autoexec.ncf %bkupdir%\system
REM copy important Apache files
md %bkupdir%\apache2\conf
copy %apachepath%\conf\*.* %bkupdir%\apache2\conf
REM copy important Tomcat files
md %bkupdir%\tomcat\4\conf
copy %tomcatpath%\conf\*.* %bkupdir%\tomcat\4\conf
REM copy important Webaccess files
md %bkupdir%\novell\webaccess\conf
copy %novellpath%\webaccess\*.* %bkupdir%\novell\webaccess
REM copy important Groupwise NLMs from sys:\system
copy %sysvolpath%\system\dbcopy.nlm %bkupdir%\system
copy %sysvolpath%\system\ex*.nlm %bkupdir%\system
copy %sysvolpath%\system\gw*.nlm %bkupdir%\system
copy %sysvolpath%\system\ldap*.nlm %bkupdir%\system
copy %sysvolpath%\system\tsa*.nlm %bkupdir%\system
copy %sysvolpath%\system\scc*.nlm %bkupdir%\system
copy %sysvolpath%\system\vs*.nlm %bkupdir%\system
copy %sysvolpath%\system\wvc*.nlm %bkupdir%\system
copy %sysvolpath%\system\xg*.nlm %bkupdir%\system
[/sourcecode]

Save the script as gwbkup1.bat and run it from your Windows workstation.

Leave a Reply

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