Veritas-bu

Re: [Veritas-bu] Quick Question

2007-05-21 07:25:58
Subject: Re: [Veritas-bu] Quick Question
From: Gary Rule <grule AT bbn DOT com>
To: smpt AT peppas DOT gr
Date: Mon, 21 May 2007 07:39:25 -0400
I use scripts to push out my windows exclude lists. (I'm using NBU 5.1 currently). I found a script by an old co-worker of mine at Collective Technologies for pushing out exclude lists for UNIX clients and modified it so it works with windows.

Attached is gen_excludes-windows which I run at a regular interval.

I keep all my exclude lists in /usr/openv/etc/exclude_lists-windows

I have a file named exclude.skel in that directory with:

Exclude = C:\Temp
Exclude = C:\Program Files\VERITAS\NetBackup\bin\*.lock
Exclude = C:\Program Files\VERITAS\NetBackup\bin\bprd.d\*.lock
Exclude = C:\Program Files\VERITAS\NetBackup\bin\bpsched.d\*.lock
Exclude = C:\Program Files\VERITAS\Volmgr\misc\*
Exclude = C:\Documents and Settings\All Users\Application Data\Microsoft\Network\downloader\*

(That needs to be one line)

If I have a special exclude list (and I do for all my systems) then I create a file in that same directory with the name of the server. Inside the file is a list of things to exclude. Here is an example:


exael:

Exclude = X:\Shares
Exclude = X:\file-sync
Exclude = D:\
Exclude = P:\
Exclude = E:\
Exclude = C:\

----

Gary

smpt wrote:
For windows clients, you must use the registry, or netbackup GUI

------------------------------------------------------------------------

*From:* veritas-bu-bounces AT mailman.eng.auburn DOT edu [mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] *On Behalf Of *Anas Kayal
*Sent:* Sunday, May 20, 2007 8:15 AM
*To:* Kevin Whittaker; veritas-bu AT mailman.eng.auburn DOT edu
*Subject:* Re: [Veritas-bu] Quick Question

If I wanted to do this on a windows box how can I do that?

Best regards,

Anas

------------------------------------------------------------------------

*From:* veritas-bu-bounces AT mailman.eng.auburn DOT edu [mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] *On Behalf Of *Kevin Whittaker
*Sent:* Thursday, May 17, 2007 8:31 PM
*To:* veritas-bu AT mailman.eng.auburn DOT edu
*Subject:* Re: [Veritas-bu] Quick Question

Yes, creating the file /usr/openv/netbackup/exclude_list will work, but it affects all backups done on that client

Better to create /usr/openv/netbackup/exclude_list.[policy name]

Kevin


------------------------------------------------------------------------

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
#!/bin/bash

##################################
## gen_excludes-windows         ##
## Pushing of Windows excludes  ##
## Based on gen_excludes by     ##
##  Hal Skelly                  ##
## ---------------------        ##
## Gary Rule                    ##
## grule AT bbn DOT com                ##
## Written: 11/29/04            ##
## Updated: 11/30/04            ##
##################################

PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/openv/volmgr/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/netbackup/bin/goodies:/usr/openv/volmgr/goodies:/usr/symmapps/bin:/usr/local/bin:/usr/openv/local/bin:/usr/EMCpower/bin:/etc

export PATH

X=$$

#get list of active windows hosts
gethosts() {
        cd /usr/openv/netbackup/db/class
        for class in * ; do

                ACTIVE=`grep 'ACTIVE[   ][      ]*0' $class/info`
                WINDOWS=`grep 'CLIENT_TYPE[         ][      ]*13' $class/info`

                if [ -n "$ACTIVE" -a -n "$WINDOWS" ] ; then
                        awk '{print $1}' $class/clients|grep -v "VMD5_DIGEST="
                fi

        done >/tmp/$X.windowshosts.txt
        HOSTS=`sort -u /tmp/$X.windowshosts.txt`
        rm /tmp/$X.windowshosts.txt
}


SBASE=/usr/openv/etc/exclude_lists-windows
DBASE=/usr/openv/netbackup


Xfiles=$SBASE/exclude.skel

if [ ! -f $Xfiles ]; then
        echo "exclude list file, $Xfiles, does not exist"
        exit 1
fi

gethosts
for client in  $HOSTS ; do
        echo "Updating Exclude list on $client with Default exclude list."
        STRING="("

        exec < $Xfiles
        while read -r line ; do
                STRING="$STRING echo '$line' &&"
        done

        STRING=`echo $STRING | sed 's/..$//'`
        STRING="$STRING ) | bpsetconfig -h $client"

        eval $STRING

        if [ -f $SBASE/${client}* ] ; then
                for file in  $SBASE/${client}* ; do
                        suffix=`echo $file | sed -e "s/.*\/$client//" `
                        cat $file $Xfiles | sort -u > $file.$X

                        STRING="("
                        exec < $file.$X
                        while read -r line ; do
                                STRING="$STRING echo '$line' &&"
                        done
                        STRING=`echo $STRING | sed 's/..$//'`
                        STRING="$STRING ) | bpsetconfig -h $client"

                        echo "  Found special Exclude list: `basename $file`"

                        eval $STRING

                        rm $file.$X

                done
        fi
done
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
<Prev in Thread] Current Thread [Next in Thread>