#
# 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;
 
#
# 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 converted
# to/from utf8 automatically during backup and restore.
#
# If the file names displayed in the browser (eg: accents or special
# characters) don't look right then it is likely you haven't set
# $Conf{ClientCharset} correctly.
#
# If you are using smbclient on a WinXX machine, smbclient will convert
# to the "unix charset" setting in smb.conf. The default is utf8,
# in which case leave $Conf{ClientCharset} empty since smbclient does
# the right conversion.
#
# If you are using rsync on a WinXX machine then it does no conversion.
# A typical WinXX encoding for latin1/western europe is 'cp1252',
# so in this case set $Conf{ClientCharset} to 'cp1252'.
#
# On a linux or unix client, run "locale charmap" to see the client's
# charset. Set $Conf{ClientCharset} to this value. A typical value
# for english/US is 'ISO-8859-1'.
#
# Do "perldoc Encode::Supported" to see the list of possible charset
# provides more information on the iso-8859 charsets.
#
$Conf{ClientCharset} = '';
 
#
# Prior to 3.x no charset conversion was done by BackupPC. Backups were
# stored in what ever charset the XferMethod provided - typically utf8
# for smbclient and the client's locale settings for rsync and tar (eg:
# cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux).
# This setting tells BackupPC the charset that was used to store file
# names in old backups taken with BackupPC 2.x, so that non-ascii file
# names in old backups can be viewed and restored.
#
#$Conf{ClientCharsetLegacy} = 'iso-8859-1';
$Conf{ClientCharsetLegacy} = 'utf8';
 
###########################################################################
# Samba Configuration
# (can be overwritten in the per-PC log file)
###########################################################################
#
# 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.
#
# smbclient is from the Samba distribution. smbclient is used to
# actually extract the incremental or full dump of the share filesystem
# from the PC.
#
# This setting only matters if $Conf{XferMethod} = 'smb'.
#
$Conf{SmbClientPath} = '/usr/bin/smbclient';
 
#
# Command to run smbclient for a full dump.
# This setting only matters if $Conf{XferMethod} = 'smb'.
#
# The following variables are substituted at run-time:
#
#    $smbClientPath   same as $Conf{SmbClientPath}
#    $host            host to backup/restore
#    $hostIP          host IP address
#    $shareName       share name
#    $userName        user name
#    $fileList        list of files to backup (based on exclude/include)
#    $I_option        optional -I option to smbclient
#    $X_option        exclude option (if $fileList is an exclude list)
#    $timeStampFile   start time for incremental dump
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$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}.
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$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.
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
            . ' $I_option -U $userName -E -N -d 1'
            . ' -c tarmode\\ full -Tx -';
 
###########################################################################
# Tar Configuration
# (can be overwritten in the per-PC log file)
###########################################################################
#
# 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)
# and GNU tar on the client. Security caution: normal users should not
# allowed to write to these executable files or directories.
#
# See the documentation for more information about setting up ssh2 keys.
#
# If you plan to use NFS then tar just runs locally and ssh2 is not needed.
# For example, assuming the client filesystem is mounted below /mnt/hostName,
# you could use something like:
#
#    $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
#                        . ' --totals';
#
# In the case of NFS or rsh you need to make sure BackupPC's privileges
# are sufficient to read all the files you want to backup. Also, you
# will probably want to add "/proc" to $Conf{BackupFilesExclude}.
#
# The following variables are substituted at run-time:
#
#   $host        host name
#   $hostIP      host's IP address
#   $incrDate    newer-than date for incremental backups
#   $shareName   share name to backup (ie: top-level directory path)
#   $fileList    specific files to backup or exclude
#   $tarPath     same as $Conf{TarClientPath}
#   $sshPath     same as $Conf{SshPath}
#
# If a variable is followed by a "+" it is shell escaped. This is
# necessary for the command part of ssh or rsh, since it ends up
# getting passed through the shell.
#
# This setting only matters if $Conf{XferMethod} = 'tar'.
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
                    . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
                    . ' --totals';
 
#
# Extra tar arguments for full backups. Several variables are substituted at
# run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
#
# If you are running tar locally (ie: without rsh or ssh) then remove the
# "+" so that the argument is no longer shell escaped.
#
# This setting only matters if $Conf{XferMethod} = 'tar'.
#
$Conf{TarFullArgs} = '$fileList+';
 
