Networker

Re: [Networker] Networker Exclude List

2007-03-07 14:25:08
Subject: Re: [Networker] Networker Exclude List
From: "Landwehr, Jerome" <jlandweh AT HARRIS DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 7 Mar 2007 14:20:38 -0500
from the NW help page on this topic:

To include all files, the following syntax examples are acceptable:

*
.
*.?*
*.*


so it's a bit of overkill to use 

+skip: * .* *.*


when 

+skip: . 

will suffice   


see below for the full explanation and a `man -s5 nsr` gives more
details

========================================================================
==================

SYNTAX:
==========
Hint: Take a look at the default directives on the NetWorker server for
ideas of the syntax. The syntax used for creating NetWorker directives
is as follows:

WINDOWS:
------------ 
<< "X:\path_to_files" >>
action: file.filter
NOTE: The double quotes are required as certain windows folder names can
have spaces.

UNIX:
--------- 
<< /filesystem >>
action: file.filter

 
There are three types of directives:

? GLOBAL DIRECTIVES - Administrators can create global directives by
using the NetWorker Administrator program. These directives are stored
as resources on the NetWorker server, and can be selectively applied to
individual clients using the Directive attribute of the Client resource.

? NETWORKER USER LOCAL DIRECTIVES - On clients running Microsoft
Windows, users with local Windows Administrator or Backup Operator
privileges can create local directives using the NetWorker User program.
These directives are stored on the client in a file named Networkr.cfg,
and are applied throughout the client?s filesystems during scheduled
backups (or save operations that do not include the -i option).

? LOCAL DIRECTIVE FILES - Users can create local directive files named
nsr.dir (Windows) or .nsr (UNIX) anywhere on a client filesystem that
they have permission to create files. The directives these files contain
apply only to the immediate data within the path where the directive
file is located.

Note: In the event of conflicting directives, global directives are
enforced over local directives, and NetWorker (?)

All NetWorker directives use essentially the same format, however,
global directives and local directives created with the NetWorker User
program contain an additional <<directory>> line, which specifies the
path of the data the directive acts upon. Local directives do not
require that line.

For example, to skip all "tmp" files in the C:\mydir directory of a
Microsoft Windows client, you could create a local directory file, named
nsr.dir, in the C:\mydir directory containing the following directive:
skip: *.tmp

The following global directive would have the same effect:

<< "C:\MYDIR" >>
skip: *.tmp

Global Directives can be created on the NetWorker server and applied to
more then one client in a group.
========================================================================
==================
A directive has two parts: 
1) the HEADER - which determines the directory the directive applies to 
2) the ACTION - where you tell the directive what rule to apply.
HEADER:
===========
- The header is enclosed in double angle brackets, eg << "/" >> 
- It must be a directory name 
- wildcards are not permitted in the header 
- blanks as spacers are required within the angle brackets, in front and
after the directory name, i.e. << /usr/var >>, or << "D:\Temp" >> is
correct <</usr/var>>, or <<"D:\Temp">> is not
- keep brackets on a single line (same line as directory path)
- for Windows, enclose the directoy name within the angle brackets with
double quotes, i.e << "C:\MYDIR" >>


ACTIONS:
===========
You specify a folder you want some action performed on, and a file
filter to select the files to perform the action upon. 
Some common actions performed on files and filesystems are:

1) Skip - Tells NetWorker to skip or exclude files or folders; however
the skip ASM does not back up the specified files and directories and
does not place the filename in the online index of the parent directory.

2) Compressasm - Employs softwanb re compression on folders or files

3) Null - similar to skip NetWorker will not backup the file data, but
will place the filename in the online index. If you browse such a backup
you will see the directory.

4) rawasm: Use this direcive to backup a raw device:
Example:
<</dev/rdsk/>>
+rawasm : *

Adding the '+' sign to the action, tells NetWorker to apply the action
to all sub folders below the one specified in the "<< >>"

