Selecting Directories / Files to Backup
StoreBackup allows you to use and combine different methods to select
directories or individual files to be - or not to be - part of the
backup. The following options of storeBackup.pl can be combined.
Matching Directories:
- includeDirs Allows you to include the specified
directories into the backup. You have to use the relative path
below sourceDir. If you use this option, only those
directories will be saved - nothing else. You may deselect
subdirectories of the directories specified with this option via
exceptDirs.
- exceptDirs Allows you to exclude the specified
directories from the backup. You have to use the relative path
below sourceDir. If you use this option, the selected
directories will not be saved. You cannot select
subdirectories to backup from the directories specified with this
option via includeDirs.
- followLinks Allows you to very flexibly map
directories into the backup. The way to use this option is to create
a special directory for backup only and to map the directories to
save into this special backup directory simply via symbolic
links. You may want to combine this option with
exceptDirs. See description of option followLinks in
section 6.2. Example 2 also shows how to
use followLinks.
- stayInFileSystem Only files and directories in file
systems which are specified by option sourceDir of via the
symbolic links handled as directories via option followLinks
are saved.
When specifying directories for including or excluding, you can use
wildcards. StoreBackup calls a shell to evaluate those wildcards and
prints the result in the log file(s). If wildcard sounds strange
to you and you want to know what it is, use an internet search engine
for the term ``wildcard shell''.
Matching Files:
- includeRule If you define a rule for this option
then only files matching this rule will be included in the
backup. This rule is evaluated before exceptRule (if
defined).
- exceptRule If you define a rule for this option
then files matching this rule will be excluded from the
backup. Because this rule is evaluated after option
includeRule, a file matching includeRule and
exceptRule will not be stored in the backup.
- exceptTypes File types specified here will not be
saved in the backup. This is useful, if you e.g. do not want to
save some type of special files.
Because includeRule and exceptRule only work on
files, the backup of the directory structure is not affected by
matches. Especially - you cannot match directories itself.
Within a rule, you may use the rule functions MARC_DIR and
MARC_DIR_REC to match all files of a directory (maybe
including its subdirectories). See EXAMPLE 5 in chapter
Defining Rules about how
to use those rule functions.
For better control and examination about excluded files because of
rules, you may want to use option writeExcludeLog. If set,
the (relative) files names of all excluded files are written to
.storeBackup.notSaved.bz2 in the top level directory in your
actually created backup.
Heinz-Josef Claes
2014-04-20