#
# Extra tar arguments for incr backups. Several variables are substituted at
# run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
#
# Note that GNU tar has several methods for specifying incremental backups,
# including:
#
#   --newer-mtime $incrDate+
#          This causes a file to be included if the modification time is
#          later than $incrDate (meaning its contents might have changed).
#          But changes in the ownership or modes will not qualify the
#          file to be included in an incremental.
#
#   --newer=$incrDate+
#          This causes the file to be included if any attribute of the
#          file is later than $incrDate, meaning either attributes or
#          the modification time. This is the default method. Do
#          not use --atime-preserve in $Conf{TarClientCmd} above,
#          otherwise resetting the atime (access time) counts as an
#          attribute change, meaning the file will always be included
#          in each new incremental dump.
#
# If you are running tar locally (ie: without rsh or ssh) then remove the
# "+" so that the argument is no longer shell escaped.
#
# This setting only matters if $Conf{XferMethod} = 'tar'.
#
$Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
 
#
# Full command to run tar for restore on the client. GNU tar is required.
# This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
# and ssh's -n removed.
#
# See $Conf{TarClientCmd} for full details.
#
# This setting only matters if $Conf{XferMethod} = "tar".
#
# If you want to disable direct restores using tar, you should set
# $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
# restore option will be removed.
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
         . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
         . ' -v -f - -C $shareName+';
 
#
# Full path for tar on the client. Security caution: normal users should not
# allowed to write to this file or directory.
#
# This setting only matters if $Conf{XferMethod} = 'tar'.
#
$Conf{TarClientPath} = '/bin/gtar';
 
###########################################################################
# Rsync/Rsyncd Configuration
# (can be overwritten in the per-PC log file)
###########################################################################
#
# Path to rsync executable on the client
#
$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/rsync';
 
#
# Full command to run rsync on the client machine. The following variables
# are substituted at run-time:
#
#        $host           host name being backed up
#        $hostIP         host's IP address
#        $shareName      share name to backup (ie: top-level directory path)
#        $rsyncPath      same as $Conf{RsyncClientPath}
#        $sshPath        same as $Conf{SshPath}
#        $argList        argument list, built from $Conf{RsyncArgs},
#                        $shareName, $Conf{BackupFilesExclude} and
#                        $Conf{BackupFilesOnly}
#
# This setting only matters if $Conf{XferMethod} = 'rsync'.
#
$Conf{RsyncClientCmd} = '$sshPath -q -x -l backuppc-user $host $rsyncPath $argList+';
 
#
# Full command to run rsync for restore on the client. The following
# variables are substituted at run-time:
#
#        $host           host name being backed up
#        $hostIP         host's IP address
#        $shareName      share name to backup (ie: top-level directory path)
#        $rsyncPath      same as $Conf{RsyncClientPath}
#        $sshPath        same as $Conf{SshPath}
#        $argList        argument list, built from $Conf{RsyncArgs},
#                        $shareName, $Conf{BackupFilesExclude} and
#                        $Conf{BackupFilesOnly}
#
# This setting only matters if $Conf{XferMethod} = 'rsync'.
#
# Note: all Cmds are executed directly without a shell, so the prog name
# needs to be a full path and you can't include shell syntax like
# redirection and pipes; put that in a script if you need it.
#
$Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l backuppc-user $host $rsyncPath $argList+';
 
#
# Share name to backup. For $Conf{XferMethod} = "rsync" this should
# be a file system path, eg '/' or '/home'.
#
# For $Conf{XferMethod} = "rsyncd" this should be the name of the module
# to backup (ie: the name from /etc/rsynd.conf).
#
# This can also be a list of multiple file system paths or modules.
# For example, by adding --one-file-system to $Conf{RsyncArgs} 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:
#
#     $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
#
$Conf{RsyncShareName} = '/';
 
#
# Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
#
$Conf{RsyncdClientPort} = 873;
 
#
# Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
# The user name and password are stored on the client in whatever file
# the "secrets file" parameter in rsyncd.conf points to
# (eg: /etc/rsyncd.secrets).
#
$Conf{RsyncdUserName} = '';
 
#
# Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
# The user name and password are stored on the client in whatever file
# the "secrets file" parameter in rsyncd.conf points to
# (eg: /etc/rsyncd.secrets).
#
$Conf{RsyncdPasswd} = '';
 
#
# Whether authentication is mandatory when connecting to the client's
# rsyncd. By default this is on, ensuring that BackupPC will refuse to
# connect to an rsyncd on the client that is not password protected.
# Turn off at your own risk.
#
$Conf{RsyncdAuthRequired} = 1;
 
#
# When rsync checksum caching is enabled (by adding the
# --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
# checksums can be occasionally 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.
#
$Conf{RsyncArgs} = [
       #
       # Do not edit these!
       #
            '--numeric-ids',
            '--perms',
            '--owner',
            '--group',
            '-D',
            '--links',
            '--hard-links',
            '--times',
            '--block-size=2048',
            '--recursive',
 
       #
       # Rsync >= 2.6.3 supports the --checksum-seed option
            # which allows rsync checksum caching on the server.
       # Uncomment this to enable rsync checksum caching if
            # you have a recent client rsync version and you want
            # to enable checksum caching.
       #
       '--checksum-seed=32761',
];
 