========================================================================
==================

SKIPPING:
===========

- To skip files in the c:\ directory that has extension "OBJ" then the
directive line will be as follow:

skip: *.obj

This instruction means skip all files with an extension of "obj" in C:\.

- If a directive is preceded by a plus (+) sign, it applies to the named
directory and all of its subdirectories (i.e. recursive). 

For example:
<< "C:" >>
+skip: *.obj

For example, to skip all files in a directory called Oracle on Windows
you would use the following:

<< "D:\Oracle" >> 
skip: *.*

If the Oracle directory contained sub folders with files you also wanted
skipped then you would use the following:

<< "D:\Oracle" >> 
+skip: *.*

The '+' sign tells NetWorker to skip all files matching the '*.*' file
filter in all sub folders of D:\Oracle

========================================================================
==================

SPECIAL CHARACTERS:
======================

To include all files, the following syntax examples are acceptable:

*
.
*.?*
*.*

The '/' path when applied to a Unix system would mean the root
directory. 

i.e. << / >>

However when the same symbol is applied to a Windows system is would
mean any partition and/or directory.

i.e. << / >> (this is the ONLY time that double quotes " " are not
needed in specifying a directory in a Windows system)

For Example: if all occurances of the Temp directory needs to be skipped
(no matter how often or where it appears), the following directive would
be used:

<< / >>
+skip: Temp

========================================================================
==================

LIMITATIONS:
========================================================================
==================

1. Directives created on an earlier version of NetWorker 6.x have
between a 512 and 1024 character limit depending on the version of
NetWorker (5.x = 512 for Windows, 6.x=1024 for UNIX). The client side
directive files have no limit. Known issue: LGTpa36604 & LGTpa52517
Request for Enhancements (RFE). Please contact Legato Software Technical
Support for further details.

Permanent FIX: Upgrade NetWorker to 7.0

Workaround fix: Create multiple instances of the same client with small
directives (less than 512 characters) and back them up under different
groups. 
------------------------------------------------------------------

2. Use of wildcards in the folder names is not allowed. There are three
RFE (Request For Enhancement) LGTpa43302, LGTpa08771 and LGTpa03431
filed to add Wildcard capabilities for directives.

For Example:
Would like to request support for wildcard in between directories

<< /nil_mount/home_mixed/*/.netscape >>

skip: cache 

<< /nil_mount/home_mixed/* >> 

+skip: .mozilla


Wildcards for NetWorker 7.0 or earlier:
----------------------------------------------
Wildcards are NOT SUPPORTED in the:

1) Save set field of a NetWorker client resource
2) Directives field between the double brackets, '<< >>'


-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of Dave Mussulman
Sent: Wednesday, March 07, 2007 1:33 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: Re: [Networker] Networker Exclude List

On Mon, Mar 05, 2007 at 10:18:01PM -0000, Joe Lyons wrote:
> Thanks for this info.  As the /u03 is a mount point on the client
> machine I have placed my .nsr file into the /u03 filesystem and it now
> reads..
> $ pwd
> /u03
> $ cat .nsr
> skip: *
> 
> Does this look sensible ?

Location inspecific directive files always give me the willies.  I
prefer to hardcode a path into them

---CUT---
<< "/u03" >>
  +skip: * .* *.*
---CUT---

That way, if it gets copied somewhere else, it doesn't potentially not
backup something that should be.  IIRC, if that's in the wrong path (say
you put it under /etc), since it's not in the right place in the tree,
it will generate an error message, but it will still backup everything
in /etc.

The downside to that approach is that every directive file needs to be
tailored for its environment.  Good from the backups admin perspective,
but bad from the user support perspective where a small, simple file
would be able to be used anywhere.  I still think it's worth it.

Being able to exclude filesystems from the saveset list (without having
to muck with directives,) has been an RFE with Networker for a long
time.

Dave

To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

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