Requirements
- Flat text file
- Sections beginning with a
section name (all caps) and ending with an empty line
- UTF-8 character encoding
(multiple backup sets can be stored in the same definition file)
- Each backup set starts
with a
SET section
- Import the backup set
definition using the Windows command interface
Generally, the easiest way to create a backup set definition file is
to start by using the backup software Settings window
Backup Sets tab to create an example backup set
with all of the needed sections. You can then use the command interface to
display the file code. You can copy this code into a file and edit it as
needed.
SET Section
The
SET section describes data that is global to the
backup set.
- name:
set name
- Name of backup set (required).
- guid:
value
- Unique ID for the backup set, such as
380464e5-d960-4165-b8dd-0bb40eb204bf (required).
- selected:
value
- value is
0 if backup set is not selected and
1 if selected.
- excluded:
value
- value is
0 if matching files will be added to the backup.
Set to
1 if matching files that would have been
included by other backup sets will be excluded from the backup.
- lock_rules:
value
- value is
0 if the user can edit the backup set; and
1 if the user cannot edit the backup set.
- lock_selection:
value
- value is
0 if the user can (de-)select the backup set and
1if the user cannot (de-)select the backup set.
PATHS Section
The
PATHS section lists folders and files the backup set
applies to. These correspond to the selected folders in the backup set editor;
however, unlike the backup set editor, this format allows you to include single
files as well. There can be any number of
include:/exclude: lines.
- include:
path
- Folder or file to include from the backup set; subfolders are
included.
- exclude:
path
- Folder or file to exclude from the backup set; can be a subfolder
of an include.
RULES Section
The
RULES section lists matching rules in the set. This
section is optional. If there are no rules, a backup simply includes the files
and folders included in
PATHS. Rules are expressed as a disjunction of
conjunctions, such as
(Rule0,0 AND Rule0,1...) OR (Rule1,0 AND
Rule1,1...). The "and groups" are separated by a single line
containing the text
OR.
Each rule line looks like this:
[!] type operator arguments...
(An optional leading ! inverts the sense of the rule. This corresponds
to the Include or Exclude identifier leading each rule. Arguments are separated
by spaces.)
Rule Formats
- extension
extensions
- List of extensions, no period, separated by spaces.
- size [gt|ltt]
size
- File size in bytes.
- created
(before
date | after
date | between
start_date
end_date)
- Creation dates. You can specify before a specified date, after a
specified date, or between specified dates. Dates are specified in decimal
time_t format.
- modified
(before
date | after
date | between
start_date
end_date)
- Modification dates. You can specify before a specified date,
after a specified date, or between specified dates. Dates are specified in
decimal time_t format.
- filename ( [!]equals | [!]begins-with | [!]ends-with )
file0 file1 ...
- Matches the file name alone, not the path.
- directory ( [!]equals | [!]begins-with | [!]ends-with
)
directory0 directory 1 ...
- Matches files that exist in a folders matching one of the given
names; the name must be single folder names, not paths. (You would use
PATHS for that.).
- directory-recursive ( [!]equals | [!]begins-with |
[!]ends-with )
directory0 directory1 ...
- Matches files in a folder matching the given name and all its
subfolders. Again, the rules parameters must be simple names, not paths.
- attributes ( [!]has
win32 file attributes)
- Matches file attributes separated by a space.
Example of a Backup Set Definition File
SET
name: Awesome Backup Set
guid : 380464e5-d960-4165-b8dd-0bb40eb204bf
selected: 1
excluded: 0
lock_rules: 1
lock_selection: 1
PATHS
include: C:\SomeDir\IncludedFile.txt
include: C:\SomeDir\IncludedDirectory
exclude:
C:\SomeDir\IncludedDirectory\ExcludedSubdirectory
RULES
extension "doc" "xls" "ppt" "txt"
size gt 1024
!size gt 9999999999
created between 1199145600 1299145600
filename !begins-with "foo" "bar" "baz"
or
filename begins-with "important"
or
directory-recursive beings-with "important"