jotrago Posted September 22, 2014 Report Share Posted September 22, 2014 Nesting Selectors 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. Doing this presents some subtleties. 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} THUS:- Selectors specified in the EXCLUDE section of the parent MUST specify the files to be INCLUDED {in the exclude}. Similarly, 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 also starts to get 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 INCLUDE + INCLUDE = INCLUDE EXCLUDE + INCLUDE = EXCLUDE INCLUDE + EXCLUDE = EXCLUDE EXCLUDE + EXCLUDE = INCLUDE !!!! 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. 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-Server 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. Happy Selecting 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.