X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=conf%2Fconfig.pl;h=bbd36df236d55d6c421e422d6d408422186e1c35;hp=714f1d722c4e77bf80e0b71967b598450720518f;hb=07d524e222fd3eeffccd2355f4a20ca5eba82f1b;hpb=bd6334a9c72e7fa75f13fd6426f5a8a8cd4ab8b1 diff --git a/conf/config.pl b/conf/config.pl index 714f1d7..bbd36df 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -108,6 +108,13 @@ $Conf{UmaskMode} = 027; # # The default value is every hour except midnight. # +# The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly +# is run. No other backups can run while BackupPC_nightly is +# running. You might want to re-arrange the entries in +# $Conf{WakeupSchedule} (they don't have to be ascending) so that +# the first entry is when you want BackupPC_nightly to run +# (eg: when you don't expect a lot of regular backups to run). +# $Conf{WakeupSchedule} = [1..23]; # @@ -133,6 +140,50 @@ $Conf{MaxUserBackups} = 4; # $Conf{MaxPendingCmds} = 10; +# +# How many BackupPC_nightly processes to run in parallel. +# +# Each night, at the first wakeup listed in $Conf{WakeupSchedule}, +# BackupPC_nightly is run. Its job is to remove unneeded files +# in the pool, ie: files that only have one link. To avoid race +# conditions, BackupPC_nightly runs only when there are no backups +# running, and no backups will start while it runs. +# +# So to reduce the elapsed time, you might want to increase this +# setting to run several BackupPC_nightly processes in parallel +# (eg: 4, or even 8). +# +$Conf{MaxBackupPCNightlyJobs} = 2; + +# +# How many days (runs) it takes BackupPC_nightly to traverse the +# entire pool. Normally this is 1, which means every night it runs, +# it does traverse the entire pool removing unused pool files. +# +# Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to +# traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it +# takes 2, 4, 8 or 16 days to completely traverse the pool. The +# advantage is that each night the running time of BackupPC_nightly +# is reduced roughly in proportion, since the total job is split +# over multiple days. The disadvantage is that unused pool files +# take longer to get deleted, which will slightly increase disk +# usage. +# +# Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly +# still runs every night. It just does less work each time it runs. +# +# Examples: +# +# $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night +# +# $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check +# # (different half each night) +# +# $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check +# # (different quarter each night) +# +$Conf{BackupPCNightlyPeriod} = 1; + # # Maximum number of log files we keep around in log directory. # These files are aged nightly. A setting of 14 means the log @@ -165,7 +216,7 @@ $Conf{DfCmd} = '$dfPath $topDir'; # $Conf{SplitPath} = '/usr/bin/split'; -$Conf{ParPath} = '/usr/bin/par'; +$Conf{ParPath} = '/usr/bin/par2'; $Conf{CatPath} = '/bin/cat'; $Conf{GzipPath} = '/bin/gzip'; $Conf{Bzip2Path} = '/usr/bin/bzip2'; @@ -337,10 +388,6 @@ $Conf{TarShareName} = '/'; # being backed up (eg: a retired machine), but you wish to keep the # last backups available for browsing or restoring to other machines. # -# Also, you might create a virtual client (by setting $Conf{ClientNameAlias}) -# for restoring to a DVD or permanent media and you would set -# $Conf{FullPeriod} to -2 so that it is never backed up. -# $Conf{FullPeriod} = 6.97; # @@ -420,11 +467,7 @@ $Conf{IncrPeriod} = 0.97; # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx # 7-8 months apart). # -# Note that you will have to increase $Conf{FullAgeMax} if you want -# very old full backups to be kept. Full backups are removed according -# to both $Conf{FullKeepCnt} and $Conf{FullAgeMax}. -# -# Note also that these two settings are equivalent and both keep just +# Example: these two settings are equivalent and both keep just # the four most recent full dumps: # # $Conf{FullKeepCnt} = 4; @@ -437,6 +480,10 @@ $Conf{FullKeepCnt} = 1; # we keep at least $Conf{FullKeepCntMin} full backups no matter how old # they are. # +# Note that $Conf{FullAgeMax} will be increased to $Conf{FullAgeMax} +# times $Conf{FullPeriod} if $Conf{FullAgeMax} specifies enough +# full backups to exceed $Conf{FullAgeMax}. +# $Conf{FullKeepCntMin} = 1; $Conf{FullAgeMax} = 90; @@ -457,6 +504,21 @@ $Conf{IncrKeepCnt} = 6; $Conf{IncrKeepCntMin} = 1; $Conf{IncrAgeMax} = 30; +# +# A failed full backup is saved as a partial backup. The rsync +# XferMethod can take advantage of the partial full when the next +# backup is run. This parameter sets the age of the partial full +# in days: if the partial backup is older than this number of +# days, then rsync will ignore (not use) the partial full when +# the next backup is run. If you set this to a negative value +# then no partials will be saved. If you set this to 0, partials +# will be saved, but will not be used by the next backup. +# +# The default setting of 3 days means that a partial older than +# 3 days is ignored when the next full backup is done. +# +$Conf{PartialAgeMax} = 3; + # # Whether incremental backups are filled. "Filling" means that the # most recent full (or filled) dump is merged into the new incremental @@ -519,7 +581,7 @@ $Conf{ArchiveInfoKeepCnt} = 10; # to give a list of directories or files to backup for each share # (the share name is the key). If this is set to just a string or # array, and $Conf{SmbShareName} contains multiple share names, then -# the setting is assumed to apply to only the first share name. +# the setting is assumed to apply all shares. # # Examples: # $Conf{BackupFilesOnly} = '/myFiles'; @@ -544,7 +606,7 @@ $Conf{BackupFilesOnly} = undef; # to give a list of directories or files to exclude for each share # (the share name is the key). If this is set to just a string or # array, and $Conf{SmbShareName} contains multiple share names, then -# the setting is assumed to apply to only the first share name. +# the setting is assumed to apply to all shares. # # The exact behavior is determined by the underlying transport program, # smbclient or tar. For smbclient the exlclude file list is passed into @@ -673,21 +735,33 @@ $Conf{BackupZeroFilesIsFatal} = 1; # # The valid values are: # -# - 'smb': backup and restore via smbclient and the SMB protocol. -# Best choice for WinXX. +# - 'smb': backup and restore via smbclient and the SMB protocol. +# Easiest choice for WinXX. # -# - 'rsync': backup and restore via rsync (via rsh or ssh). -# Best choice for linux/unix. Can also work on WinXX. +# - 'rsync': backup and restore via rsync (via rsh or ssh). +# Best choice for linux/unix. Good choice also for WinXX. # -# - 'rsyncd': backup and restre via rsync daemon on the client. -# Best choice for linux/unix if you have rsyncd running on -# the client. Can also work on WinXX. +# - 'rsyncd': backup and restre via rsync daemon on the client. +# Best choice for linux/unix if you have rsyncd running on +# the client. Good choice also for WinXX. # # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs. # Good choice for linux/unix. # +# - 'archive': host is a special archive host. Backups are not done. +# An archive host is used to archive other host's backups +# to permanent media, such as tape, CDR or DVD. +# +# $Conf{XferMethod} = 'smb'; +# +# Level of verbosity in Xfer log files. 0 means be quiet, 1 will give +# will give one line per file, 2 will also show skipped files on +# incrementals, higher values give more output. +# +$Conf{XferLogLevel} = 1; + # # Full path for smbclient. Security caution: normal users should not # allowed to write to this file or directory. @@ -921,6 +995,29 @@ $Conf{RsyncdPasswd} = ''; # $Conf{RsyncdAuthRequired} = 1; +# +# When rsync checksum caching is enabled (by adding the +# --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached +# checksums can be occaisonally verified to make sure the file +# contents matches the cached checksums. This is to avoid the +# risk that disk problems might cause the pool file contents to +# get corrupted, but the cached checksums would make BackupPC +# think that the file still matches the client. +# +# This setting is the probability (0 means never and 1 means always) +# that a file will be rechecked. Setting it to 0 means the checksums +# will not be rechecked (unless there is a phase 0 failure). Setting +# it to 1 (ie: 100%) means all files will be checked, but that is +# not a desirable setting since you are better off simply turning +# caching off (ie: remove the --checksum-seed option). +# +# The default of 0.01 means 1% (on average) of the files during a full +# backup will have their cached checksum re-checked. +# +# This setting has no effect unless checksum caching is turned on. +# +$Conf{RsyncCsumCacheVerifyProb} = 0.01; + # # Arguments to rsync for backup. Do not edit the first set unless you # have a thorough understanding of how File::RsyncP works. @@ -948,6 +1045,14 @@ $Conf{RsyncArgs} = [ '--times', '--block-size=2048', '--recursive', + + # + # If you are using a patched client rsync that supports the + # --checksum-seed option (see http://backuppc.sourceforge.net), + # then uncomment this to enabled rsync checksum cachcing + # + #'--checksum-seed=32761', + # # Add additional arguments here # @@ -965,31 +1070,30 @@ $Conf{RsyncRestoreArgs} = [ # # Do not edit these! # - "--numeric-ids", - "--perms", - "--owner", - "--group", - "--devices", - "--links", - "--times", - "--block-size=2048", - "--relative", - "--ignore-times", - "--recursive", + '--numeric-ids', + '--perms', + '--owner', + '--group', + '--devices', + '--links', + '--times', + '--block-size=2048', + '--relative', + '--ignore-times', + '--recursive', + + # + # If you are using a patched client rsync that supports the + # --checksum-seed option (see http://backuppc.sourceforge.net), + # then uncomment this to enabled rsync checksum cachcing + # + #'--checksum-seed=32761', + # # Add additional arguments here # ]; -# -# Amount of verbosity in Rsync Xfer log files. 0 means be quiet, -# 1 will give will give one line per file, 2 will also show skipped -# files on incrementals, higher values give more output. 10 will -# include byte dumps of all data read/written, which will make the -# log files huge. -# -$Conf{RsyncLogLevel} = 1; - # # Archive Destination # @@ -1014,8 +1118,9 @@ $Conf{ArchiveComp} = 'gzip'; # # Archive Parity Files # -# The number of Parity Files to generate. -# Uses the commandline par available from +# The amount of Parity data to generate, as a percentage +# of the archive size. +# Uses the commandline par2 (par2cmdline) available from # http://parchive.sourceforge.net # # Only useful for file dumps. @@ -1030,6 +1135,9 @@ $Conf{ArchivePar} = 0; # Only for file archives. Splits the output into # the specified size * 1,000,000. # e.g. to split into 650,000,000 bytes, specify 650 below. +# +# If the value is 0, or if $Conf{ArchiveDest} is an existing file or +# device (e.g. a streaming tape drive), this feature is disabled. # $Conf{ArchiveSplit} = 650; @@ -1042,14 +1150,14 @@ $Conf{ArchiveSplit} = 650; # $Installdir The installation directory of BackupPC # $tarCreatePath The path to BackupPC_tarCreate # $splitpath The path to the split program -# $parpath The path to the par program +# $parpath The path to the par2 program # $host The host to archive # $backupnumber The backup number of the host to archive # $compression The path to the compression program # $compext The extension assigned to the compression type # $splitsize The number of bytes to split archives into # $archiveloc The location to put the archive -# $parfile The number of par files to create +# $parfile The amount of parity data to create (percentage) # $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost' . ' $tarCreatePath $splitpath $parpath $host $backupnumber' @@ -1290,7 +1398,7 @@ $Conf{MaxOldPerPCLogFiles} = 12; # $HostList list of hosts being archived # $BackupList list of backup numbers for the hosts being archived # $archiveloc location where the archive is sent to -# $parfile number of par files being generated +# $parfile amount of parity data being generated (percentage) # $compression compression program being used (eg: cat, gzip, bzip2) # $compext extension used for compression type (eg: raw, gz, bz2) # $splitsize size of the files that the archive creates @@ -1493,7 +1601,7 @@ $Conf{CgiURL} = undef; # # Language to use. See lib/BackupPC/Lang for the list of supported # languages, which include English (en), French (fr), Spanish (es), -# German (de), and Italian (it). +# German (de), Italian (it) and Dutch (nl). # # Currently the Language setting applies to the CGI interface and email # messages sent to users. Log files and other text are still in English. @@ -1532,11 +1640,38 @@ $Conf{CgiDateFormatMMDD} = 1; # # If set, the complete list of hosts appears in the left navigation -# bar for administrators. Otherwise, just the hosts for which the -# user is listed in the host file (as either the user or in moreUsers) +# bar pull-down for administrators. Otherwise, just the hosts for which +# the user is listed in the host file (as either the user or in moreUsers) # are displayed. # -$Conf{CgiNavBarAdminAllHosts} = 0; +$Conf{CgiNavBarAdminAllHosts} = 1; + +# +# Enable/disable the search box in the navigation bar. +# +$Conf{CgiSearchBoxEnable} = 1; + +# +# Additional navigation bar links. These appear for both regular users +# and administrators. This is a list of hashes giving the link (URL) +# and the text (name) for the link. Specifying lname instead of name +# uses the language specific string (ie: $Lang->{lname}) instead of +# just literally displaying name. +# +$Conf{CgiNavBarLinks} = [ + { + link => "?action=view&type=docs", + lname => "Documentation", # actually displays $Lang->{Documentation} + }, + { + link => "http://backuppc.sourceforge.net/faq", + name => "FAQ", # displays literal "FAQ" + }, + { + link => "http://backuppc.sourceforge.net", + name => "SourceForge", # displays literal "SourceForge" + }, +]; # # Hilight colors based on status that are used in the PC summary page. @@ -1586,171 +1721,8 @@ $Conf{CgiExt2ContentType} = { }; $Conf{CgiImageDirURL} = ''; # -# CSS stylesheet for the CGI interface. -# -$Conf{CSSstylesheet} = <<'EOF'; - -EOF +# CSS stylesheet for the CGI interface. It is stored in the +# $Conf{CgiImageDir} directory and accessed via the +# $Conf{CgiImageDirURL} URL. +# +$Conf{CgiCSSFile} = 'BackupPC_stnd.css';