3. Excluding folders from backup

3.1. Introduction

You can exclude folders from backup either in the TSM graphical user interface (GUI) or by editing the TSM configuration file. The former is generally the simpler and easier method to use.

Please note that these instructions are only valid for folders and cannot be used for the top-level of a drive or partition, or for a mountpoint. If you wish to exclude e.g. E: (Windows), /Volumes/ExternalDrive (Mac), or /home where /home is a file system or mountpoint, please see instead excluding one or more drives or partitions.

3.2. Excluding files from backup using the graphical user interface

To exclude a folder from backup in the graphical user interface, do as follows:
  1. Run TSM: in Windows, run TSM from [Start] > [All Programs] > [Tivoli Storage Manager] > [Backup-Archive GUI]; on a Mac, run TSM from [Applications] > [TSM Tools for Administrators] > [Tivoli Storage Manager]; in Linux, run dsmj as root. The following window will appear.

    Figure 9.
  2. Click on Edit, then Client Preferences. The Preferences Editor window will appear, on the General Preferences section:

    Figure 10.
  3. From the list of tabs on the left, click on Include-Exclude. The list of current Include-Exclude Preferences will appear:

    Figure 11.
  4. Click on Add and the Define Include-Exclude Options window will appear. Under Category select Backup, and under Type select Exclude.Dir:

    Figure 12.
  5. Under File or Pattern, click Browse, and a window headed File or Pattern will appear in which you can browse to a folder that you want to exclude.

    Figure 13.
  6. Browse to and select your folder, and click OK. The folder will now be listed in the Define Include-Exclude Options window:

    Figure 14.
  7. Depending on how many folders you need to exclude, proceed as follows:

    • If this is the only folder you wish to exclude, proceed to the next step.

    • If there are a few more folders to exclude, repeat the previous three steps as often as is needed.

    • If there is a range of similarly-named or similarly-located folders that you wish to exclude, you can edit the exclude line to match a range of folders before clicking OK. For further details and for examples of exclude rule syntax, please see basic exclude examples below.

  8. Once your exclude rules are completed, click OK in the Define Include-Exclude Options window and then OK again in the Preferences Editor. This will take you back to the main TSM window.

  9. Now verify that your new exclude rule(s) is/are working correctly. The easiest way to do this is in the TSM graphical user interface, by attempting to perform a manual backup of your excluded folder: it should be marked with a barred red circle, and its contents should not be visible, so that it is impossible to back up (TSM will not permit you to back up any files or folders that are marked in this way):

    Figure 15.

    For how to run a manual backup, please see our instructions for doing so on Windows, Mac, Linux or Solaris.

  10. Lastly, if you use the automatic scheduled backups, you must now restart the TSM scheduler after making changes to the exclude rules. If you do not do this then the change(s) that you have made will not be honoured on the scheduled backups. Please see our instructions for restarting the scheduler for Windows, Mac, Linux and Solaris. Alternatively, restarting your machine will have the same effect as restarting the TSM scheduler.

3.3. Excluding folders from backup by editing the TSM configuration file

To exclude a file or a range of similar files by editing the TSM configuration file, do as follows:
  1. Locate the TSM configuration file: it is dsm.opt in Windows, dsm.sys on a Mac or in Linux (although please note that very old TSM clients for Linux/Unix stored the list in a file called incl.excl). The location of the configuration file is platform-specific and can be looked up in our list of TSM Options Files.

  2. In Windows Vista, 7, 2008 and 2008R2, permissions to edit the contents of C:\Program Files are limited. We therefore recommend that you move dsm.opt to the desktop before you open it for editing. Users of these versions of Windows should therefore browse to C:\Program Files\tivoli\tsm\baclient and drag dsm.opt to their desktop. (An alternative is to run your text editor as administrator before using it to open dsm.opt.)

  3. Now edit the TSM configuration file in a text editor and add the necessary additional exclude rule(s) to the end of the file. Please do not alter or remove any existing rules or other lines of dsm.opt/dsm.sys. For example, to exclude folder C:\Users\jasonz\Documents\to-be-excluded, add:

    exclude.dir "C:\Users\jasonz\Documents\to-be-excluded"
    Do not put a slash at the end of the rule or this will invalidate the whole rule, which TSM will then ignore. Note that quotation marks are not optional if the file name or location contains a space.

    If there is a range of similarly-named or similarly-located folders that you wish to exclude, you can change your exclude line to match a range of files. For further details and for examples of exclude rule syntax, please see basic exclude examples below.

  4. Save the TSM configuration file. If you moved it from C:\Program Files to your desktop in order to edit it, now move it back.

  5. Now verify that your new exclude rule(s) is/are working correctly. The easiest way to do this is in the TSM graphical user interface, by attempting to perform a manual backup of your excluded folder: it should be marked with a barred red circle, and its contents should not be visible, so that it is impossible to back up (TSM will not permit you to back up any files or folders that are marked in this way):

    Figure 16.

    For how to run a manual backup, please see our instructions for doing so on Windows, Mac, Linux or Solaris.

    If you cannot use the graphical interface then you can check the include-exclude list on the TSM command line by running:

    dsmc q inclexcl
    Note that the output lists the order in which the directives will be processed.

  6. Lastly, if you use the automatic scheduled backups, you must now restart the TSM scheduler after making changes to the exclude rules. If you do not do this then the change(s) that you have made will not be honoured on the scheduled backups. Please see our instructions for restarting the scheduler for Windows, Mac, Linux and Solaris. Alternatively, restarting your machine will have the same effect as restarting the TSM scheduler.

Up: Contents Previous: 2. Excluding files from backup Next: 4. Excluding drives and partitions from backup