Veritas-bu

AW: [Veritas-bu] Windows Excludes?

2004-09-28 06:14:55
Subject: AW: [Veritas-bu] Windows Excludes?
From: william.d.brown AT gsk DOT com (william.d.brown AT gsk DOT com)
Date: Tue, 28 Sep 2004 11:14:55 +0100
A previous thread answered this nicely:

<<
[Veritas-bu] WIN Exclude lists from command line?[Veritas-bu] WIN Exclude 
lists 
from command line? 
Christopher Jay Manders CJManders AT lbl DOT gov 
Mon, 10 Feb 2003 07:39:24 -0800 
  Previous message: [Veritas-bu] WIN Exclude lists from command line? 
  Next message: [Veritas-bu] Veritas FP3 
  Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] 



Hi all,

There are many ways to edit the registry from the command line, but so far 
the
methods will require that the information be encoded correctly for the
REG_MULTI_SZ type entries to be correctly registered in the registry. If 
you
use a .reg file to do this you will change the REG_MULTI_SZ to regular
REG_SZ...which won't work. It has to do with the NULL termination of each
entry, which is very tricky from the cmd line.

Our solution here at LBNL:

Use reg.exe and a .bat script. Note: reg.exe is found in the Resource Kit. 
We
based this off of a script by MadDog for securing NT and W2K boxen.

The two files (reg.exe and the something.bat) need to be in the same 
directory
(we put them into the install directory that is zipped for the client).

Here is our script (line wrap will need to be fixed):

echo.
echo.
echo
=================================================================
echo This script was written by Christopher Jay Manders 02-09-2003
echo Copyright 2003: Chris.Manders AT UnixHelpDesk DOT ORG/CJManders AT LBL DOT 
GOV
echo
- -----------------------------------------------------------------
echo.
echo This script will add registry values to Windows machines for
Veritas NBU.
echo Works for all Windows platforms since NBU puts its registry
stuff in the
echo same place regardless of version (Windows 95/98/NT/XP/ME/2000)
echo.
echo Note: reg.exe must be in the same directory for this script to
work.
echo
==================================================================
echo.
echo.
echo 1st, set the server list for the NBU environment
reg add
"HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\Config"
/v Server /t REG_MULTI_SZ /d
ServBack.lbl.gov\0ServBack\0GetBack\0GetBack.lbl.gov\0FlashBack\0Flash
Back.lbl.gov /f
echo.
echo.
echo 2nd, set the DHCP flag to update the server correctly
reg add
"HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\Config"
/v Announce_DHCP_Interval /t REG_DWORD /d 0x3500 /f
echo.
echo.
echo 3rd, set the client name to the hostname (not FQDN)
reg add
"HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\Config"
/v Clients /t REG_MULTI_SZ /d snatuk\0snatuk.me.com /f
echo.
echo.
echo 4th, set the INETD Daemon to start in case it isn't
rem reg add
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBackup INET
Daemon" /v Start /t REG_DWORD /d 2 /f
echo.
echo.
echo 5th, add a basic set of include and exclude values so the entire
system is not backed up.
reg add
"HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\Config"
/v Exclude /t REG_MULTI_SZ /d
A:\*\0B:\*\0C:\*\0D:\*\0E:\*\0F:\*\0G:\*\0H:\*\0I:\*\0J:\* /f
echo.
reg add
"HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\NetBackup\CurrentVersion\Config"
/v Include /t REG_MULTI_SZ /d "C:\My Documents"\0"C:\Documents and
Settings"\0"D:\My Documents"\0"D:\Documents and Settings" /f
echo.
echo.
echo Done.

We have a CGI that kicks this out for each client (so the client name is
changed to be correct for our setup).


Cheers!

Chris





  Previous message: [Veritas-bu] WIN Exclude lists from command line? 
  Next message: [Veritas-bu] Veritas FP3 
  Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] >>




<Prev in Thread] Current Thread [Next in Thread>