#
$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,
# 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;
# array, and $Conf{SmbShareName} contains multiple share names, then
# the setting is assumed to apply all shares.
#
+# If a hash is used, a special key "*" means it applies to all
+# shares.
+#
# Examples:
# $Conf{BackupFilesOnly} = '/myFiles';
# $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
# 'c' => ['/myFiles', '/important'], # these are for 'c' share
# 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
# };
+# $Conf{BackupFilesOnly} = {
+# 'c' => ['/myFiles', '/important'], # these are for 'c' share
+# '*' => ['/myFiles', '/important'], # these are other shares
+# };
#
$Conf{BackupFilesOnly} = undef;
# Users report that for smbclient you should specify a directory
# followed by "/*", eg: "/proc/*", instead of just "/proc".
#
+# If a hash is used, a special key "*" means it applies to all
+# shares.
+#
# Examples:
# $Conf{BackupFilesExclude} = '/temp';
# $Conf{BackupFilesExclude} = ['/temp']; # same as first example
# 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
# 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
# };
+# $Conf{BackupFilesExclude} = {
+# 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
+# '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
+# };
#
$Conf{BackupFilesExclude} = undef;
$Conf{BackupZeroFilesIsFatal} = 1;
###########################################################################
-# General per-PC configuration settings
+# How to backup a client
# (can be overridden in the per-PC config.pl)
###########################################################################
#
# - '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.
#
#
$Conf{XferLogLevel} = 1;
+#
+# Filename charset encoding on the client. BackupPC uses utf8
+# on the server for filename encoding. If this is empty, then
+# utf8 is assumed and client filenames will not be modified. If set
+# to a different encoding then filenames will be re-encoded in utf8.
+# A typical WinXX encoding for latin1/western europe is 'cp1252'.
+# Do "perldoc Encode::Supported" to see the list of possible charset
+# values, and also see http://czyborra.com/charsets/iso8859.html.
+#
+$Conf{ClientCharset} = '';
+
+#
+# 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.
$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:
# $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)
# 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';
#
# 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+';
#
#
];
+#
+# Share name to backup. For $Conf{XferMethod} = "backuppcd" this should
+# be a file system path, eg '/' or '/home'.
+#
+# This can also be a list of multiple file system paths or modules.
+# (Can it??)
+#
+# $Conf{BackupPCdShareName} = ['/', '/var', '/data', '/boot'];
+#
+$Conf{BackupPCdShareName} = '/';
+
+#
+# Path to backuppcd executable on the server
+#
+$Conf{BackupPCdPath} = '/usr/bin/backuppcd';
+
+#
+# Full command to run backuppcd on the server to backup a given
+# client machine. The following variables are substituted at
+# run-time (TODO: update this list)
+#
+# $host host name being backed up
+# $hostIP host's IP address
+# $shareName share name to backup (ie: top-level directory path)
+# $backuppcdPath same as $Conf{BackupPCdPath}
+# $sshPath same as $Conf{SshPath}
+#
+# This setting only matters if $Conf{XferMethod} = 'backuppcd'.
+#
+# Arguments to backupcpd are:
+#
+# - the host name to backup
+# - the share name to backup
+# - the directory where the pool is
+# - the directory where the last run was (NOT DONE YET)
+# - a boolean value indicating whether or not the pool is
+# compressed or not
+# - the directory where the new run should occur (currently it assumes ".")
+#
+$Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
+
+#
+# Full command to run backuppcd on the server for restore to a
+# client machine. The following variables are substituted at
+# run-time (TODO: update this list)
+#
+# $host host name being backed up
+# $hostIP host's IP address
+# $shareName share name to backup (ie: top-level directory path)
+# $backuppcdPath same as $Conf{BackupPCdPath}
+# $sshPath same as $Conf{SshPath}
+#
+# This setting only matters if $Conf{XferMethod} = 'backuppcd'.
+#
+$Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
+
+
#
# Archive Destination
#
# 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
$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
#
$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
# 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
$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
# $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}:
# $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}:
# $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;
#
$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)
$Conf{EMailOutlookBackupSubj} = undef;
$Conf{EMailOutlookBackupMesg} = undef;
+#
+# Additional email headers
+#
+$Conf{EMailHeaders} = <<EOF;
+MIME-Version: 1.0
+Content-Type: text/plain; charset="iso-8859-1"
+EOF
+
###########################################################################
# CGI user interface configuration settings
# (can be overridden in the per-PC config.pl)
#
# Language to use. See lib/BackupPC/Lang for the list of supported
# languages, which include English (en), French (fr), Spanish (es),
-# German (de), Italian (it) and Dutch (nl).
+# German (de), Italian (it), Dutch (nl) and Portuguese Brazillian
+# (pt_br).
#
# Currently the Language setting applies to the CGI interface and email
# messages sent to users. Log files and other text are still in English.
# $Conf{CgiImageDirURL} URL.
#
$Conf{CgiCSSFile} = 'BackupPC_stnd.css';
+
+#
+# Whether the user is allowed to edit their per-PC config.
+#
+$Conf{CgiUserConfigEditEnable} = 1;
+
+#
+# Which per-host config variables a non-admin user is allowed
+# to edit.
+#
+$Conf{CgiUserConfigEdit} = {
+ FullPeriod => 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,
+};