13 Aug

Nesting Selectors with Retrospect Backup

Nesting Selectors with Retrospect Backup

Retrospect selectors offer a surprisingly  powerful method to precisely control what does, or does not get backed up. However creating complex selectors can be a bit mind bending.

This article discusses nesting selectors within each other to create a flexible backup management toolset.

Ground Rules

  • Retrospect Selectors have sections to INCLUDE and EXCLUDE specified items
  • EXCLUDES always take priority over INCLUDES
  • You can use another selector in a selector item definition.

However, doing this presents some subtleties.

How it works

Some experimentation suggest that it works like this:-

Selectors intended for inclusion in other selectors should only specify INCLUDES OR EXCLUDES but not both {it gets too mind bending otherwise}


Selectors specified in the EXCLUDE section of the parent MUST specify the files to be INCLUDED {in the exclude}.
Selectors specified in the INCLUDE section of the parent MUST specify the files to be INCLUDED {in the include}

This behaviour CAN be reversed by using the IS NOT operator when specifying the Child Selector but this starts to get too mind bending

Put another way if you include a selector which says EXCLUDE something, in an EXCLUDE section then those items will be EXCLUDED from the EXCLUDE, and will be INCLUDED in the backup.

THUS it appears one can apply traditional mathematical sign rules to nesting Selectors

It pays to use the TEST facility. While EDITING a selector hit the BLUE TICK button and select a suitable volume or subvolume to try out your rule.

An approach to using Nested Selectors

So in sites with more complex Selector Requirements I use the following approach.

Create Selectors Named for the types of files, and ONLY specify items in the INCLUDE section
EG:-  5-Xco-Temp;    include tmp Temp etc etc
EG:-  5-Xco-Music;    include *.mp3, m:\Artists etc etc.

Then create a selector named for the Script or Function it refers to EG: 1- Xco-Servers. This Selector will only ever reference other selectors.
EG add EG 5-Xco-Server Temp to the EXCLUDE Section,  and add EG 5-Xco-Music to the INCLUDE Section

You can then create many selectors for various files, types etc, and simply add them to your Script Selectors.
Using a good naming convention results in a very readable list of Selectors which indicates quite intuitively what they are doing.
Preceding ALL your custom selectors with a standard character or two ensures they are grouped together in the list and not confused with the standard Retro Selectors. (I use “Digit-Company or Site abbreviation-Description” which allows me to order & group logically.
I have found it best to NOT change the default selectors, rather Duplicate and Rename them, thus you always have the originals to refer to as examples and use as templates.

Leave a Reply

Your email address will not be published. Required fields are marked *