X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=conf%2Fconfig.pl;h=1284c5d3c0511b7e792df606fabc4242e9427c96;hp=bbd36df236d55d6c421e422d6d408422186e1c35;hb=17dcbbebb871212f90b81bb97f8d1feb528bdc43;hpb=07d524e222fd3eeffccd2355f4a20ca5eba82f1b diff --git a/conf/config.pl b/conf/config.pl index bbd36df..1284c5d 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -300,72 +300,36 @@ $Conf{BackupPCUserVerify} = 1; # $Conf{HardLinkMax} = 31999; -########################################################################### -# What to backup and when to do it -# (can be overridden in the per-PC config.pl) -########################################################################### # -# Name of the host share that is backed up when using SMB. This can be a -# string or an array of strings if there are multiple shares per host. -# Examples: -# -# $Conf{SmbShareName} = 'c'; # backup 'c' share -# $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares -# -# This setting only matters if $Conf{XferMethod} = 'smb'. +# Advanced option for asking BackupPC to load additional perl modules. +# Can be a list (array ref) of module names to load at startup. # -$Conf{SmbShareName} = 'C$'; +$Conf{PerlModuleLoad} = undef; # -# Smbclient share user name. This is passed to smbclient's -U argument. -# -# This setting only matters if $Conf{XferMethod} = 'smb'. +# Path to init.d script and command to use that script to start the +# server from the CGI interface. The following variables are substituted +# at run-time: # -$Conf{SmbShareUserName} = ''; - +# $sshPath path to ssh ($Conf{SshPath}) +# $serverHost same as $Conf{ServerHost} +# $serverInitdPath path to init.d script ($Conf{ServerInitdPath}) # -# Smbclient share password. This is passed to smbclient via its PASSWD -# environment variable. There are several ways you can tell BackupPC -# the smb share password. In each case you should be very careful about -# security. If you put the password here, make sure that this file is -# not readable by regular users! See the "Setting up config.pl" section -# in the documentation for more information. +# Example: # -# This setting only matters if $Conf{XferMethod} = 'smb'. +# $Conf{ServerInitdPath} = '/etc/init.d/backuppc'; +# $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost' +# . ' $serverInitdPath start' +# . ' < /dev/null >& /dev/null'; # -$Conf{SmbSharePasswd} = ''; +$Conf{ServerInitdPath} = ''; +$Conf{ServerInitdStartCmd} = ''; -# -# Which host directories to backup when using tar transport. This can be a -# string or an array of strings if there are multiple directories to -# backup per host. Examples: -# -# $Conf{TarShareName} = '/'; # backup everything -# $Conf{TarShareName} = '/home'; # only backup /home -# $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src -# -# The fact this parameter is called 'TarShareName' is for historical -# consistency with the Smb transport options. You can use any valid -# directory on the client: there is no need for it to correspond to -# any Smb share or device mount point. -# -# Note also that you can also use $Conf{BackupFilesOnly} to specify -# a specific list of directories to backup. It's more efficient to -# use this option instead of $Conf{TarShareName} since a new tar is -# run for each entry in $Conf{TarShareName}. -# -# On the other hand, if you add --one-file-system to $Conf{TarClientCmd} -# you can backup each file system separately, which makes restoring one -# bad file system easier. In this case you would list all of the mount -# points here, since you can't get the same result with -# $Conf{BackupFilesOnly}: -# -# $Conf{TarShareName} = ['/', '/var', '/data', '/boot']; -# -# This setting only matters if $Conf{XferMethod} = 'tar'. -# -$Conf{TarShareName} = '/'; +########################################################################### +# What to backup and when to do it +# (can be overridden in the per-PC config.pl) +########################################################################### # # Minimum period in days between full backups. A full dump will only be # done if at least this much time has elapsed since the last full dump, @@ -480,8 +444,8 @@ $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 +# Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt} +# times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough # full backups to exceed $Conf{FullAgeMax}. # $Conf{FullKeepCntMin} = 1; @@ -725,7 +689,7 @@ $Conf{BlackoutPeriods} = [ $Conf{BackupZeroFilesIsFatal} = 1; ########################################################################### -# General per-PC configuration settings +# How to backup a client # (can be overridden in the per-PC config.pl) ########################################################################### # @@ -741,7 +705,7 @@ $Conf{BackupZeroFilesIsFatal} = 1; # - '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. +# - 'rsyncd': backup and restore via rsync daemon on the client. # Best choice for linux/unix if you have rsyncd running on # the client. Good choice also for WinXX. # @@ -762,6 +726,37 @@ $Conf{XferMethod} = 'smb'; # $Conf{XferLogLevel} = 1; +# +# Name of the host share that is backed up when using SMB. This can be a +# string or an array of strings if there are multiple shares per host. +# Examples: +# +# $Conf{SmbShareName} = 'c'; # backup 'c' share +# $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares +# +# This setting only matters if $Conf{XferMethod} = 'smb'. +# +$Conf{SmbShareName} = 'C$'; + +# +# Smbclient share user name. This is passed to smbclient's -U argument. +# +# This setting only matters if $Conf{XferMethod} = 'smb'. +# +$Conf{SmbShareUserName} = ''; + +# +# Smbclient share password. This is passed to smbclient via its PASSWD +# environment variable. There are several ways you can tell BackupPC +# the smb share password. In each case you should be very careful about +# security. If you put the password here, make sure that this file is +# not readable by regular users! See the "Setting up config.pl" section +# in the documentation for more information. +# +# This setting only matters if $Conf{XferMethod} = 'smb'. +# +$Conf{SmbSharePasswd} = ''; + # # Full path for smbclient. Security caution: normal users should not # allowed to write to this file or directory. @@ -775,7 +770,7 @@ $Conf{XferLogLevel} = 1; $Conf{SmbClientPath} = '/usr/bin/smbclient'; # -# Commands to run smbclient for a full dump, incremental dump or a restore. +# Command to run smbclient for a full dump. # This setting only matters if $Conf{XferMethod} = 'smb'. # # The following variables are substituted at run-time: @@ -790,22 +785,65 @@ $Conf{SmbClientPath} = '/usr/bin/smbclient'; # $X_option exclude option (if $fileList is an exclude list) # $timeStampFile start time for incremental dump # -# If your smb share is read-only then direct restores will fail. -# You should set $Conf{SmbClientRestoreCmd} to undef and the -# corresponding CGI restore option will be removed. -# $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' . ' $I_option -U $userName -E -N -d 1' . ' -c tarmode\\ full -Tc$X_option - $fileList'; +# +# Command to run smbclient for an incremental dump. +# This setting only matters if $Conf{XferMethod} = 'smb'. +# +# Same variable substitutions are applied as $Conf{SmbClientFullCmd}. +# $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' . ' $I_option -U $userName -E -N -d 1' . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; +# +# Command to run smbclient for a restore. +# This setting only matters if $Conf{XferMethod} = 'smb'. +# +# Same variable substitutions are applied as $Conf{SmbClientFullCmd}. +# +# If your smb share is read-only then direct restores will fail. +# You should set $Conf{SmbClientRestoreCmd} to undef and the +# corresponding CGI restore option will be removed. +# $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' . ' $I_option -U $userName -E -N -d 1' . ' -c tarmode\\ full -Tx -'; +# +# Which host directories to backup when using tar transport. This can be a +# string or an array of strings if there are multiple directories to +# backup per host. Examples: +# +# $Conf{TarShareName} = '/'; # backup everything +# $Conf{TarShareName} = '/home'; # only backup /home +# $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src +# +# The fact this parameter is called 'TarShareName' is for historical +# consistency with the Smb transport options. You can use any valid +# directory on the client: there is no need for it to correspond to +# any Smb share or device mount point. +# +# Note also that you can also use $Conf{BackupFilesOnly} to specify +# a specific list of directories to backup. It's more efficient to +# use this option instead of $Conf{TarShareName} since a new tar is +# run for each entry in $Conf{TarShareName}. +# +# On the other hand, if you add --one-file-system to $Conf{TarClientCmd} +# you can backup each file system separately, which makes restoring one +# bad file system easier. In this case you would list all of the mount +# points here, since you can't get the same result with +# $Conf{BackupFilesOnly}: +# +# $Conf{TarShareName} = ['/', '/var', '/data', '/boot']; +# +# This setting only matters if $Conf{XferMethod} = 'tar'. +# +$Conf{TarShareName} = '/'; + # # Full command to run tar on the client. GNU tar is required. You will # need to fill in the correct paths for ssh2 on the local host (server) @@ -842,7 +880,7 @@ $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' # This setting only matters if $Conf{XferMethod} = 'tar'. # $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' - . ' $tarPath -c -v -f - -C $shareName+' + . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+' . ' --totals'; # @@ -899,7 +937,7 @@ $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+'; # restore option will be removed. # $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' - . ' $tarPath -x -p --numeric-owner --same-owner' + . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner' . ' -v -f - -C $shareName+'; # @@ -1139,7 +1177,7 @@ $Conf{ArchivePar} = 0; # 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; +$Conf{ArchiveSplit} = 0; # # Archive Command @@ -1251,23 +1289,15 @@ $Conf{PingPath} = '/bin/ping'; $Conf{PingCmd} = '$pingPath -c 1 $host'; # -# Path to init.d script and command to use that script to start the -# server from the CGI interface. The following variables are substituted -# at run-time: -# -# $sshPath path to ssh ($Conf{SshPath}) -# $serverHost same as $Conf{ServerHost} -# $serverInitdPath path to init.d script ($Conf{ServerInitdPath}) -# -# Example: -# -# $Conf{ServerInitdPath} = '/etc/init.d/backuppc'; -# $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost' -# . ' $serverInitdPath start' -# . ' < /dev/null >& /dev/null'; +# Maximum round-trip ping time in milliseconds. This threshold is set +# to avoid backing up PCs that are remotely connected through WAN or +# dialup connections. The output from ping -s (assuming it is supported +# on your system) is used to check the round-trip packet time. On your +# local LAN round-trip times should be much less than 20msec. On most +# WAN or dialup connections the round-trip time will be typically more +# than 20msec. Tune if necessary. # -$Conf{ServerInitdPath} = ''; -$Conf{ServerInitdStartCmd} = ''; +$Conf{PingMaxMsec} = 20; # # Compression level to use on files. 0 means no compression. Compression @@ -1300,17 +1330,6 @@ $Conf{ServerInitdStartCmd} = ''; # $Conf{CompressLevel} = 0; -# -# Maximum round-trip ping time in milliseconds. This threshold is set -# to avoid backing up PCs that are remotely connected through WAN or -# dialup connections. The output from ping -s (assuming it is supported -# on your system) is used to check the round-trip packet time. On your -# local LAN round-trip times should be much less than 20msec. On most -# WAN or dialup connections the round-trip time will be typically more -# than 20msec. Tune if necessary. -# -$Conf{PingMaxMsec} = 20; - # # Timeout in seconds when listening for the transport program's # (smbclient, tar etc) stdout. If no output is received during this @@ -1325,7 +1344,7 @@ $Conf{PingMaxMsec} = 20; # Despite the name, this parameter sets the timeout for all transport # methods (tar, smb etc). # -$Conf{ClientTimeout} = 7200; +$Conf{ClientTimeout} = 72000; # # Maximum number of log files we keep around in each PC's directory @@ -1341,16 +1360,20 @@ $Conf{ClientTimeout} = 7200; $Conf{MaxOldPerPCLogFiles} = 12; # -# Optional commands to run before and after dumps and restores. +# Optional commands to run before and after dumps and restores, +# and also before and after each share of a dump. +# # Stdout from these commands will be written to the Xfer (or Restore) # log file. One example of using these commands would be to -# shut down and restart a database server, or to dump a database -# to files for backup. Example: +# shut down and restart a database server, dump a database +# to files for backup, or doing a snapshot of a share prior +# to a backup. Example: # # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql'; # # The following variable substitutions are made at run time for -# $Conf{DumpPreUserCmd} and $Conf{DumpPostUserCmd}: +# $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd} +# and $Conf{DumpPostShareCmd}: # # $type type of dump (incr or full) # $xferOK 1 if the dump succeeded, 0 if it didn't @@ -1360,10 +1383,12 @@ $Conf{MaxOldPerPCLogFiles} = 12; # $hostIP IP address of host # $user user name from the hosts file # $moreUsers list of additional users from the hosts file -# $share the first share name +# $share the first share name (or current share for +# $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd}) # $shares list of all the share names # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb) # $sshPath value of $Conf{SshPath}, +# $cmdType set to DumpPreUserCmd or DumpPostUserCmd # # The following variable substitutions are made at run time for # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}: @@ -1385,6 +1410,7 @@ $Conf{MaxOldPerPCLogFiles} = 12; # $pathHdrSrc common starting path of restore source # $pathHdrDest common starting path of destination # $fileList list of files being restored +# $cmdType set to RestorePreUserCmd or RestorePostUserCmd # # The following variable substitutions are made at run time for # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}: @@ -1404,9 +1430,12 @@ $Conf{MaxOldPerPCLogFiles} = 12; # $splitsize size of the files that the archive creates # $sshPath value of $Conf{SshPath}, # $type set to "archive" +# $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd # $Conf{DumpPreUserCmd} = undef; $Conf{DumpPostUserCmd} = undef; +$Conf{DumpPreShareCmd} = undef; +$Conf{DumpPostShareCmd} = undef; $Conf{RestorePreUserCmd} = undef; $Conf{RestorePostUserCmd} = undef; $Conf{ArchivePreUserCmd} = undef; @@ -1431,12 +1460,6 @@ $Conf{ArchivePostUserCmd} = undef; # $Conf{ClientNameAlias} = undef; -# -# Advanced option for asking BackupPC to load additional perl modules. -# Can be a list (array ref) of module names to load at startup. -# -$Conf{PerlModuleLoad} = undef; - ########################################################################### # Email reminders, status and messages # (can be overridden in the per-PC config.pl) @@ -1560,6 +1583,14 @@ $Conf{EMailNotifyOldOutlookDays} = 5.0; $Conf{EMailOutlookBackupSubj} = undef; $Conf{EMailOutlookBackupMesg} = undef; +# +# Additional email headers +# +$Conf{EMailHeaders} = < 1, + IncrPeriod => 1, + FullKeepCnt => 1, + FullKeepCntMin => 1, + FullAgeMax => 1, + IncrKeepCnt => 1, + IncrKeepCntMin => 1, + IncrAgeMax => 1, + PartialAgeMax => 1, + IncrFill => 1, + RestoreInfoKeepCnt => 1, + ArchiveInfoKeepCnt => 1, + BackupFilesOnly => 1, + BackupFilesExclude => 1, + BlackoutBadPingLimit => 1, + BlackoutGoodCnt => 1, + BlackoutPeriods => 1, + BackupZeroFilesIsFatal => 1, + XferMethod => 1, + XferLogLevel => 1, + SmbShareName => 1, + SmbShareUserName => 1, + SmbSharePasswd => 1, + TarShareName => 1, + TarFullArgs => 1, + TarIncrArgs => 1, + RsyncShareName => 1, + RsyncdClientPort => 1, + RsyncdPasswd => 1, + RsyncdAuthRequired => 1, + RsyncCsumCacheVerifyProb => 1, + RsyncArgs => 1, + RsyncRestoreArgs => 1, + ArchiveDest => 1, + ArchiveComp => 1, + ArchivePar => 1, + ArchiveSplit => 1, + FixedIPNetBiosNameCheck => 1, + PingMaxMsec => 1, + ClientTimeout => 1, + MaxOldPerPCLogFiles => 1, + CompressLevel => 1, + ClientNameAlias => 1, + EMailNotifyMinDays => 1, + EMailFromUserName => 1, + EMailAdminUserName => 1, + EMailUserDestDomain => 1, + EMailNoBackupEverSubj => 1, + EMailNoBackupEverMesg => 1, + EMailNotifyOldBackupDays => 1, + EMailNoBackupRecentSubj => 1, + EMailNoBackupRecentMesg => 1, + EMailNotifyOldOutlookDays => 1, + EMailOutlookBackupSubj => 1, + EMailOutlookBackupMesg => 1, + EMailHeaders => 1, +};