4. Excluding drives and partitions from backup

By default, TSM is set to back up all your local drives and partitions. This includes not only those internal to your machine, but also those that are attached externally, such as Firewire/USB hard drives and flash drives. This section shows how to exclude these from backup. If you have accidentally backed up an external drive and do not want the data to be kept for backup, please contact hfs@ox.ac.uk and indicate which drive's backup you wish to be deleted.

You can exclude a drive or partition 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. You can exclude a drive or partition from backup either by altering the backup domain that TSM checks when it runs a scheduled backup, or alternatively with an exclude rule. An exclude.dir rule cannot be used to exclude a whole partition because its role is only to exclude folders that exist within a drive, not whole drives themselves.

4.1. Excluding drives and partitions by changing the backup domain

TSM reads the backup domain setting when it runs a scheduled backup. Changing the backup domain therefore affects which drives and partitions get backed up on the schedule. Drives excluded in this manner may still be backed up manually, and are still listed under the 'Local' list of disks in the TSM interface when you run a manual backup; so you may want to expand this list and select only those disks you wish to back up if you do run a manual backup. (Similarly, command line users can include such drives as an argument, as in dsmc incr "/media/USB DISK", for example, while a simple dsmc incr will honour the domain setting you have made in the graphical user interface and not back up drives which are not listed in the backup domain.)

4.1.1. Changing the backup domain using the graphical user interface

This is the simplest way to prevent a drive or partition being backed up during scheduled backups. To remove a drive or partition from the backup domain 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 17.
  2. Click on Edit, then Client Preferences. The Preferences Editor window will appear, on the General Preferences section:

    Figure 18.
  3. From the list of tabs on the left, click on Backup. The Backup Preferences window will appear:

    Figure 19.
  4. Under Domain for Backup, untick Back up all local file systems, and select those drives that you want to include for backup. In the example below, only C: will get backed on the backup schedule, not E: (Windows desktop/laptop users can ignore the third line, SystemState, because for their accounts it is by default not backed up).

    Figure 20.

    Note: on Macs, TSM represents the main drive with a slash /, rather than the complete volume name. Other disk volumes are named in the standard Mac manner, as e.g. /Volumes/My Big External Disk.

  5. Click OK.

  6. Now verify that the backup domain is now set correctly. The easiest way to do this is in the TSM graphical user interface, by attempting to perform a domain backup of your machine. To do this, from the main TSM window, click on [Actions] and then [Backup Domain]. This will back up only those drives listed in the backup domain.

  7. 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.

4.1.2. Changing the backup domain by editing the TSM configuration file

To change the backup domain by editing the TSM configuration file, do as follows:
  1. Locate the TSM configuration file: the backup domain is set in dsm.opt on all operating systems. The location of this 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 DOMAIN line of dsm.opt in a text editor. Please do not alter or remove any existing rules or other lines of dsm.opt. The default setting is:

     DOMAIN ALL-LOCAL
    To remove a drive from the backup domain, change the DOMAIN line to be the appropriate line below:
    Windows - to back up only drive C: and E::
       DOMAIN C: E:
    Mac - to back up the main drive and a secondary drive called "My Big External Disk":
       DOMAIN "/"  "/Volumes/My Big External Disk"
    Linux:
       DOMAIN  /  /home

    Note: on Macs, TSM represents the main drive with a slash /, rather than the complete volume name. Other disk volumes are named in the standard Mac manner, as e.g. /Volumes/My Big External Disk.

    These lines are cumulative, so, for example, you could put on two separate lines:

       DOMAIN C:
       DOMAIN E:
    or you can include all local drives / partitions and then exclude one or more by prefacing theme with a "-" minus sign, as below (note when enclosing the disk/partition name in quotation marks because it contains spaces, you should put the minus sign inside the quotation marks):
    Windows:
       DOMAIN ALL-LOCAL -F:
    Mac:
       DOMAIN ALL-LOCAL "-/Volumes/My Big External Disk"
    Linux:
       DOMAIN ALL-LOCAL -/usr  -/scratch
    Note that quotation marks are not optional if the file name or location contains a space.

  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 the backup domain is set correctly. The easiest way to do this is in the TSM graphical user interface, by attempting to perform a domain backup of your machine. To do this, from the main TSM window, click on [Actions] and then [Backup Domain]. This will back up only those drives listed in the backup domain. Alternatively, if you prefer to run TSM on the command line, run as root:

    dsmc incr

  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.

4.2. Excluding drives and partitions from backup with an exclude rule

Alternatively you can completely exclude all files on a drive/partition from being backed up by adding an exclude rule. Note that an exclude.dir rule cannot be used to exclude a whole partition because its role is only to exclude folders that exist within a drive, not whole drives themselves.

4.2.1. Excluding drives and partitions from backup with an exclude rule using the graphical user interface

To exclude a file or a range of similar files 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 21.
  2. Click on Edit, then Client Preferences. The Preferences Editor window will appear, on the General Preferences section:

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

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

    Figure 24.
  5. Under File or Pattern, click Browse, and a window headed File or Pattern will appear in which you can browse to any file on the drive that you want to exclude.

    Figure 25.
  6. Browse to and select any file on the drive that you want to exclude, and click OK. The file will now be listed in the Define Include-Exclude Options window:

    Figure 26.
  7. Now edit the File or Pattern field so that, after the drive name, it reads either \...\* (Windows) or /.../* (Mac/Linux). The example below is for excluding all of C: on Windows. So you will have a result that looks like one of:

    Windows:
       C:\...\*                            
    Mac:
       "/Volumes/My Big External Disk/.../*"
    Linux:
       /scratch/.../*

    Figure 27.

    A simpler alternative, available in Linux only, is to select the Type option Exclude.fs rather than Exclude. You can then browse to the file system to be excluded with the Browse button.

  8. Once your exclude rule is 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 is 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 drive, and also by checking that you can still back up those files that you want to back up: every file on the excluded drive should be marked with a barred red circle, and so impossible to back up (TSM will not permit you to back up any files or folders that are marked in this way):

    Figure 28.

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

    Note that you will still be able to select folders for backup, but that in all cases the files inside them should be marked as excluded.

  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.

4.2.2. Excluding drives and partitions from backup with an exclude rule 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. Add an exclude rule that begins with the drive name and ends with either \...\* (Windows) or /.../* (Mac/Linux). So you will have a result that looks like one of:

    Windows:
       Exclude C:\...\*                            
    Mac:
       Exclude "/Volumes/My Big External Disk/.../*"
    Linux:
       Exclude /scratch/.../*
    A alternative in Linux only is the option Exclude.fs, after which you can name the drive 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.
    Linux:
       Exclude.fs /scratch
    Note that quotation marks are not optional if the file name or location contains a space.

  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 is 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 drive, and also by checking that you can still back up those files that you want to back up: every file on the excluded drive should be marked with a barred red circle, and so impossible to back up (TSM will not permit you to back up any files or folders that are marked in this way):

    Figure 29.

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

    Note that you will still be able to select folders for backup, but that in all cases the files inside them should be marked as excluded.

    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: 3. Excluding folders from backup Next: 5. Excluding everything from backup except specific files or folders