storeBackup

Autres langues

Langue: en

Version: 314404 (ubuntu - 07/07/09)

Section: 1 (Commandes utilisateur)

NAME

storeBackup - fancy compressing managing checksumming hard-linking cp -ua

SYNOPSIS

storeBackup -f configFile [-g | --print]

or

storeBackup -s sourceDir -t targetDir

[-T tmpdir] [-L lockFile]
[--unlockBeforeDel] [--exceptDirs dir1,dir2,dir3]
[--includeDirs dir1,dir2,dir3]
[--exceptDirsSep sep]
[--exceptPattern rule] [--includePattern rule]
[--exceptTypes types]
[--precommand job] [--postcommand job] [--followLinks depth]
[-c compress] [-u uncompress] [-p postfix]
[--noCompress number] [--queueCompress number]
[--noCopy number] [--queueCopy number] [--copyBWLimit kbps]
[--withUserGroupStat] [--userGroupStatFile filename]
[--exceptSuffix suffixes]
[--addExceptSuffix suffixes] [--contExceptDirsErr]
[--compressMD5File yes|no] [--chmodMD5File] [-v]
[-d level] [--progressReport number] [--printDepth]
[--ignoreReadError] [--doNotDelete] [--resetAtime]
[--keepAll timePeriod] [--keepWeekday entry]
[--keepFirstOfYear] [--keepLastOfYear]
[--keepFirstOfMonth] [--keepLastOfMonth]
[--firstDayOfWeek day] [--keepFirstOfWeek] [--keepLastOfWeek]
[--keepDuplicate] [--keepMinNumber] [--keepMaxNumber]
[-l logFile

[--plusLogStdout] [--withTime yes|no ] [-m maxFilelen]
[[[-n noOfOldFiles]|[ --saveLogs yes|no ]]
[--compressWith compressprog]]

[--logInBackupDir yes|no [--compressLogInBackupDir yes|no]

[--logInBackupDirFileName logFile]]

[otherBackupDirs ...]

DESCRIPTION

This program copies trees to another location. Every file copied is potentially compressed (see --exceptSuffix). When a new backup is made, every file is compared to all others in the existing backup tree (by MD5 checksum, size, mtime and ctime). If a file considered identical is already present in the backup, instead of copying and compressing the file again a hard link is made. This massively reduces the size of the backup and speeds up backup runs. The program can handle normal files, directories and symbolic links.

All configuration can be done as command line arguments or in a configuration file. On Debian systems, backups configured by configuration files in /etc/storebackup.d/ are updated daily without further configuration.

OPTIONS

--file, -f
configuration file (instead of parameters)
--generate, -g
generate template of configuration file
--print
print configuration read from configuration file and stop
--sourceDir, -s
source directory (must exist)
--targetDir, -t
target directory (must exist)
--tmpdir, -T
directory for temporary file, default is /tmp
--lockFile, -L
lock file, if exists, new instances will finish if an old is already running
--unlockBeforeDel
remove the lock file before deleting old backups

default is to delete the lock file after deleting old backups

--exceptDirs, -e
directories to except from backing up (relative path), wildcards are possible and should be quoted to avoid replacements by the shell, the directories have to be separated with --exceptDirsSep
--includeDirs, -i
directories to include in the backup (relative path), wildcards are possible and have to be quoted, the directories have to be separated by --exceptDirsSep
--exceptDirsSep
Separator for --exceptDirs and --includeDirs , default is ,
--exceptPattern
Files to exclude from backing up. You can define a rule with pattern. See the config or (better) the README file for a detailed description.
--includePattern
Files to include in the backup - like --exceptPattern
--contExceptDirsErr
continue if one or more of the exceptional directories do not exist (default is to stop processing)
--exceptTypes
do not save the specified types of files, allowed: Sbcfpl
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
Backups of the types Sbc are not implemented, but you can suppress a warning if you specify them with this option
--precommand
exec job before starting the backup, checks lockFile (-L) before starting (e.g. can be used for rsync)

stops execution if job returns exit status != 0

--postcommand
exec job after finishing the backup, but before erasing of old backups

reports if job returns exit status != 0

--followLinks
follow symbolic links like directories up to depth

default = 0 -> do not follow links

--compress, -c
compress command (with options), default is bzip2
--uncompress, -u
uncompress command (with options), default is bzip2 -d
--postfix, -p
postfix to add after compression, default is .bz2
--noCompress
maximal number of parallel compress operations, default = 4
--queueCompress
length of queue to store files before compression, default = 1000
--noCopy
maximal number of parallel copy operations, default = 1
--queueCopy
length of queue to store files before copying, default = 1000
--copyBWLimit
maximum bandwidth, KBytes per second per copying process

storeBackup uses rsync for this option

default = 0 -> no limit, use cp for copying

--withUserGroupStat
write statistics about used space in log file
--userGroupStatFile
write statistics about used space in file

file will be overridden each time

--exceptSuffix
do not compress or copy files with the following suffix (uppercase included):

.bz2, .gif, .gpg, .gz, .jpg, .mp3, .mpeg, .mpg, .ogg, .png, .tgz, .tif, .tiff, .zip

--addExceptSuffix
like --exceptSuffix, but do not replace defaults, add
--compressMD5File
default is 'yes', if you do not want this, say 'no'
--chmodMD5File
permissions of .md5CheckSumFile and corresponding .storeBackupLinks directory, default is 0600
--verbose, -v
verbose messages about --exceptPattern and --includePattern
--debug, -d
generate debug messages, levels are
0 (none, default)
1 (some)
2 (many)
messages
--resetAtime
reset access time in the source directory - but this will change ctime (time of last modification of file status information)
--doNotDelete
test only, do not delete any backup
--keepAll
keep backups which are not older than the specified amount of time. This is like a default value for all days in --keepWeekday. Begins deleting at the end of the script.

the time range has to be specified in format 'dhms', e.g. 10d4h means 10 days and 4 hours, default = 30d

--keepWeekday
keep backups for the specified days for the specified amount of time. Overwrites the default values choosen in --keepAll.

e.g. 'Mon,Wed:40d Sat:60d10m' means:

keep backups of Mon and Wed 40days + 5mins
keep backups of Sat 60days + 10mins
keep backups of the rest of the days like specified in --keepAll (default 30d)

if you also use the 'archive flag' it means to not delete the affected directories via --keepMaxNumber: a10d4h means 10 days and 4 hours and 'archive flag'

e.g. 'Mon,Wed:a40d Sat:60d10m' means:

keep backups of Mon and Wed 40days + 5mins + 'archive'
keep backups of Sat 60days + 10mins
keep backups of the rest of the days like specified in --keepAll (default 30d)
--keepFirstOfYear
do not delete the first backup of a year

format is timePeriod with possible 'archive flag'

--keepLastOfYear
do not delete the last backup of a year

format is timePeriod with possible 'archive flag'

--keepFirstOfMonth
do not delete the first backup of a month

format is timePeriod with possible 'archive flag'

--keepLastOfMonth
do not delete the last backup of a month

format is timePeriod with possible 'archive flag'

--firstDayOfWeek
default: 'Sun'. This value is used for calculating --keepFirstOfWeek and --keepLastOfWeek
--keepFirstOfWeek
do not delete the first backup of a week

format is timePeriod with possible 'archive flag'

--keepLastOfWeek
do not delete the last backup of a week

format is timePeriod with possible 'archive flag'

--keepDuplicate
keep multiple backups of one day up to timePeriod

format is timePeriod, 'archive flag' is not possible

default = 7d;

--keepMinNumber
Keep that miminum of backups. Multiple backups of one day are counted as one backup.
--keepMaxNumber
Try to keep only that maximum of backups. If you have more backups, the following sequence of deleting will happen:

- delete all duplicates of a day, beginning with the old ones, except the oldest of every day

- if this is not enough, delete the rest of the backups beginning with the oldest, but *never* a backup with the 'archive flag' or the last backup

--progressReport
print progress report after each 'number' files
--printDepth
print depth of actual read directory during backup
--ignoreReadError
ignore read errors in source directory; not readable directories does not cause storeBackup to stop processing
--logFile, -l
log file (default is STDOUT)
--plusLogStdout
if you specify a log file with --logFile you can additionally print the output to STDOUT with this flag
--withTime, -w
output in logfile with time: 'yes' or 'no'

default = 'yes'

--maxFilelen, -m
maximal length of file, default = 1e6
--noOfOldFiles, -n
number of old log files, default = 5
--saveLogs
save log files with date and time instead of deleting the old (with --noOldFiles): 'yes' or 'no', default = 'no'
--compressWith
compress saved log files (e.g. with gzip -9')

default is bzip2

--logInBackupDir
write log file (also) in the backup directory: 'yes' or 'no', default is 'no'

Be aware that this log does not contain all error messages of the one specified with --logFile!

--compressLogInBackupDir
compress the log file in the backup directory:

'yes' or 'no', default is 'yes'

--logInBackupDirFileName
filename to use for writing the above log file, default is .storeBackup.log
otherBackupDirs
List of other backup directories to consider for hard linking. Format (examples):

/backupDir/2002.08.29_08.25.28 -> consider this backupDir

or

0:/backupDir -> last (youngest) backup in /backupDir

1:/backupDir -> first before last backup in /backupDir

n:/backupDir -> n'th before last backup in /backupDir

3-5:/backupDir -> 3rd, 4th and 5th in /backupDir

all:/backupDir -> all in /backupDir

SEE ALSO

storeBackupConvertBackup(1), storeBackupDel(1), storeBackupls(1), storeBackupMount(1), storeBackupRecover(1), storeBackupVersions(1)

<http://sourceforge.net/projects/storebackup>

AUTHOR

storeBackup was written by Heinz-Josef Claes.

This manual page was written by Holger Hartmann <Holger_Hartmann@gmx.de> for the Debian Project (but may be used by others).