#
# Additional arguments added to RsyncArgs. This can be used in
# conbination with $Conf{RsyncArgs} to allow customization of
# the rsync arguments on a part-client basis. The standard
# arguments go in $Conf{RsyncArgs} and $Conf{RsyncArgsExtra}
# can be set on a per-client basis.
#
# Examples of additional arguments that should work are --exclude/--include,
# eg:
#
#     $Conf{RsyncArgsExtra} = [
#           '--exclude', '/proc',
#           '--exclude', '*.tmp',
#     ];
#
# Both $Conf{RsyncArgs} and $Conf{RsyncArgsExtra} are subject
# to the following variable substitutions:
#
#        $client       client name being backed up
#        $host         host name (could be different from client name if
#                                 $Conf{ClientNameAlias} is set)
#        $hostIP       IP address of host
#        $confDir      configuration directory path
#
# This allows settings of the form:
#
#     $Conf{RsyncArgsExtra} = [
#             '--exclude-from=$confDir/pc/$host.exclude',
#     ];
#
$Conf{RsyncArgsExtra} = [
   '--exclude', '*.tmp',
   ];
 
#
# Arguments to rsync for restore. Do not edit the first set unless you
# have a thorough understanding of how File::RsyncP works.
#
# If you want to disable direct restores using rsync (eg: is the module
# is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
# the corresponding CGI restore option will be removed.
#
# $Conf{RsyncRestoreArgs} is subject to the following variable
# substitutions:
#
#        $client       client name being backed up
#        $host         host name (could be different from client name if
#                                 $Conf{ClientNameAlias} is set)
#        $hostIP       IP address of host
#        $confDir      configuration directory path
#
# Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}.
#
$Conf{RsyncRestoreArgs} = [
       #
       # Do not edit these!
       #
       '--numeric-ids',
       '--perms',
       '--owner',
       '--group',
       '-D',
       '--links',
            '--hard-links',
       '--times',
       '--block-size=2048',
       '--relative',
       '--ignore-times',
       '--recursive',
 
       #
       # Rsync >= 2.6.3 supports the --checksum-seed option
            # which allows rsync checksum caching on the server.
       # Uncomment this to enable rsync checksum caching if
            # you have a recent client rsync version and you want
            # to enable checksum caching.
       #
       '--checksum-seed=32761',
 
       #
       # Add additional arguments here
       #
];
 
###########################################################################
# FTP Configuration
# (can be overwritten in the per-PC log file)
##########################################################################
#
# Which host directories to backup when using FTP. This can be a
# string or an array of strings if there are multiple shares per host.
#
# This value must be specified in one of two ways: either as a
# subdirectory of the 'share root' on the server, or as the absolute
# path of the directory.
#
# In the following example, if the directory /home/username is the
# root share of the ftp server with the given username, the following
# two values will back up the same directory:
#
#    $Conf{FtpShareName} = 'www';                # www directory
#    $Conf{FtpShareName} = '/home/username/www'; # same directory
#
# Path resolution is not supported; i.e.; you may not have an ftp
# share path defined as '../otheruser' or '~/games'.
#
# Multiple shares may also be specified, as with other protocols:
#
#    $Conf{FtpShareName} = [ 'www',
#                            'bin',
#                            'config' ];
#
# 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{FtpShareName} since a new tar is
# run for each entry in $Conf{FtpShareName}.
#
# This setting only matters if $Conf{XferMethod} = 'ftp'.
#
$Conf{FtpShareName} = '';
 
#
# FTP user name. This is used to log into the server.
#
# This setting is used only if $Conf{XferMethod} = 'ftp'.
#
$Conf{FtpUserName} = '';
 
#
# FTP user password. This is used to log into the server.
#
# This setting is used only if $Conf{XferMethod} = 'ftp'.
#
$Conf{FtpPasswd} = '';
 
#
# Whether passive mode is used. The correct setting depends upon
# whether local or remote ports are accessible from the other machine,
# which is affected by any firewall or routers between the FTP server
# on the client and the BackupPC server.
#
# This setting is used only if $Conf{XferMethod} = 'ftp'.
#
$Conf{FtpPassive} = 1;
 
#
# Transfer block size. This sets the size of the amounts of data in
# each frame. While undefined, this value takes the default value.
#
# This setting is used only if $Conf{XferMethod} = 'ftp'.
#
$Conf{FtpBlockSize} = 10240;