The following options can be used on the command line and in the
configuration file (see section 5.1).
There is a long option for the command line (like --sourceDir),
sometimes also a shortcut for the command line (like -s) and
the name of the term used in the configuration file (like
sourceDir)).
- --sourceDir / -s / sourceDir
- The path to the directory
you want to backup. You can only backup one directory with
storeBackup.pl. If you want to backup more than one directory, you
can use --includeDir, --excludeDir or the recommended
option better --followLinks (see below).
- --backupDir / -b / backupDir
- The repository, where
all your backups are stored. If you have one series of
backups (eg. from one computer), this will normally be similar to
the directory where your backups are. In this case, set the following
option (series) to ``.''. Example:
backupDir = /backup
series = .
Then you will see your backups directly in /backup:
$ ls -l /backup
drwxr-xr-x 14 root root 528 Aug 24 21:33 2008.08.22_02.18.43
drwxr-xr-x 14 root root 528 Aug 24 21:33 2008.08.23_02.01.11
drwxr-xr-x 14 root root 528 Aug 24 21:33 2008.08.24_02.03.51
drwxr-xr-x 14 root root 528 Aug 24 21:33 2008.08.24_13.04.55
If you have different series of backups in your repository, you
normally will create sub directories for each different backup series
(perhaps from different computers) and configure series to
these directory names. Let's assume, you have three different
computers to backup, ``bob'', ``joe'' and ``bill''. Then you can
create three different directories:
$ ls -l /backup
drwxr-xr-x 2 root root 40 Aug 25 17:02 bill
drwxr-xr-x 2 root root 40 Aug 25 17:02 bob
drwxr-xr-x 2 root root 40 Aug 25 17:02 joe
Below these directories, you will find the individual backups for
``bill'', ``bob'' and ``joe''. Eg. for ``bill'' you will set:
backupDir = /backup
series = bill
Then you will see your backup in /backup/bill:
$ ls -l /backup
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.20_02.18.25
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.21_02.11.53
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.22_02.36.18
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.23_02.17.18
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.24_02.15.45
drwxr-xr-x 11 root root 432 Aug 24 21:33 2008.08.24_13.17.21
- --series / -S / series
- see option
backupDir above.
The default value for series is ``default''. To rename an
existing series do the following:
- Run storeBackupUpdateBackup.pl so no unresolved lateLinks (see
option lateLinks below) exists.
- Rename the directory below the directory specified with option
backupDir to whatever name you want.
- Configure this option (series to the name of the
directory you have chosen in the step before.
- --tmpDir / -T /tmpDir
- Directory for temporary files,
the default value is picked from the environment variable
$tmpdir. If it does not exist, /tmp is set as
the default value.
- --lockFile / -L / lockFile
- storeBackup.pl uses a lock file
to avoid it running multiple times. The default name of the lock
file is /tmp/storeBackup.lock.
- --unlockBeforeDel / unlockBeforeDel
- Remove the lock file
before deleting old backups. Default is to delete the lock file
after removing old backups. This ``shortens'' the time for a backup
from some perspective.
- --exceptDirs / -e / exceptDirs
- You can specify a list of
directories to be excluded from the backup. It must be a relative
path from the point specified with option sourceDir. You can also
use wildcards. To give an example, if all your users reside below
sourceDir/home and you want to avoid to backup the directory
tmp in each home directory, you can say:
exceptDirs = home/*/tmp
For interpreting the wildcards, storeBackup.pl uses a shell. So if the
resulting list of directories is too long (about 4K), then this will
not work any more. Then you should use option exceptRule (see
below).
If you want to specify a list of directories, in the configuration file
simply write:
exceptDirs = home/*/tmp 'otherdir/temp'
On the command line, simply repeat the option:
-e 'home/*/tmp' -e 'otherdir/tmp'
Here, quoting home/*/tmp is important to avoid the expansion
of the term by the shell.
- --contExceptDirsErr / contExceptDirsErr
- storeBackup.pl
will continue to backup even if one or more directories specified
with exceptDirs does not exist. Default is to print and error
message and stop.
- --includeDirs / -i / includeDirs
- If this option is set,
then only files which are in the directories specified here are
backed up. StoreBackup.pl will only include files which are not
in the exceptDirs and in the includeDirs.
This option can be used in the way as described for exceptDirs.
- --exceptRule / exceptRule
- If this rule matches, the
affected file is excluded from the backup. The rules are executed
on regular files. You can read more about rules in
section 5.3.
- --includeRule / includeRule
- If a definition for this
option exists then only files which match this rule are backup
up. StoreBackup.pl will back up files which are not excluded by
the backup and match the includeRule. You can read more about
rules in section 5.3.
- --writeExcludeLog / writeExcludeLog
- This option tells
storeBackup.pl to write a file with the names of files which have
been excluded because of rules. The file will be stored in the top
level of the actual backup with the name
.storeBackup.notSaved.bz2. It's compressed with bzip2.
- --exceptTypes / exceptTypes
- Do not save the files of
the specified type. StoreBackup.pl knows:
S -- file is a socket
b -- file is a block special file
c -- file is a character special file
f -- file is a plain file
p -- file is a named pipe
l -- file is a symbolic link
Sbc can only be stored if you have gnu-cp in your path and
activate the ``gnucp´´ option (see below). If you specify
exceptTypes = Sbc
then files of these types will not be stored in the backup and no
warning will be generated. This rule is evaluated before
``exceptRule'' and ``includeRule''. If you want to exclude some
file types in general, use this option (it's faster and easier to
use).
- --cpIsGnu / cpIsGnu
- If you choose this option, you
will be able to backup (and restore) file of type Sbc (see
above). For restauring with storeBackupRecover.pl, you also need
gnu-cp. If you are using a linux system, your cp will be gnu cp.
- --linkSymlinks / linkSymlinks
- If you store your
backups on a file system which supports hard links to symbolic
links, you should activate this option. GNU/Linux does support
this feature. Default is not to hard link symbolic links.
- --precommand / precommand
- You can define one command
(or script) to be executed before storeBackup.pl starts the
backup. It will only start after the lock file is checked. If the
return value of this command / script is != 0, then storeBackup.pl
will stop immediately. The output of this command to stdin is
printed as a warning to the storeBackup.pl log file, the output to
stderr is printed as an error.
The cli parameter to this option is parsed like a line in the
configuration file and normally has to be quoted. This means, you
can use parameters, eg.:
precommand = /backup/pre.sh param1 param2
is the same as:
--precommand '/backup/pre.sh param1 param2'
- --postcommand / postcommand
- This command is executed
after finishing the backup, but before starting the deletion of
old backups. StoreBackup.pl reports, if the exit status is != 0.
The cli parameter to this option is parsed like a line in the
configuration file, see option ``precommand''.
- --followLinks / followLinks
- If you want to backup more
than one directory, you should use this option. For instance, if
you want to backup /boot, /etc and /home/tom,
then you should do (as root) something similar to:
# mkdir /backup
# cd /backup
# ln -s /boot boot
# ln -s /etc etc
# ln -s /home/tom home_tom
# ln -s . backup
# storeBackup.pl -g stbu.conf
Then you should configure your backup by editing file
stbu.conf. Configure (among others):
# sourceDir = /backup
# followLinks = 1
This will tell storeBackup.pl to take the fist level of symbolic
links below /backup like directories. With ``ln -s . backup'' you will get a sub directory inside of your backup
which exactly
reflects /backup.
``followLinks'' configures storeBackup.pl to treat n levels
of directories or symbolic links as directories. Simply by adding
or deleting a symbolic link to your backup directory, you can add
or remove any directory in your file system to / from your
backup.
- --highLatency
- Use this option if you are running
storeBackup on line with a very high latency, like a vpn over the
internet. This option will use more parallelisation at the cost of
more cpu needed. If you use this option, then if will be a good
idea to use --lateLinks and probably
--lateCompress.
Don't use this option for regular backups to a another local disk
or to nfs mounts on the local network.
- --ignorePerms / ignorePerms
- With this option, files in
the backup will not necessarily have the same permissions and
owners as the original ones. This speeds up the backup. Recovery
with storeBackupRecover.pl will restore the permissions and owners
correctly. There are several possibilities to improve performance,
see section 3.4.3.
- --lateLinks / lateLinks
- This option will reduce your
direct backup time at the cost of a second process you have
to run later. For a local backup onto another disk, you will see
an improvement of 30-50%. If you write a backup over NFS, you
will see an improvement by a factor of 5 to 10. This value
can vary depending on how many new files you have to backup and
how fast your network is. Saving over a vpn over the Internet I
measured an improvement with lateLinks by a factor of 70.
If you want to use ``lateLinks'' you have to read
section 5.5.
- --lateCompress / lateCompress
- This option can only be
used if ``lateLinks'' is set. Compression of files
``minCompressSize'' will be done later when starting
storeBackupUpdateBackup.pl. See also
section 5.5.
- --checkBlocksSuffix
- The configuration is similar to
exceptSuffix, a list of suffixes which are checked for a
match, eg.
.vdmk for VMware images. They
simply mean that the last part of the backup must be similar to
what you define here.
The next options described here are only used if
checkBlocksSuffix is set.
See blocked files for more information about the
options with ``block'' in their name.
- --checkBlocksMinSize
- Only files with this minimum size
will the treated as blocked files. You can use the same
shortcuts as described in defining rules, eg. 50M means 50
megabytes. The default value is 100M.
- --checkBlocksBS
- Defines the block size in which the
files which matches has to be split by storeBackup.pl. The
format is equal to checkBlocksMinSize. The default value
is 1M. The minimal value is 10k.
- --checkBlocksCompr
- Defines if the blocks are
compressed. Possible values are yes or no, the
default value is no. On the command line, use
--checkBlocksCompr to switch to compression mode.
This flag only affects files selected with
checkBlocksSuffix.
- --checkBlocksRulei
- The ith rule
specifying files to treat as blocked files in the backup. You can
define 5 rules, beginning from checkBlocksRule0 to
checkBlocksRule4.
See blocked files for more information about the
options with ``block'' in their name.
- --checkBlocksBSi
- The corresponding block size
for the blocks in the backup. The default value is 1 megabyte
(1M). The minimal value is 10k.
- --checkBlocksCompri
- If set to yes, the
blocks will be compressed. The default value is no.
- --checkBlocksReadi
- Defines a filter for
reading the specified file in sourceDir, eg. gunzip
or gzip -d. This parameter is useful if you have to save an
already compressed image file. (Using the ``blocked file'' feature
of storeBackup with already compressed files compressed as a whole
does not make sense.)
- --checkBlocksParalleli
- Read the files
specified hier in parallel to the files not specified in
checkBlocksRulei or checkDevicesi. This normally only
makes sense if the files specified here are small or if the are on
a separate device.
Default is no, which means not to parallelize.
You have to know, that files and devices specified in
checkBlocksRulei or checkDevicesi are never
parallelized.
- --checkDevicesi
- List of devices (eg. /dev/sdd2 /dev/sde1) to backup.
- --checkDevicesDiri
- Directory where the
devices are stored in the backup (relative path). The image
file will be restored in that directory also if you restore the
backup with storeBackupRecover.pl (if you use default options).
Into this directory storeBackup will create a subdirectory which
name is generated from the parameters of checkDevices, eg. /dev/sdc will result in dev_sdc.
- --checkDevicesBSi
- Defines the block size in
which the devices specified have to be split by
storeBackup.pl. The format is equal to
checkBlocksMinSize. The default value is 1M. The minimal
value is 10k.
- --checkDevicesCompri
- If set to yes,
the blocks will be compressed. The default value is no.
- --checkDevicesParalleli
- Read the devices
specified hier in parallel to the files not specified in
checkBlocksRulei or checkDevicesi. This normally only
makes sense if the files specified here are small or if the are on
a separate device.
Default is no, which means not to parallelize.
You have to know, that files and devices specified in
checkBlocksRulei or checkDevicesi are never
parallelized.
- --saveRAM / saveRAM
- Use this option if storeBackup.pl
runs on a system with very low memory configuration. You will then
see some dbm files in ``tmpDir''. This will slow down
storeBackup.pl a little bit, so do this only if you run into
problems without it. On modern computers, it should only be
necessary to use this option if you backup millions of files.
- --compress / -c / compress
- The command, storeBackup.pl
uses for compression. Default is bzip2.
The cli parameter to this option is parsed like a line in the
configuration file and normally has to be quoted on the command
line. This means, you can use parameters, eg.:
compress = gzip -9
which is similar to:
--compress 'gzip -9'
- --uncompress / -u / uncompress
- The command
storeBackup.pl uses for uncompressing the files in the backup with
storeBackupRecover.pl. Default is ``bzip2 -d''. It must fit
to the parameter of option ``compress''.
The cli parameter to this option is parsed like a line in the
configuration file and normally has to be quoted on the command
line. This means, you can use parameters, eg.:
uncompress = gzip -d
which is similar to:
--uncompress 'gzip -d'
- --postfix / -p /postfix
- The postfix storeBackup.pl
will use for compressed files. This should fit to option
compress. Default is .bz2.
- --noCompress / noCompress
- Maximal number of parallel
compression operations. With GNU/Linux, the default value is
chosen automatically as the number of cores plus 1.
- --queueCompress / queueCompress
- Maximal length of a
queue to store files before they are compressed. Default value is
1000.
- --noCopy / noCopy
- Maximal number of parallel copy
operations. The default value is 1.
- --queueCopy / queueCopy
- Maximal length of a queue to
store files before they are copied. Default value is 1000.
- --withUserGroupStat / withUserGroupStat
- Write
statistics about used space in sourceDir by user and groups in the
log file.
- --userGroupStatFile / userGroupStatFile
- Write
statistics about used space in sourceDir by user and groups in
this file. The file will be overridden each time.
- --exceptSuffix / exceptSuffix
- Do not compress files
with these suffixes. On the command line, you can repeat this
option multiple times. The default value is:
exceptSuffix = '\.zip' '\.bz2' '\.gz' '\.tgz' '\.jpg' '\.gif' '\.tiff'
'\.tif' '\.mpeg' '\.mpg' '\.mp3' '\.ogg' '\.gpg' '\.png'
You should use a backslash (
) to mask the dot. If you
do not do so, the dot is interpreted as any character.
If you do not want to compress any file, you can use:
exceptSuffix = .*
- --addExceptSuffix / addExceptSuffix
- If you only want
to add suffixes to the above, use this option. On the
command line, you can repeat this option multiple times. See the
examples above (option exeptSuffix) how to use it in the
configuration file.
- --minCompressSize / minCompressSize
- Files with a size
smaller than this value will not be compressed. The default value
is 1024.
If you change this value from one backup to the next
(eg. you make the fist backup with the default value and the
second with 512), then this change affects only files which have a
new content. Files with a content which exists already in the
backup will be linked to the ones in the old backup. (So in the
example a (new) file with 600 bytes will not be compressed in the
second backup if there already were a file with the same content
in the first backup.)
- --comprRule / comprRule
- As an alternative to options
exceptSuffix and minCompressSize. If this rule is
set, exceptSuffix, addExceptSuffix and
minCompressSize are ignored. See defining
rules to understand how
to configure rules. You can eg. define a rule that the data of
serveral uses will not be compressed for easier restore by the
users itself.
The default rule generated from option exceptSuffix and
minCompressSize above is:
comprRule = '\$size > 1024' and not
'\$file =~
/\.zip\Z|\.bz2\Z|\.gz\Z|\.tgz\Z|\.jpg\Z|\.gif\Z|\.tiff\Z|\.tif\Z|\.mpeg\Z|\.mpg\Z|
\.mp3\Z|\.ogg\Z|\.gpg\Z|\.png\Z/i'
(The line break in the pattern is syntactically not correct. It's only
printed for readability.)
- --doNotCompressMD5File / doNotCompressMD5File
- StoreBackup.pl stores information about each file in the backup in
the top level directory of each backup in a file called
.md5CheckSums. It normally is compressed with bzip2. Using
this option avoids this compression. Use this, if your computer is
very slow and has only one core. It will speed up things a little bit.
- --chmodMD5File
- Everybody who wants to use
storeBackupRecover.pl needs to be able to read the file
.md5CheckSums (see option above). Default permission on
this file is 0600, which means only the one who generated the
backup has access to it. With this option you can give access to
other people. If you do so, this can be a kind of a security
hole: for all files .md5CheckSums stores md5sum, times,
uid, gid, mode (and some other information).
- --verbose / -v / verbose
- Generate verbose messages.
- --debug / -d / debug
- Generates debug messages:
0 -- no debug messages (default)
1 -- some debug messages
2 -- many debug messages
This option is especially helpful in combination with options
exceptRule and includeRule
- --resetAtime / resetAtime
- Restores the access time in
the backups (same as in source), but changes ctime (time of last
modification of file status information). Normally, you will not
use this option.
- --linkToRecent
- After a successful backup, a symbolic
link to most recent backup of this series (that's the backup just
done) is created with the name specified by this option. If an
older symbolic link exists, it will be deleted. If you change the
name of this symbolic link in the configuration, the old link will
not be removed - you have to delete it manually.
- --doNotDelete / doNotDelete
- Do all checks what backups
should be deleted, but don't delete anything. This option is
useful in combination with storeBackupDel.pl which can read the
configuration file of storeBackup.pl. StoreBackupDel.pl can delete old
backups later asynchronously.
For understanding the rules what file should be deleted, see the
``keep
'' options below.
- --deleteNotFinishedDirs / deleteNotFinishedDirs
- Delete
backups which have not been finished and are therefore not
complete. StoreBackup.pl or storeBackupDel.pl will only delete
unfinished backups if option ``doNotDelete'' is set to ``no'' (the
default value) or is unset. If ``doNotDelete'' is set to
"yes", nothing is deleted. "Backups which have not been finished"
are those for which option lateLinks was used, but for which
storeBackupUpdate.pl was not run yet.
- --keepAll / keepAll
- Keep all backups of a series for
the specified amount of time. This is like a default value for
all days in option keepWeekday (see below). Deletion of old
backups is done after the actual backup is finished or with
storeBackupDel.pl. The time range has to be specified in format
``dhms'', eg. ``10d2h'' means 10 days and 2 hours. To do so is
useful if you want to specify 10 days, because if you define this
exactly, then checking a few minutes or seconds before or later
can result in 9 days. StoreBackups internal calculation is in
seconds.
The default value is ``30d''.
- --keepWeekday / keepWeekday
- This option overwrites the
settings of option keepAll for special days of the
week. Mon,Wed:40d5m Sat:60d10m means:
- keep backups from Monday and Wednesday 40 days + 5 minutes
- keep backups from Saturday 60 days + 10 minutes
- keep backups from the rest of the weekdays like specified
via option keepAll.
You can also use the ``archive flag'' which means not to delete
the affected directories because option ``keepMaxNumber''
hits. Mon,Wed:a40d5m Sat:60d10m means:
- keep backups from Monday and Wednesday 40 days + 5 minutes +
archive
If you have more than ``keepMaxNumber'' backups, then Monday and
Wednesday backups falling in this category will not be deleted.
- keep backups from Saturday 60 days + 10 minutes
If you have more than ``keepMaxNumber'' backups, then Saturday
Backups falling in this category will be deleted.
- keep backups from the rest of the weekdays like specified
via option keepAll. If you have more than ``keepMaxNumber''
backups, then they will be deleted if they are falling in this
category.
On the command line, the parameter to this option is parsed like a
line in the configuration file and therefore normally has to be
quoted on the command line.
- --keepFirstOfYear / keepFirstOfYear
- Do not delete the
first existing backup of a year. The format is a time period (see
option keepAll) with a possible ``archive flag''.
- --keepLastOfYear / keepLastOfYear
- Do not delete the
last existing backup of a year. The format is a time period (see
option keepAll) with a possible ``archive flag''.
- --keepFirstOfMonth / keepFirstOfMonth
- Do not delete
the first existing backup of a month. The format is a time period
(see option keepAll) with a possible ``archive flag''.
- --keepLastOfMonth / keepLastOfMonth
- Do not delete the
last existing backup of a month. The format is a time period (see
option keepAll) with a possible ``archive flag''.
- --firstDayOfWeek / firstDayOfWeek
- Sets the first day
of the week for the calculations depending on options
keepFirstOfWeek and keepLastOfWeek.
Default value is ``Sun''.
- --keepFirstOfWeek / keepFirstOfWeek
- Do not delete the
first existing backup of a week. The format is a time period (see
option keepAll) with a possible ``archive flag''.
- --keepLastOfWeek / keepLastOfWeek
- Do not delete the
last existing backup of a week. The format is a time period (see
option keepAll) with a possible ``archive flag''.
- --keepDuplicate / keepDuplicate
- Keep multiple backups
of one day up to the specified value. If it's older than specified
here, delete all except the oldest backup of that day. Usage of
the ``archive'' flag is not possible. The format is like described
for option keepAll.
The default value is ``7d''.
- --keepMinNumber / keepMinNumber
- Keep that minimum of
backups. Multiple backups of one day are counted as one
backup. The default value is ``10''.
- --keepMaxNumber / keepMaxNumber
- Try to keep only that
maximum number of backups. If you have more backups than specified
here, the following sequence of deletion will happen:
- Delete all duplicates of a day, beginning with the oldest
ones, except the last of every day.
- If this is not enough, delete the rest of the backups
beginning with oldest, but never a backup with the
``archive flag'' or the last backup. See option keepWeekday for
explanations of the ``archive flag''.
- --keepRelative / -R / keepRelative
- This is a
alternative deletion scheme. If this option is set, all other
keep
options are ignored. On the command line, the parameter to
this option is parsed like a line in the configuration file and
normally has to be quoted on the command line.
This backup deletion scheme allows you to specify the relative age
of the backups you would like to have rather then the
period over which a backup should be kept.
Imagine that you always want to have the following backups
available:
- 1 backup from yesterday
- 1 backup from last week
- 1 backup from last month
- 1 backup from 3 months ago
Note that this is most likely not what you really want to
have, because it simply means that you have to do daily backups
and have to keep every backup for exactly 3 months. Otherwise you
wouldn't always
have a backup that is of exactly the requested age.
What you really want to have is therefore probably something like
this:
- 1 backup of age 1 hour to 24 hours / 1 day
- 1 backup of age 1 day to 7 days
- 1 backup of age 14 days to 31 days
- 1 backup of age 80 days to 100 days
This is now a very common backup strategy, but you would have
difficulty to achieve this with the usual keepFirstOf
options,
especially if you don't do backups with perfect
regularity. However, you can implement it very easily using
keepRelative. All you need to
write is:
keepRelative = 1h 1d 7d 14d 31d 80d 100d
i.e. you list all the intervals for which you want to have
backups. storeBackup will delete backups in such a way that you
come as close as possible (if you don't do backups often enough,
there is of course
nothing that storeBackup can do) to your requested backup scheme.
Note that this may mean that storeBackup keeps more backups that
you think it has to, i.e. it may keep two backups in the same
period. In this case storeBackup "looks into the future" and
determines that both backups will later be necessary in
order to have a backups for all periods. This is also the reason
why in the above example you have somehow implicitly specified the
period 7 days to 14 days, although you didn't really want to have
a backup in this period - in order to have backups in the next
period (14 days to 31 days) you always need to have a backup in
the period 7 days to 14 days as well. Therefore
the syntax doesn't allow you to exclude some periods.
Finally you should be aware that storeBackup shifts all the
intervals if it cannot find a recent enough backup: if your first
intervals is from 10 days to 20 days, but your most recent backup
is actually 25 days old, all subsequent periods will be extended
by 5 days. This ensures that if you haven't made any backups over
a large period, this period is not taken into account for your
backup scheme. To give an example why this is useful: if you
wanted to have backups 1, 3, 7 and 10 days old and then went on
vacation for 14 days, it is pretty unlikely that you want all your
backups deleted when you come back, hence storeBackup ignores
these 14 days and keeps the backups appropriately longer.
- --progressReport / -P / progressReport
- Print a progress
report after the specified number of files.
- --printDepth / -D / printDepth
- Print depth of actually
read directories during the backup.
- --ignoreReadError / ignoreReadError
- Setting this
option lets storeBackup.pl ignore read errors in the source
directory -- not readable directories do not cause storeBackup.pl
to stop processing. This option was implemented for reading shares
from a windows server which sometimes generated such faults.
Normally, you should not use this option.
- --suppressWarning / suppressWarning
- Suppresses
(unwanted) warnings that would normally be written to the log
(and/or standard output). This is an advanced option. For
normal use of storeBackup, you can ignore this option. In some
situations, an advanced user may not want to see certain
warnings. This option allows the user to turn those warnings
off. This feature is only available for certain non-critical
warnings: missing excluded directories, files changed during
backup, and creation of the `default' series. 10
- Using the crSeries key suppresses the warning that
storeBackup had to create a directory for the `default' series.
- Using the fileChange key suppresses any warning when
storeBackup notices that a file has changed since the current
backup began.
- Using suppressWarning with the excDir key suppresses the
warning that an excluded directory does not exist.
- Using the hashCollision key suppresses the warning
that storeBackup found a possible md5 hash collision.
- Using the fileNameWIthLineFeed key suppresses the warning
if a filename contains a line feed.
- --linkToRecent / linkToRecent
- Name of the symbolic
link. If this option is configured, storeBackup will automatically
create a symbolic link pointing to the most recent backup in the
series. This can be useful for some scripts and automated
tools. It can also be used purely for convenience. Normally, the
most recent backup is in a directory with a name based on the
timestamp (e.g., 2009.05.02_02.15.01). One could find the
last backup directory in a script with a line similar to this:
MOST_RECENT_BACKUP=`ls -d1 20??.??.??_??.??.?? | tail -1`
However, for users who, for various reasons, are not able to use a
shell command such as that, using this option is an easy and
convenient way to have a consistent path to the most recent
backup. This option makes the last backup available via a
symbolic link with the name defined in this option. Continuing the
above example, if the parameter value used for this option is
"mostRecentBackup", the symbolic link would look like this:
mostRecentBackup
2009.05.02_02.15.01
When the next backup in the future is completed, this symlink will
be automatically updated to point to the new (last)
backup. If there is an error in the backup, this symlink will
not be updated. It will continue to point the the last backup
that was completed without errors. The default behavior (if this
option is unused) is to not make this symbolic link (e.g.,
no link is created).
- --logFile / -l / logFile
- Name of the log file. Default
is stdout.
- --plusLogStdout / plusLogStdout
- If option logFile is
set, here you can configure storeBackup.pl to also print the log
messages to stdout.
- --supressTime / supressTime
- Suppress the output of the
actual time in the log file.
- --maxFilelen / -m / maxFilelen
- Maximal size of a log
file. After reaching this size, the log file will be rotated (see
option noOfOldFiles) or compressed (see option saveLogs).
- --noOfOldFiles / -n / noOfOldFiles
- Number of old
rotated log files, default is 5.
With default values, it will look like this:
$ ls -l /tmp/storebackup.log*
-rw------- 1 hjc root 328815 30. Aug 12:12 /tmp/storebackup.log
-rw------- 1 root root 1000087 27. Aug 21:18 /tmp/storebackup.log.1
-rw------- 1 root root 1000038 20. Aug 19:02 /tmp/storebackup.log.2
-rw------- 1 root root 1000094 11. Aug 18:51 /tmp/storebackup.log.3
-rw------- 1 root root 1000147 11. Aug 18:49 /tmp/storebackup.log.4
-rw------- 1 root root 1000030 11. Aug 18:49 /tmp/storebackup.log.5
Older log files than *.5 have been deleted automatically.
- --saveLogs / saveLogs
- Save the log files with a time and date stamp instead of deleting
them after rotating. (Setting this option overwrites the default
value of option noOfOldFiles.)
- --compressWith / compressWith
- Specifies the program to
compress the saved log files (eg. with gzip -9). Default
value is bzip2.
On the command line, the parameter to this option is parsed like a
line in the configuration file and normally has to be quoted on
the command line.
- --logInBackupDir / logInBackupDir
- Write the log file
(also) in the backup directory (default name is
.storeBackup.log, also see option logInBackupDirFileName
below). This log file as the case may be does not contain all
error messages like the one specified with option logFile. (The
backup directory must exist before any message can be written into
this log file.)
This is useful for having a (historical) log file, while the
``global'' log file (from option logFile) is useful for
monitoring.
- --compressLogInBackupDir / compressLogInBackupDir
- The
log file in the backup directory will be compressed if you
specify this option.
- --logInBackupDirFileName / logInBackupDirFileName
- File name of the log file to be stored in the backup
directory. Default is .storeBackup.log.
- ...otherBackupSeries... / otherBackupSeries
- On the command
line, this is not an option; it is a list parameter. So you have
to write on the command line eg.:
# storeBackup.pl <all_options> 0:server2 0-2:server3
In the configuration file this is similar to:
otherBackupSeries = 0:server2 0-2:server3
Here you can specify a list of other backup directories to
consider for hard linking. The path to their backup directories
must be a relative path from backupDir!
Format (examples):
otherSeries/2002.08.29_08.25.28 -> consider exactly this otherSeries
or
0:otherSeries -> last (youngest) in <backupDir>/otherSeries
1:otherSeries -> first before last in <backupDir>/otherSeries
n:otherSeries -> n'th before last in <backupDir>/otherSeries
3-5:otherSeries -> 3rd, 4th and 5th in <backupDir>/otherSeries
all:otherSeries -> all in <backupDir>/otherSeries
If you do not specify otherBackupSeries then automatically
the youngest backup from all series in the top level directory you
specified with option backupDir are considered.