Skip to the content of the web site.
[an error occurred while processing this directive]
[an error occurred while processing this directive]
IST Collage

IST Backup Service - Local Directives for Mac OS X

By default, the Legato backup server backs up all files and folders on the user's workstation. By creating a file known as a "Local Directives" or ".nsr file", the user can control the data which gets backed up. In the Mac OS X system this file is located at "/.nsr.".

For most users, only a very few folders contain data of interest. The rest of the folders can be re-established by re-installing system and application software.

In the following discussion it is assumed that the user has some familiarity with the Terminal window (Applications:Utilities:Terminal) and unix commands.

At the present time, the Legato NetWorker server does not understand how to skip everything except for a few named folders, so every file and folder at the highest level directory must be explicitly skipped EXCEPT the folders that the user wishes to back up. If any file, folder or path name contains a space, the name must be enclosed in quotation marks. Names that do not contain spaces may also be enclosed in quotation marks, if you wish.

In a Local Directives file, records that begin with a "#" are comments. You may wish to enter comments in your Local Directives file.

For most Mac OS X systems, only the "/Users" and (if it exists) the "/Documents" folders will need to be backed up. In the following list of instructions, the use of text editors TextEdit and pico are suggestions only. The user may wish to use a different combination of text editors.

  1. Open a Terminal window.
  2. Generate a list of all of the files and folders at the root directory of the file system ("sudo ls -1 / " where '1' is the digit 'one').
  3. Open TextEdit (Applications:TextEdit).
  4. Select and copy the list from the Terminal window, and paste it into a blank TextEdit window.
  5. Manipulate the list so that for each record (directory entry), DirectoryName becomes skip: "DirectoryName".
  6. Insert "<< / >>" as the first record of the file. The TextEdit window might now look something like:

    <<  /  >>
    skip:  "Applications" <== quotation marks optional
    skip:  "Desktop DB" <== quotation marks required
    ... <== indicates more directories or files
    skip:  "Trash"
    skip:  "Users"
    ... <== indicates still more directories or files
    skip:  "var"
     
  7. At this point you have created the text for a Local Directive that would exclude everything from the backup. For each folder that you want included in the backup, you must now delete or comment-out the corresponding directory specification. For this example that would be the line containing "Users".
  8. Select all lines of the file and copy the selected lines to the clipboard.
  9. In the Terminal window type sudo pico /.nsr. Paste the contents of the clipboard. The pico window might now look something like:

    <<  /  >>
    skip:  Applications
    skip:  "Desktop DB"
    ...
    skip:  "Trash"
    #       "Users"  <== Commented-out to indicate "don't skip"
    ...
    skip:  var
     
  10. Close the pico file. There is no need to save the TextEdit file.

For most users, this completes the creation of the Local Directives file. You should be aware that there are many more lines in the file than are indicated in the example above.

Additional Volumes or Partitions

Some users have more than one disk partition or external volume on their workstation or PowerBook. If this applies to you, you need to extend your Local Directives file to include the extra partitions. These partitions and disk volumes are listed in file /Volumes. If you need to skip or include files and folders on extra partitions, you need to perform the above steps for each partition or external volume.

On my computer, I chose to skip backups for all partitions except the partition containing the MacOS X system, and a single folder on volume B–SysRes. A directory listing of B–SysRes shows:

Desktop DB
Desktop DF
Desktop Folder
GW
Stuff for Mac OSX
TheFindByContentFolder
TheVolumeSettingsFolder
Trash

For this disk volume, I wish to back up only folder Stuff for Mac OSX. This means that my Local Directives file now looks like:

<<  /  >>
skip:  "Applications"
skip:  "Desktop DB"
skip:  "Desktop DF"
skip:  "Desktop Folder"
skip:  "Library"
skip:  "NAV??? 7.0 QuickScan"
skip:  "Network"
skip:  "System"
skip:  "TheFindByContentFolder"
skip:  "TheVolumeSettingsFolder"
skip:  "Trash"
skip:  "Volumes"
skip:  "automount"
skip:  "bin"
skip:  "cores"
skip:  "dev"
skip:  "etc"
skip:  "mach"
skip:  "mach.sym"
skip:  "mach_kernel"
skip:  "nsr"
skip:  "private"
skip:  "sbin"
skip:  "tmp"
skip:  "usr"
skip:  "var"
skip:  "zztestfile"

<<  "/Volumes/Paul's G3/"  >> <== quotation marks required
skip:  * .?*

<<  /Volumes/A-SysRes/  >>
skip:  * .?*

<<  /Volumes/B-SysRes/  >>
skip:  "Desktop DB"
skip:  "Desktop DF"
skip:  "Desktop Folder"
skip:  "GW"
#       "Stuff for Mac OSX"  <== folder not skipped
skip:  "TheFindByContentFolder"
skip:  "TheVolumeSettingsFolder"
skip:  "Trash"

<<  /Volumes/SharedStuff/  >>
skip:  * .?*

Last updated by Paul Henderson (email henders at UWaterloo.ca) on July 15, 2005.

Keywords: (none)