Unsolved

This post is more than 5 years old

14 Posts

13564

August 11th, 2006 09:00

How to skip folder backup in Windows servers

Hello,

I know NW can skip folder backups when you configure in the Directives in NW Administrator. Each of our Windows server has a copy i386 folder under C:\Admin\Win2K or C:\Admin\Win2003\ (depending on the platform). I would like to know what is the syntax to skip it globally on each Windows server in the Directives.

Our NW server is running 7.1.3 on Solaris 8

Thanks

4 Operator

 • 

14.3K Posts

August 11th, 2006 12:00

Each Windows box will need to have directive added (or modified if one already exists) with like pointing to skip desired directory. Examples can be found in NSR_directive manual, this forum and KB and even among existing directive definitions coming with NetWorker.

22 Posts

August 15th, 2006 19:00

Hi Dennis.

Have a read through the document set out below, it should help you to get an understanding of how to use NetWorker Directives.

Cheers
GARY

Using NetWorker directives

Introduction

NetWorker directives are covered in chapter 4 of the administrator guide, and while this powerful feature of NetWorker allows for a fine-grained way of modifying NetWorker¿s behaviour using a pre-defined set of rules, many clients find them confusing.

The NetWorker directives are instructions sent to the program NetWorker uses to backup filesystem data (the save program,) or are instructions contained in special files (nsr.dir on NT or .nsr on UNIX), that changes the way the save program treats files in that directory.

In the vast majority of situations, only the skip and compress directives are ever used by clients. The other directives such as null, mailasm, and swapasm were created to address specific UNIX based filesystem backup issues that are in general no longer faced in current production systems.

Since the introduction of inexpensive Gigabit Ethernet connections, the need to compress information at the client before it is sent over the network has also been significantly reduced, which leaves the skip directive as the most commonly used option.

The skip directive

Why use the skip directive

The skip directive is used to tell NetWorker not to backup a certain directory or group of files, and are used in the same way that ¿Exclude Lists¿ are used in other backup products, however instead of enumerating what might be a long list of excluded files and file types, directives allow you to created rules as to the kinds and locations of files that the NetWorker filesystem backup should exclude.

In general files that are consistently excluded from filesystem backups fall into one of two categories

1. Temp directories in which files appear and disappear on a regular basis
2. Database files, or backup catalogs that are backed up using special utilities
3. Static data for which long term archival backups have already been performed

Temporary directories
An example of an error caused by the backup of a temp directory is as follows.

* hvcmac-002:C:\ save: File C:\Documents and Settings\macslideshow\Local Settings\Temp\~DFA898.tmp could not be opened and was not backed up. (unknown error 32 (0x20))

Here we see that the file which existed at the beginning of the backup has since been removed, generating an error in the logs.

There are two ways of addressing this problem; one is to put in a global directive such as

<< C:\Documents and Settings\macslideshow\Local Settings\Temp>>
+skip : *.*

Or create an nsr.dir file in the temp directory with the following contents

+skip : *.*

As clearing all files in a temp directory is a relatively common administrative task that may be performed by someone with no knowledge of NetWorker directive files, it is quite possible that an nsr.dir file would be removed, thus we suggest that temp directories are excluded via a global directive.

Another example where a temp directory causes problems is as follows

* macemns1:C:\ save: File C:\Documents and Settings\macemns\Local Settings\Temp\JET3249.tmp could not be opened and was not backed up. (The process cannot access the file because it is being used by another process.)

Here the temp file still existed, however it was held with a ¿Read Lock Exclusive¿, thus it could not be backed up.

One method of excluding backups of any Temp directory on the C drive would be to create a global directive as follows

<< "F:\" >>
+skip: "Temp"

The disadvantage of this approach is that none of these directories would exist in the case of a full restore, which might cause problems with applications.

Databases

The following errors show what happens when NetWorker attempts to perform a filesystem style backup of a database that is running.


* hvcmacpcs01:D:\ save: File D:\MSQL
Databases\MSSQL\Data\PLCControlSQL.ldf could not be opened and was not
backed up. (unknown error 32 (0x20))
* hvcmacpcs01:D:\ save: File D:\MSQL
Databases\MSSQL\Data\PLCControlSQL.mdf could not be opened and was not
backed up. (unknown error 32 (0x20))
* hvcmacpcs01:D:\ save: File D:\MSQL Databases\MSSQL\Data\pubs.mdf could
not be opened and was not backed up. (unknown error 32 (0x20))
* hvcmacpcs01:D:\ save: File D:\MSQL Databases\MSSQL\Data\pubs_log.ldf
could not be opened and was not backed up. (unknown error 32 (0x20))
* hvcmacpcs01:D:\ save: File D:\MSQL Databases\MSSQL\Data\tempdb.mdf
could not be opened and was not backed up. (unknown error 32 (0x20))
* hvcmacpcs01:D:\ save: File D:\MSQL Databases\MSSQL\Data\templog.ldf
could not be opened and was not backed up. (unknown error 32 (0x20))


Even if these files could have been backed up, there is no guarantee that they would be in a state that could be used for recovery, and should always be backed up using the appropriate application specific backup interface with a NetWorker module designed for the purpose.

In this case we would recommend that a local directive is used, by creating an nsr.dir file that contains the following

Again there are two ways of addressing this problem; one is to put in a global directive such as

<< D:\MSQL Databases\MSSQL\Data >>
+skip : *.mdf
+skip : *.ldf

or create an nsr.dir file in the D:\MSQL Databases\MSSQL\Data directory with the following contents

+skip : *.mdf
+skip : *.ldf
No Events found!

Top