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
-
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, rundsmjas root. The following window will appear. Click on
Edit, thenClient Preferences. ThePreferences Editorwindow will appear, on theGeneral Preferencessection:From the list of tabs on the left, click on
Include-Exclude. The list of currentInclude-Exclude Preferenceswill appear:Click on
Addand theDefine Include-Exclude Optionswindow will appear. UnderCategoryselectBackup, and underTypeselectExclude.Dir:Under
File or Pattern, clickBrowse, and a window headedFile or Patternwill appear in which you can browse to a folder that you want to exclude.-
Browse to and select your folder, and click
OK. The folder will now be listed in theDefine Include-Exclude Optionswindow: 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.
-
Once your exclude rules are completed, click
OKin theDefine Include-Exclude Optionswindow and thenOKagain in thePreferences Editor. This will take you back to the main TSM window. -
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):
For how to run a manual backup, please see our instructions for doing so on Windows, Mac or Linux.
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 and Linux. 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
-
Locate the TSM configuration file: it is
dsm.optin Windows,dsm.syson a Mac or in Linux (although please note that very old TSM clients for Unix/Linux stored the list in a file calledincl.excl). The location of the configuration file is platform-specific and can be looked up in our list of TSM Options Files. -
In Windows Vista, 7, 2008 and 2008R2, permissions to edit the contents of
C:\Program Filesare limited. We therefore recommend that you movedsm.optto the desktop before you open it for editing. Users of these versions of Windows should therefore browse toC:\Program Files\tivoli\tsm\baclientand dragdsm.optto their desktop. (An alternative is to run your text editor as administrator before using it to opendsm.opt.) -
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 folderC:\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.
-
Save the TSM configuration file. If you moved it from
C:\Program Filesto your desktop in order to edit it, now move it back. -
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):
For how to run a manual backup, please see our instructions for doing so on Windows, Mac or Linux.
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. 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 and Linux. 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








