Local directives are text files located on the client's file system. These directives are applicable solely to the data directly within the path where the directive file is placed
Instructions for Linux
Log in to the Linux client where the NetWorker backup client is installed.
Create a file named
.nsr
in the directory you want to skip:sudo sh -c 'echo "+skip: *" > /path/to/exclude/.nsr'
The filename
.nsr
(no extension) tells the NetWorker client to treat it as a directive file.The line
+skip: *
tells NetWorker to skip every file and subdirectory under/path/to/exclude
(the leading+
makes it recurse).
Set appropriate ownership and permissions so the backup process can read it but ordinary users cannot modify it:
sudo chown root:root /path/to/exclude/.nsr sudo chmod 644 /path/to/exclude/.nsr
On the next backup, NetWorker will see that
nsr.dir
and omit everything underC:\TEMP
.
Instructions for Windows
Open an elevated Command Prompt (Run as Administrator).
Create the skip file inside
C:\TEMP
:echo +skip: * > C:\TEMP\nsr.dir
The filename
.nsr.dir
tells the NetWorker client to treat it as a directive file.The line
+skip: *
tells NetWorker to skip every file and subdirectory underC:\TEMP
(the leading+
makes it recurse).
Lock down permissions so only Administrators can edit it:
icacls C:\TEMP\nsr.dir /inheritance:r /grant:r Administrators:R
On the next backup, NetWorker will see that
nsr.dir
and omit everything underC:\TEMP
.