Using Rules to include and Exclude items on the Mac- Step-by-Step Guide

Prev Next

Configuring File Inclusion and Exclusion Rules in Retrospect for Macintosh

This document explains how to create, test, and apply custom rules in Retrospect for Macintosh to include or exclude specific files and folders (for example, excluding music and games, or including only document files) in your backup operations and scripts.

Step 1: Open Retrospect Preferences and Access Rules

From the Retrospect menu, open Settings/Preferences.

In the Preferences window, click on Rules at the top.

At the bottom of the Rules window, click the plus (+) button to create a new rule.

Step 2: Create an Exclude Rule (e.g., No Music or Games)

Name the new rule something descriptive, such as “No Music or Games.”
Configure the rule so that it includes everything by default, then under Exclude, click the plus (+) button to add a condition.

Add a condition: File name does end with .mp3.

Next, click the plus (+) next to the first criterion to add another exclusion condition.

Add a condition: Folder name does contain Games, and then click Add to save these criteria to the rule.

You now have a rule that includes everything except files whose names end in .mp3 or files inside folders whose names contain Games.

Step 3: Test the Exclude Rule Using a Backup Preview

To verify that the rule is working correctly, go to the Backup button at the top of the Retrospect window.

Click Customize.

In the source selection list, uncheck all currently selected items.

Highlight the disk you want to include in the backup operation.

Scroll down to the Rule section, select the custom rule you created, and click Continue.

Choose either a new media set or an existing media set, then click Continue.

Click Preview.

Retrospect will scan the drive and show a list of files and folders.

  • Any item with a check mark will be included in the backup.
  • Any item without a check mark will be excluded from the backup.

Initially, you may only see folder names without check marks. Expand folders to view the individual items inside.

Confirm that any file with an .mp3 extension or any item in a folder whose name includes Games is excluded (unchecked) from the backup.

This preview lets you confirm that the rule is performing as expected. When finished, cancel the preview operation.

Step 4: Use the Rule in a Backup Script

To apply your rule in an automated backup script, go to Scripts in the left-hand sidebar.

Click Add to create a new script.

Choose Backup as the script type, give it a name such as “Nightly Backup”, and click Add.

Select the source disks you want to include in your nightly backup.

Choose the media set that the script will use for storing backups.

Under Rules, check the custom rule you created earlier (e.g., No Music or Games).

When this script runs, Retrospect will apply the selected rule to each volume. In the script’s summary window, you can also see which rule is being used.

Step 5: Create an Include-Only Rule for Document Files

If you want a rule that only includes specific types of files, go back to Rules under Settings/Preferences.

Create a new rule.

Name it something like “Document Files.”

Under Include, set the logic to “Any of the following is true.” Then add criteria for the file types you want to include:

Add a condition: File name does end with .doc.

Add another condition: File name does end with .xls.

Add another condition: File name does end with .pdf.

With this rule, Retrospect will include only Word documents (.doc), Excel files (.xls), and PDF documents (.pdf) in the backup. No other file types will be included because the rule specifically targets these extensions. Click Add to save the rule.

Step 6: Apply and Edit the Include Rule in a Script

To use the new Document Files rule in a script, go back to Scripts.

Edit the script you want to modify and go to the Rules tab.

Select the new Document Files rule. When the script runs, it will include only the file types specified in that rule.

This means only the files listed in your rule (e.g., .doc, .xls, .pdf) will be backed up.

To review or change the rule later, you can edit it by double-clicking the rule in the Rules list; this will display the existing criteria. You can also add additional conditions if needed.

For example, add a condition: Folder name does contain Accounting.

With this added condition, the rule will also include everything inside any folder whose name contains Accounting, in addition to the previously specified document file types.