1 #============================================================= -*-perl-*-
3 # Configuration file for BackupPC.
7 # This is the main configuration file for BackupPC.
9 # This file must be valid perl source, so make sure the punctuation,
10 # quotes, and other syntax are valid.
12 # This file is read by BackupPC at startup, when a HUP (-1) signal
13 # is sent to BackupPC and also at each wakeup time whenever the
14 # modification time of this file changes.
16 # The configuration parameters are divided into four general groups.
17 # The first group (general server configuration) provides general
18 # configuration for BackupPC. The next two groups describe what
19 # to backup, when to do it, and how long to keep it. The fourth
20 # group are settings for the CGI http interface.
22 # Configuration settings can also be specified on a per-PC basis.
23 # Simply put the relevant settings in a config.pl file in the
24 # PC's backup directory (ie: in __TOPDIR__/pc/hostName).
25 # All configuration settings in the second, third and fourth
26 # groups can be overridden by the per-PC config.pl file.
29 # Craig Barratt <cbarratt@users.sourceforge.net>
32 # Copyright (C) 2001-2003 Craig Barratt
34 # See http://backuppc.sourceforge.net.
36 #========================================================================
38 ###########################################################################
39 # General server configuration
40 ###########################################################################
42 # Host name on which the BackupPC server is running.
44 $Conf{ServerHost} = '';
47 # TCP port number on which the BackupPC server listens for and accepts
48 # connections. Normally this should be disabled (set to -1). The TCP
49 # port is only needed if apache runs on a different machine from BackupPC.
50 # In that case, set this to any spare port number over 1024 (eg: 2359).
51 # If you enable the TCP port, make sure you set $Conf{ServerMesgSecret}
54 $Conf{ServerPort} = -1;
57 # Shared secret to make the TCP port secure. Set this to a hard to guess
58 # string if you enable the TCP port (ie: $Conf{ServerPort} > 0).
60 # To avoid possible attacks via the TCP socket interface, every client
61 # message is protected by an MD5 digest. The MD5 digest includes four
63 # - a seed that is sent to the client when the connection opens
64 # - a sequence number that increments for each message
65 # - a shared secret that is stored in $Conf{ServerMesgSecret}
66 # - the message itself.
68 # The message is sent in plain text preceded by the MD5 digest. A
69 # snooper can see the plain-text seed sent by BackupPC and plain-text
70 # message from the client, but cannot construct a valid MD5 digest since
71 # the secret $Conf{ServerMesgSecret} is unknown. A replay attack is
72 # not possible since the seed changes on a per-connection and
75 $Conf{ServerMesgSecret} = '';
78 # PATH setting for BackupPC. An explicit value is necessary
79 # for taint mode. Value shouldn't matter too much since
80 # all execs use explicit paths. However, taint mode in perl
81 # will complain if this directory is world writable.
83 $Conf{MyPath} = '/bin';
86 # Permission mask for directories and files created by BackupPC.
87 # Default value prevents any access from group other, and prevents
90 $Conf{UmaskMode} = 027;
93 # Times at which we wake up, check all the PCs, and schedule necessary
94 # backups. Times are measured in hours since midnight. Can be
95 # fractional if necessary (eg: 4.25 means 4:15am).
97 # If the hosts you are backing up are always connected to the network
98 # you might have only one or two wakeups each night. This will keep
99 # the backup activity after hours. On the other hand, if you are backing
100 # up laptops that are only intermittently connected to the network you
101 # will want to have frequent wakeups (eg: hourly) to maximized the chance
102 # that each laptop is backed up.
105 # $Conf{WakeupSchedule} = [22.5]; # once per day at 10:30 pm.
106 # $Conf{WakeupSchedule} = [1..23]; # every hour except midnight
107 # $Conf{WakeupSchedule} = [2,4,6,8,10,12,14,16,18,20,22]; # every 2 hours
109 # The default value is every hour except midnight.
111 $Conf{WakeupSchedule} = [1..23];
114 # Maximum number of simultaneous backups to run. If there
115 # are no user backup requests then this is the maximum number
116 # of simultaneous backups.
118 $Conf{MaxBackups} = 4;
121 # Additional number of simultaneous backups that users can run.
122 # As many as $Conf{MaxBackups} + $Conf{MaxUserBackups} requests can
123 # run at the same time.
125 $Conf{MaxUserBackups} = 4;
128 # Maximum number of pending link commands. New backups will only be
129 # started if there are no more than $Conf{MaxPendingCmds} plus
130 # $Conf{MaxBackups} number of pending link commands, plus running jobs.
131 # This limit is to make sure BackupPC doesn't fall too far behind in
132 # running BackupPC_link commands.
134 $Conf{MaxPendingCmds} = 10;
137 # Maximum number of log files we keep around in log directory.
138 # These files are aged nightly. A setting of 14 means the log
139 # directory will contain about 2 weeks of old log files, in
140 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
141 # (except today's LOG, these files will have a .z extension if
142 # compression is on).
144 # If you decrease this number after BackupPC has been running for a
145 # while you will have to manually remove the older log files.
147 $Conf{MaxOldLogFiles} = 14;
150 # Full path to the df command. Security caution: normal users
151 # should not allowed to write to this file or directory.
153 $Conf{DfPath} = '/bin/df';
156 # Command to run df. Several variables are substituted at run-time:
158 # $dfPath path to df ($Conf{DfPath})
159 # $topDir top-level BackupPC data directory
161 $Conf{DfCmd} = '$dfPath $topDir';
164 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
165 # If the output from $Conf{DfPath} reports a percentage larger than
166 # this number then no new regularly scheduled backups will be run.
167 # However, user requested backups (which are usually incremental and
168 # tend to be small) are still performed, independent of disk usage.
169 # Also, currently running backups will not be terminated when the disk
170 # usage exceeds this number.
172 $Conf{DfMaxUsagePct} = 95;
175 # How long BackupPC_trashClean sleeps in seconds between each check
176 # of the trash directory. Once every 5 minutes should be reasonable.
178 $Conf{TrashCleanSleepSec} = 300;
181 # List of DHCP address ranges we search looking for PCs to backup.
182 # This is an array of hashes for each class C address range.
185 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
186 # $Conf{DHCPAddressRanges} = [
188 # ipAddrBase => '192.10.10',
193 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
194 # $Conf{DHCPAddressRanges} = [
196 # ipAddrBase => '192.10.10',
201 # ipAddrBase => '192.10.11',
207 $Conf{DHCPAddressRanges} = [];
210 # These configuration settings aren't used by BackupPC, but simply
211 # remember a few settings used by configure.pl during installation.
212 # These are used by configure.pl when upgrading to new versions of
215 $Conf{BackupPCUser} = '';
217 $Conf{InstallDir} = '';
220 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
221 # are really running as user $Conf{BackupPCUser}. If this flag is set
222 # and the effective user id (euid) differs from $Conf{BackupPCUser}
223 # then both scripts exit with an error. This catches cases where
224 # BackupPC might be accidently started as root or the wrong user,
225 # or if the CGI script is not installed correctly.
227 $Conf{BackupPCUserVerify} = 1;
230 # Maximum number of hardlinks supported by the $TopDir file system
231 # that BackupPC uses. Most linux or unix file systems should support
232 # at least 32000 hardlinks per file, or 64K in other cases. If a pool
233 # file already has this number of hardlinks, a new pool file is created
234 # so that new hardlinks can be accommodated. This limit will only
235 # be hit if an identical file appears at least this number of times
236 # across all the backups.
238 $Conf{HardLinkMax} = 31999;
240 ###########################################################################
241 # What to backup and when to do it
242 # (can be overridden in the per-PC config.pl)
243 ###########################################################################
245 # Name of the host share that is backed up when using SMB. This can be a
246 # string or an array of strings if there are multiple shares per host.
249 # $Conf{SmbShareName} = 'c'; # backup 'c' share
250 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
252 # This setting only matters if $Conf{XferMethod} = 'smb'.
254 $Conf{SmbShareName} = 'C$';
257 # Smbclient share user name. This is passed to smbclient's -U argument.
259 # This setting only matters if $Conf{XferMethod} = 'smb'.
261 $Conf{SmbShareUserName} = '';
264 # Smbclient share password. This is passed to smbclient via the PASSWD
265 # environment variable. There are several ways you can tell BackupPC
266 # the smb share password. In each case you should be very careful about
267 # security. If you put the password here, make sure that this file is
268 # not readable by regular users! See the "Setting up config.pl" section
269 # in the documentation for more information.
271 # This setting only matters if $Conf{XferMethod} = 'smb'.
273 $Conf{SmbSharePasswd} = '';
276 # Which host directories to backup when using tar transport. This can be a
277 # string or an array of strings if there are multiple directories to
278 # backup per host. Examples:
280 # $Conf{TarShareName} = '/'; # backup everything
281 # $Conf{TarShareName} = '/home'; # only backup /home
282 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
284 # The fact this parameter is called 'TarShareName' is for historical
285 # consistency with the Smb transport options. You can use any valid
286 # directory on the client: there is no need for it to correspond to
287 # any Smb share or device mount point.
289 # Note also that you can also use $Conf{BackupFilesOnly} to specify
290 # a specific list of directories to backup. It's more efficient to
291 # use this option instead of $Conf{TarShareName} since a new tar is
292 # run for each entry in $Conf{TarShareName}.
294 # This setting only matters if $Conf{XferMethod} = 'tar'.
296 $Conf{TarShareName} = '/';
299 # Minimum period in days between full backups. A full dump will only be
300 # done if at least this much time has elapsed since the last full dump,
301 # and at least $Conf{IncrPeriod} days has elapsed since the last
304 # Typically this is set slightly less than an integer number of days. The
305 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
306 # will make the actual backup interval a bit longer.
308 $Conf{FullPeriod} = 6.97;
311 # Minimum period in days between incremental backups (a user requested
312 # incremental backup will be done anytime on demand).
314 # Typically this is set slightly less than an integer number of days. The
315 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
316 # will make the actual backup interval a bit longer.
318 $Conf{IncrPeriod} = 0.97;
321 # Number of full backups to keep. Must be >= 1.
323 # In the steady state, each time a full backup completes successfully
324 # the oldest one is removed. If this number is decreased, the
325 # extra old backups will be removed.
327 # If filling of incremental dumps is off the oldest backup always
328 # has to be a full (ie: filled) dump. This might mean an extra full
329 # dump is kept until the second oldest (incremental) dump expires.
331 $Conf{FullKeepCnt} = 1;
334 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
335 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
338 $Conf{FullKeepCntMin} = 1;
339 $Conf{FullAgeMax} = 60;
342 # Number of incremental backups to keep. Must be >= 1.
344 # In the steady state, each time an incr backup completes successfully
345 # the oldest one is removed. If this number is decreased, the
346 # extra old backups will be removed.
348 $Conf{IncrKeepCnt} = 6;
351 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
352 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
353 # matter how old they are.
355 $Conf{IncrKeepCntMin} = 1;
356 $Conf{IncrAgeMax} = 30;
359 # Whether incremental backups are filled. "Filling" means that the
360 # most recent full (or filled) dump is merged into the new incremental
361 # dump using hardlinks. This makes an incremental dump look like a
362 # full dump. Prior to v1.03 all incremental backups were filled.
363 # In v1.4.0 and later the default is off.
365 # BackupPC, and the cgi interface in particular, do the right thing on
366 # un-filled incremental backups. It will correctly display the merged
367 # incremental backup with the most recent filled backup, giving the
368 # un-filled incremental backups a filled appearance. That means it
369 # invisible to the user whether incremental dumps are filled or not.
371 # Filling backups takes a little extra disk space, and it does cost
372 # some extra disk activity for filling, and later removal. Filling
373 # is no longer useful, since file mangling and compression doesn't
374 # make a filled backup very useful. It's likely the filling option
375 # will be removed from future versions: filling will be delegated to
376 # the display and extraction of backup data.
378 # If filling is off, BackupPC makes sure that the oldest backup is
379 # a full, otherwise the following incremental backups will be
380 # incomplete. This might mean an extra full backup has to be
381 # kept until the following incremental backups expire.
383 # The default is off. You can turn this on or off at any
384 # time without affecting existing backups.
389 # Number of restore logs to keep. BackupPC remembers information about
390 # each restore request. This number per client will be kept around before
391 # the oldest ones are pruned.
393 # Note: files/dirs delivered via Zip or Tar downloads don't count as
394 # restores. Only the first restore option (where the files and dirs
395 # are written to the host) count as restores that are logged.
397 $Conf{RestoreInfoKeepCnt} = 10;
400 # List of directories or files to backup. If this is defined, only these
401 # directories or files will be backed up.
403 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
404 # can be specified per share. If both are set for a particular share, then
405 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
408 # This can be set to a string, an array of strings, or, in the case
409 # of multiple shares, a hash of strings or arrays. A hash is used
410 # to give a list of directories or files to backup for each share
411 # (the share name is the key). If this is set to just a string or
412 # array, and $Conf{SmbShareName} contains multiple share names, then
413 # the setting is assumed to apply to only the first share name.
416 # $Conf{BackupFilesOnly} = '/myFiles';
417 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
418 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
419 # $Conf{BackupFilesOnly} = {
420 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
421 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
424 $Conf{BackupFilesOnly} = undef;
427 # List of directories or files to exclude from the backup. For Smb,
428 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
429 # can be specified per share. If both are set for a particular share,
430 # then $Conf{BackupFilesOnly} takes precedence and
431 # $Conf{BackupFilesExclude} is ignored.
433 # This can be set to a string, an array of strings, or, in the case
434 # of multiple shares, a hash of strings or arrays. A hash is used
435 # to give a list of directories or files to exclude for each share
436 # (the share name is the key). If this is set to just a string or
437 # array, and $Conf{SmbShareName} contains multiple share names, then
438 # the setting is assumed to apply to only the first share name.
440 # The exact behavior is determined by the underlying transport program,
441 # smbclient or tar. For smbclient the exlclude file list is passed into
442 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
444 # For tar, if the exclude file contains a "/" it is assumed to be anchored
445 # at the start of the string. Since all the tar paths start with "./",
446 # BackupPC prepends a "." if the exclude file starts with a "/". Note
447 # that GNU tar version >= 1.3.7 is required for the exclude option to
448 # work correctly. For linux or unix machines it is recommended to add
449 # "/proc" to $Conf{BackupFilesExclude}.
452 # $Conf{BackupFilesExclude} = '/temp';
453 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
454 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
455 # $Conf{BackupFilesExclude} = {
456 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
457 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
460 $Conf{BackupFilesExclude} = undef;
463 # PCs that are always or often on the network can be backed up after
464 # hours, to reduce PC, network and server load during working hours. For
465 # each PC a count of consecutive good pings is maintained. Once a PC has
466 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
467 # to "blackout" and not backed up during hours and days specified by
468 # $Conf{BlackoutWeekDays}, $Conf{BlackoutHourBegin} and
469 # $Conf{BlackoutHourEnd}.
471 # To allow for periodic rebooting of a PC or other brief periods when a
472 # PC is not on the network, a number of consecutive bad pings is allowed
473 # before the good ping count is reset. This parameter is
474 # $Conf{BlackoutBadPingLimit}.
476 # Note that bad and good pings don't occur with the same interval. If a
477 # machine is always on the network, it will only be pinged roughly once
478 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
479 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
480 # machine to be subject to blackout. On the other hand, if a ping is
481 # failed, it will be retried roughly every time BackupPC wakes up, eg,
482 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
483 # 3 means that the PC will lose its blackout status after 3-6 hours of
486 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
487 # value. A value of 0 will make all machines subject to blackout. But
488 # if you don't want to do any backups during the day it would be easier
489 # to just set $Conf{WakeupSchedule} to a restricted schedule.
491 $Conf{BlackoutBadPingLimit} = 3;
492 $Conf{BlackoutGoodCnt} = 7;
495 # The default settings specify the blackout period from 7:00am to
496 # 7:30pm local time on Mon-Fri. For $Conf{BlackoutWeekDays},
497 # 0 is Sunday, 1 is Monday etc.
499 $Conf{BlackoutHourBegin} = 7.0;
500 $Conf{BlackoutHourEnd} = 19.5;
501 $Conf{BlackoutWeekDays} = [1, 2, 3, 4, 5];
503 ###########################################################################
504 # General per-PC configuration settings
505 # (can be overridden in the per-PC config.pl)
506 ###########################################################################
508 # What transport method to use to backup each host. If you have
509 # a mixed set of WinXX and linux/unix hosts you will need to override
510 # this in the per-PC config.pl.
512 # The valid values are:
514 # - 'smb': backup and restore via smbclient and the SMB protocol.
515 # Best choice for WinXX.
517 # - 'rsync': backup and restore via rsync (via rsh or ssh).
518 # Best choice for linux/unix. Can also work on WinXX.
520 # - 'rsyncd': backup and restre via rsync daemon on the client.
521 # Best choice for linux/unix if you have rsyncd running on
522 # the client. Can also work on WinXX.
524 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
525 # Good choice for linux/unix.
527 # A future version should support 'rsync' as a transport method for
528 # more efficient backup of linux/unix machines (and perhaps WinXX??).
530 $Conf{XferMethod} = 'smb';
533 # Full path for smbclient. Security caution: normal users should not
534 # allowed to write to this file or directory.
536 # smbclient is from the Samba distribution. smbclient is used to
537 # actually extract the incremental or full dump of the share filesystem
540 # This setting only matters if $Conf{XferMethod} = 'smb'.
542 $Conf{SmbClientPath} = '/usr/bin/smbclient';
545 # Commands to run smbclient for a full dump, incremental dump or a restore.
546 # This setting only matters if $Conf{XferMethod} = 'smb'.
548 # Several variables are substituted at run-time:
550 # $smbClientPath same as $Conf{SmbClientPath}
551 # $host host to backup/restore
552 # $hostIP host IP address
553 # $shareName share name
554 # $userName user name
555 # $fileList list of files to backup (based on exclude/include)
556 # $I_option optional -I option to smbclient
557 # $X_option exclude option (if $fileList is an exclude list)
558 # $timeStampFile start time for incremental dump
560 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
561 . ' $I_option -U $userName -E -N -d 1'
562 . ' -c tarmode\\ full -Tc$X_option - $fileList';
564 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
565 . ' $I_option -U $userName -E -N -d 1'
566 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
568 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
569 . ' $I_option -U $userName -E -N -d 1'
570 . ' -c tarmode\\ full -Tx -';
573 # Full command to run tar on the client. GNU tar is required. You will
574 # need to fill in the correct paths for ssh2 on the local host (server)
575 # and GNU tar on the client. Security caution: normal users should not
576 # allowed to write to these executable files or directories.
578 # See the documentation for more information about setting up ssh2 keys.
580 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
581 # For example, assuming the client filesystem is mounted below /mnt/hostName,
582 # you could use something like:
584 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
587 # In the case of NFS or rsh you need to make sure BackupPC's privileges
588 # are sufficient to read all the files you want to backup. Also, you
589 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
591 # Several variables are substituted at run-time. The following variables
592 # are substituted at run-time:
595 # $hostIP host's IP address
596 # $incrDate newer-than date for incremental backups
597 # $shareName share name to backup (ie: top-level directory path)
598 # $fileList specific files to backup or exclude
599 # $tarPath same as $Conf{TarClientPath}
600 # $sshPath same as $Conf{SshPath}
602 # If a variable is followed by a "+" it is shell escaped. This is
603 # necessary for the command part of ssh or rsh, since it ends up
604 # getting passed through the shell.
606 # This setting only matters if $Conf{XferMethod} = 'tar'.
608 $Conf{TarClientCmd} = '$sshPath -q -n -l root $host'
609 . ' $tarPath -c -v -f - -C $shareName+'
613 # Extra tar arguments for full backups. Several variables are substituted at
614 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
616 # This setting only matters if $Conf{XferMethod} = 'tar'.
618 $Conf{TarFullArgs} = '$fileList+';
621 # Extra tar arguments for incr backups. Several variables are substituted at
622 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
624 # Note that GNU tar has several methods for specifying incremental backups,
627 # --newer-mtime $incrDate+
628 # This causes a file to be included if the modification time is
629 # later than $incrDate (meaning its contents might have changed).
630 # But changes in the ownership or modes will not qualify the
631 # file to be included in an incremental.
634 # This causes the file to be included if any attribute of the
635 # file is later than $incrDate, meaning either attributes or
636 # the modification time. This is the default method. Do
637 # not use --atime-preserve in $Conf{TarClientCmd} above,
638 # otherwise resetting the atime (access time) counts as an
639 # attribute change, meaning the file will always be included
640 # in each new incremental dump.
642 # This setting only matters if $Conf{XferMethod} = 'tar'.
644 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
647 # Full command to run tar for restore on the client. GNU tar is required.
648 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
649 # and ssh's -n removed.
651 # See $Conf{TarClientCmd} for full details.
653 # This setting only matters if $Conf{XferMethod} = "tar".
655 $Conf{TarClientRestoreCmd} = '$sshPath -q -l root $host'
656 . ' $tarPath -x -p --numeric-owner --same-owner'
657 . ' -v -f - -C $shareName+';
660 # Full path for tar on the client. Security caution: normal users should not
661 # allowed to write to this file or directory.
663 # This setting only matters if $Conf{XferMethod} = 'tar'.
665 $Conf{TarClientPath} = '/bin/tar';
668 # Path to rsync executable on the client
670 $Conf{RsyncClientPath} = '/bin/rsync';
673 # Full command to run rsync on the client machine. The following variables
674 # are substituted at run-time:
676 # $host host name being backed up
677 # $hostIP host's IP address
678 # $shareName share name to backup (ie: top-level directory path)
679 # $rsyncPath same as $Conf{RsyncClientPath}
680 # $sshPath same as $Conf{SshPath}
681 # $argList argument list, built from $Conf{RsyncArgs},
682 # $shareName, $Conf{BackupFilesExclude} and
683 # $Conf{BackupFilesOnly}
685 # This setting only matters if $Conf{XferMethod} = 'rsync'.
687 $Conf{RsyncClientCmd} = '$sshPath -l root $host $rsyncPath $argList';
690 # Full command to run rsync for restore on the client. The following
691 # variables are substituted at run-time:
693 # $host host name being backed up
694 # $hostIP host's IP address
695 # $shareName share name to backup (ie: top-level directory path)
696 # $rsyncPath same as $Conf{RsyncClientPath}
697 # $sshPath same as $Conf{SshPath}
698 # $argList argument list, built from $Conf{RsyncArgs},
699 # $shareName, $Conf{BackupFilesExclude} and
700 # $Conf{BackupFilesOnly}
702 # This setting only matters if $Conf{XferMethod} = 'rsync'.
704 $Conf{RsyncClientRestoreCmd} = '$sshPath -l root $host $rsyncPath $argList';
707 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
708 # be a directory name, eg '/' or '/home'. For $Conf{XferMethod} = "rsyncd"
709 # this should be the name of the module to backup (ie: the name from
712 $Conf{RsyncShareName} = '/';
715 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
717 $Conf{RsyncdClientPort} = 873;
720 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
721 # The user name and password are stored on the client in whatever file
722 # the "secrets file" parameter in rsyncd.conf points to
723 # (eg: /etc/rsyncd.secrets).
725 $Conf{RsyncdUserName} = '';
728 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
729 # The user name and password are stored on the client in whatever file
730 # the "secrets file" parameter in rsyncd.conf points to
731 # (eg: /etc/rsyncd.secrets).
733 $Conf{RsyncdPasswd} = '';
736 # Whether authentication is mandatory when connecting to the client's
737 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
738 # connect to an rsyncd on the client that is not password protected.
739 # Turn off at your own risk.
741 $Conf{RsyncdAuthRequired} = 1;
744 # Arguments to rsync for backup. Do not edit the first set unless you
745 # have a thorough understanding of how File::RsyncP works.
747 # Examples of additional arguments that should work are --exclude/--include,
750 # $Conf{RsyncArgs} = [
751 # # original arguments here
753 # '--exclude', '/proc',
754 # '--exclude', '*.tmp',
771 # Add additional arguments here
776 # Arguments to rsync for restore. Do not edit the first set unless you
777 # have a thorough understanding of how File::RsyncP works.
780 $Conf{RsyncRestoreArgs} = [
796 # Add additional arguments here
801 # Amount of verbosity in Rsync Xfer log files. 0 means be quiet,
802 # 1 will give will give one line per file, 2 will also show skipped
803 # files on incrementals, higher values give more output. 10 will
804 # include byte dumps of all data read/written, which will make the
807 $Conf{RsyncLogLevel} = 1;
810 # Full path for ssh. Security caution: normal users should not
811 # allowed to write to this file or directory.
813 $Conf{SshPath} = '/usr/bin/ssh';
816 # Full path for nmblookup. Security caution: normal users should not
817 # allowed to write to this file or directory.
819 # nmblookup is from the Samba distribution. nmblookup is used to get the
820 # netbios name, necessary for DHCP hosts.
822 $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
825 # NmbLookup command. Given an IP address, does an nmblookup on that
826 # IP address. Several variables are substituted at run-time:
828 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
831 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
834 # NmbLookup command. Given a netbios name, finds that host by doing
835 # a NetBios multicast. Several variables are substituted at run-time:
837 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
840 # In some cases you might need to change the broadcast address, for
841 # example if nmblookup uses 192.168.255.255 by default and you find
842 # that doesn't work, try 192.168.1.255 (or your equivalent class C
843 # address) using the -B option:
845 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
847 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
850 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
851 # name to ensure it matches the host name. An error is generated if
852 # they do not match. Typically this flag is off. But if you are going
853 # to transition a bunch of machines from fixed host addresses to DHCP,
854 # setting this flag is a great way to verify that the machines have
855 # their netbios name set correctly before turning on DCHP.
857 $Conf{FixedIPNetBiosNameCheck} = 0;
860 # Full path to the ping command. Security caution: normal users
861 # should not be allowed to write to this file or directory.
863 # If you want to disable ping checking, set this to some program
864 # that exits with 0 status, eg:
866 # $Conf{PingPath} = '/bin/echo';
868 $Conf{PingPath} = '/bin/ping';
871 # Ping command. Several variables are substituted at run-time:
873 # $pingPath path to ping ($Conf{PingPath})
876 $Conf{PingCmd} = '$pingPath -c 1 $host';
879 # Compression level to use on files. 0 means no compression. Compression
880 # levels can be from 1 (least cpu time, slightly worse compression) to
881 # 9 (most cpu time, slightly better compression). The recommended value
882 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
883 # and will get another 2-3% additional compression. See the zlib
884 # documentation for more information about compression levels.
886 # Changing compression on or off after backups have already been done
887 # will require both compressed and uncompressed pool files to be stored.
888 # This will increase the pool storage requirements, at least until all
889 # the old backups expire and are deleted.
891 # It is ok to change the compression value (from one non-zero value to
892 # another non-zero value) after dumps are already done. Since BackupPC
893 # matches pool files by comparing the uncompressed versions, it will still
894 # correctly match new incoming files against existing pool files. The
895 # new compression level will take effect only for new files that are
896 # newly compressed and added to the pool.
898 # If compression was off and you are enabling compression for the first
899 # time you can use the BackupPC_compressPool utility to compress the
900 # pool. This avoids having the pool grow to accommodate both compressed
901 # and uncompressed backups. See the documentation for more information.
903 # Note: compression needs the Compress::Zlib perl library. If the
904 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
905 # forced to 0 (compression off).
907 $Conf{CompressLevel} = 0;
910 # Maximum round-trip ping time in milliseconds. This threshold is set
911 # to avoid backing up PCs that are remotely connected through WAN or
912 # dialup connections. The output from ping -s (assuming it is supported
913 # on your system) is used to check the round-trip packet time. On your
914 # local LAN round-trip times should be much less than 20msec. On most
915 # WAN or dialup connections the round-trip time will be typically more
916 # than 20msec. Tune if necessary.
918 $Conf{PingMaxMsec} = 20;
921 # Timeout in seconds when listening for the transport program's
922 # (smbclient, tar etc) stdout. If no output is received during this
923 # time, then it is assumed that something has wedged during a backup,
924 # and the backup is terminated.
926 # Note that stdout buffering combined with huge files being backed up
927 # could cause longish delays in the output from smbclient that
928 # BackupPC_dump sees, so in rare cases you might want to increase
931 # Despite the name, this parameter sets the timeout for all transport
932 # methods (tar, smb etc).
934 $Conf{ClientTimeout} = 7200;
937 # Maximum number of log files we keep around in each PC's directory
938 # (ie: pc/$host). These files are aged monthly. A setting of 12
939 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
940 # in the pc/$host directory (ie: about a years worth). (Except this
941 # month's LOG, these files will have a .z extension if compression
944 # If you decrease this number after BackupPC has been running for a
945 # while you will have to manually remove the older log files.
947 $Conf{MaxOldPerPCLogFiles} = 12;
950 # Optional commands to run before and after dumps and restores.
951 # Stdout from these commands will be written to the Xfer (or Restore)
952 # log file. One example of using these commands would be to
953 # shut down and restart a database server, or to dump a database
954 # to files for backup. Example:
956 # $Conf{DumpPreUserCmd} = '$sshPath -l root $host /usr/bin/dumpMysql';
958 # Various variable substitutions are available; see BackupPC_dump
959 # or BackupPC_restore for the details.
961 $Conf{DumpPreUserCmd} = undef;
962 $Conf{DumpPostUserCmd} = undef;
963 $Conf{RestorePreUserCmd} = undef;
964 $Conf{RestorePostUserCmd} = undef;
967 # Override the client's host name. This allows multiple clients
968 # to all refer to the same physical hosts. This should only be
969 # set in the per-PC config file.
971 # Note: this setting doesn't work for DHCP hosts.
973 $Conf{ClientNameAlias} = undef;
976 # Advanced option for asking BackupPC to load additional perl modules.
977 # Can be a list (array ref) of module names to load at startup.
979 $Conf{PerlModuleLoad} = undef;
981 ###########################################################################
982 # Email reminders, status and messages
983 # (can be overridden in the per-PC config.pl)
984 ###########################################################################
986 # Full path to the sendmail command. Security caution: normal users
987 # should not allowed to write to this file or directory.
989 $Conf{SendmailPath} = '/usr/sbin/sendmail';
992 # Minimum period between consecutive emails to a single user.
993 # This tries to keep annoying email to users to a reasonable
994 # level. Email checks are done nightly, so this number is effectively
995 # rounded up (ie: 2.5 means a user will never receive email more
996 # than once every 3 days).
998 $Conf{EMailNotifyMinDays} = 2.5;
1001 # Name to use as the "from" name for email. Depending upon your mail
1002 # handler this is either a plain name (eg: "admin") or a fully-qualified
1003 # name (eg: "admin@mydomain.com").
1005 $Conf{EMailFromUserName} = '';
1008 # Destination address to an administrative user who will receive a
1009 # nightly email with warnings and errors. If there are no warnings
1010 # or errors then no email will be sent. Depending upon your mail
1011 # handler this is either a plain name (eg: "admin") or a fully-qualified
1012 # name (eg: "admin@mydomain.com").
1014 $Conf{EMailAdminUserName} = '';
1017 # Destination domain name for email sent to users. By default
1018 # this is empty, meaning email is sent to plain, unqualified
1019 # addresses. Otherwise, set it to the destintation domain, eg:
1021 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1023 # With this setting user email will be set to 'user@mydomain.com'.
1025 $Conf{EMailUserDestDomain} = '';
1028 # This subject and message is sent to a user if their PC has never been
1031 # These values are language-dependent. The default versions can be
1032 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1033 # need to change the message, copy it here and edit it, eg:
1035 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1042 # This is a site-specific email message.
1045 $Conf{EMailNoBackupEverSubj} = undef;
1046 $Conf{EMailNoBackupEverMesg} = undef;
1049 # How old the most recent backup has to be before notifying user.
1050 # When there have been no backups in this number of days the user
1053 $Conf{EMailNotifyOldBackupDays} = 7.0;
1056 # This subject and message is sent to a user if their PC has not recently
1057 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1059 # These values are language-dependent. The default versions can be
1060 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1061 # need to change the message, copy it here and edit it, eg:
1063 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1070 # This is a site-specific email message.
1073 $Conf{EMailNoBackupRecentSubj} = undef;
1074 $Conf{EMailNoBackupRecentMesg} = undef;
1077 # How old the most recent backup of Outlook files has to be before
1080 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1083 # This subject and message is sent to a user if their Outlook files have
1084 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1087 # These values are language-dependent. The default versions can be
1088 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1089 # need to change the message, copy it here and edit it, eg:
1091 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1098 # This is a site-specific email message.
1101 $Conf{EMailOutlookBackupSubj} = undef;
1102 $Conf{EMailOutlookBackupMesg} = undef;
1104 ###########################################################################
1105 # CGI user interface configuration settings
1106 # (can be overridden in the per-PC config.pl)
1107 ###########################################################################
1109 # Normal users can only access information specific to their host.
1110 # They can start/stop/browse/restore backups.
1112 # Administrative users have full access to all hosts, plus overall
1113 # status and log information.
1115 # The administrative users are the union of the unix/linux group
1116 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1117 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1118 # manual list of users set the corresponding configuration setting
1119 # to undef or an empty string.
1121 # If you want every user to have admin privileges (careful!), set
1122 # $Conf{CgiAdminUsers} = '*'.
1125 # $Conf{CgiAdminUserGroup} = 'admin';
1126 # $Conf{CgiAdminUsers} = 'craig celia';
1127 # --> administrative users are the union of group admin, plus
1130 # $Conf{CgiAdminUserGroup} = '';
1131 # $Conf{CgiAdminUsers} = 'craig celia';
1132 # --> administrative users are only craig and celia'.
1134 $Conf{CgiAdminUserGroup} = '';
1135 $Conf{CgiAdminUsers} = '';
1138 # URL of the BackupPC_Admin CGI script. Used for email messages.
1140 $Conf{CgiURL} = undef;
1143 # Language to use. See lib/BackupPC/Lang for the list of supported
1144 # languages, which includes English (en) and French (fr). Currently
1145 # this applies mainly to the CGI interface, but over time it might
1146 # also include log files and other text output.
1148 $Conf{Language} = 'en';
1151 # User names that are rendered by the CGI interface can be turned
1152 # into links into their home page or other information about the
1153 # user. To set this up you need to create two sprintf() strings,
1154 # that each contain a single '%s' that will be replaced by the user
1155 # name. The default is a mailto: link.
1157 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1158 # is used to check (via "-f") that the user has a valid home page.
1159 # Set this to undef or an empty string to turn off this check.
1161 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1162 # user's home page. Set this to undef or an empty string to turn
1163 # off generation of URLs for user names.
1166 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1167 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
1168 # --> if /var/www/html/users/craig.html exists, then 'craig' will
1169 # be rendered as a link to http://myhost/users/craig.html.
1171 $Conf{CgiUserHomePageCheck} = '';
1172 $Conf{CgiUserUrlCreate} = 'mailto:%s';
1175 # Date display format for CGI interface. True for US-style dates (MM/DD)
1176 # and zero for international dates (DD/MM).
1178 $Conf{CgiDateFormatMMDD} = 1;
1181 # If set, the complete list of hosts appears in the left navigation
1182 # bar for administrators. Otherwise, just the hosts for which the
1183 # user is listed in the host file (as either the user or in moreUsers)
1186 $Conf{CgiNavBarAdminAllHosts} = 0;
1189 # Header font and size for CGI interface
1191 $Conf{CgiHeaderFontType} = 'arial';
1192 $Conf{CgiHeaderFontSize} = '3';
1195 # Color scheme for CGI interface. Default values give a very light blue
1196 # for the background navigation color, green for the header background,
1197 # and white for the body background. (You call tell I should stick to
1198 # programming and not graphical design.)
1200 $Conf{CgiNavBarBgColor} = '#ddeeee';
1201 $Conf{CgiHeaderBgColor} = '#99cc33';
1202 $Conf{CgiBodyBgColor} = '#ffffff';
1205 # Additional CGI header text. For example, if you wanted each CGI page
1206 # to auto refresh every 900 seconds, you could add this text:
1208 # <meta http-equiv="refresh" content="900">
1210 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1213 # Directory where images are stored. This directory should be below
1214 # Apache's DocumentRoot. This value isn't used by BackupPC but is
1215 # used by configure.pl when you upgrade BackupPC.
1218 # $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1220 $Conf{CgiImageDir} = '';
1223 # Additional mappings of file name extenions to Content-Type for
1224 # individual file restore. See $Ext2ContentType in BackupPC_Admin
1225 # for the default setting. You can add additional settings here,
1226 # or override any default settings. Example:
1228 # $Conf{CgiExt2ContentType} = {
1229 # 'pl' => 'text/plain',
1232 $Conf{CgiExt2ContentType} = { };
1235 # URL (without the leading http://host) for BackupPC's image directory.
1236 # The CGI script uses this value to serve up image files.
1239 # $Conf{CgiImageDirURL} = '/BackupPC';
1241 $Conf{CgiImageDirURL} = '';