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 # The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly
112 # is run. No other backups can run while BackupPC_nightly is
113 # running. You might want to re-arrange the entries in
114 # $Conf{WakeupSchedule} (they don't have to be ascending) so that
115 # the first entry is when you want BackupPC_nightly to run
116 # (eg: when you don't expect a lot of regular backups to run).
118 $Conf{WakeupSchedule} = [1..23];
121 # Maximum number of simultaneous backups to run. If there
122 # are no user backup requests then this is the maximum number
123 # of simultaneous backups.
125 $Conf{MaxBackups} = 4;
128 # Additional number of simultaneous backups that users can run.
129 # As many as $Conf{MaxBackups} + $Conf{MaxUserBackups} requests can
130 # run at the same time.
132 $Conf{MaxUserBackups} = 4;
135 # Maximum number of pending link commands. New backups will only be
136 # started if there are no more than $Conf{MaxPendingCmds} plus
137 # $Conf{MaxBackups} number of pending link commands, plus running jobs.
138 # This limit is to make sure BackupPC doesn't fall too far behind in
139 # running BackupPC_link commands.
141 $Conf{MaxPendingCmds} = 10;
144 # How many BackupPC_nightly processes to run in parallel.
146 # Each night, at the first wakeup listed in $Conf{WakeupSchedule},
147 # BackupPC_nightly is run. Its job is to remove unneeded files
148 # in the pool, ie: files that only have one link. To avoid race
149 # conditions, BackupPC_nightly runs only when there are no backups
150 # running, and no backups will start while it runs.
152 # So to reduce the elapsed time, you might want to increase this
153 # setting to run several BackupPC_nightly processes in parallel
154 # (eg: 4, or even 8).
156 $Conf{MaxBackupPCNightlyJobs} = 2;
159 # How many days (runs) it takes BackupPC_nightly to traverse the
160 # entire pool. Normally this is 1, which means every night it runs,
161 # it does traverse the entire pool removing unused pool files.
163 # Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
164 # traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
165 # takes 2, 4, 8 or 16 days to completely traverse the pool. The
166 # advantage is that each night the running time of BackupPC_nightly
167 # is reduced roughly in proportion, since the total job is split
168 # over multiple days. The disadvantage is that unused pool files
169 # take longer to get deleted, which will slightly increase disk
172 # Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly
173 # still runs every night. It just does less work each time it runs.
177 # $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night
179 # $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check
180 # # (different half each night)
182 # $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check
183 # # (different quarter each night)
185 $Conf{BackupPCNightlyPeriod} = 1;
188 # Maximum number of log files we keep around in log directory.
189 # These files are aged nightly. A setting of 14 means the log
190 # directory will contain about 2 weeks of old log files, in
191 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
192 # (except today's LOG, these files will have a .z extension if
193 # compression is on).
195 # If you decrease this number after BackupPC has been running for a
196 # while you will have to manually remove the older log files.
198 $Conf{MaxOldLogFiles} = 14;
201 # Full path to the df command. Security caution: normal users
202 # should not allowed to write to this file or directory.
204 $Conf{DfPath} = '/bin/df';
207 # Command to run df. The following variables are substituted at run-time:
209 # $dfPath path to df ($Conf{DfPath})
210 # $topDir top-level BackupPC data directory
212 $Conf{DfCmd} = '$dfPath $topDir';
215 # Full path to various commands for archiving
218 $Conf{SplitPath} = '/usr/bin/split';
219 $Conf{ParPath} = '/usr/bin/par2';
220 $Conf{CatPath} = '/bin/cat';
221 $Conf{GzipPath} = '/bin/gzip';
222 $Conf{Bzip2Path} = '/usr/bin/bzip2';
225 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
226 # If the output from $Conf{DfPath} reports a percentage larger than
227 # this number then no new regularly scheduled backups will be run.
228 # However, user requested backups (which are usually incremental and
229 # tend to be small) are still performed, independent of disk usage.
230 # Also, currently running backups will not be terminated when the disk
231 # usage exceeds this number.
233 $Conf{DfMaxUsagePct} = 95;
236 # How long BackupPC_trashClean sleeps in seconds between each check
237 # of the trash directory. Once every 5 minutes should be reasonable.
239 $Conf{TrashCleanSleepSec} = 300;
242 # List of DHCP address ranges we search looking for PCs to backup.
243 # This is an array of hashes for each class C address range.
244 # This is only needed if hosts in the conf/hosts file have the
248 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
249 # $Conf{DHCPAddressRanges} = [
251 # ipAddrBase => '192.10.10',
256 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
257 # $Conf{DHCPAddressRanges} = [
259 # ipAddrBase => '192.10.10',
264 # ipAddrBase => '192.10.11',
270 $Conf{DHCPAddressRanges} = [];
273 # These configuration settings aren't used by BackupPC, but simply
274 # remember a few settings used by configure.pl during installation.
275 # These are used by configure.pl when upgrading to new versions of
278 $Conf{BackupPCUser} = '';
280 $Conf{InstallDir} = '';
283 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
284 # are really running as user $Conf{BackupPCUser}. If this flag is set
285 # and the effective user id (euid) differs from $Conf{BackupPCUser}
286 # then both scripts exit with an error. This catches cases where
287 # BackupPC might be accidently started as root or the wrong user,
288 # or if the CGI script is not installed correctly.
290 $Conf{BackupPCUserVerify} = 1;
293 # Maximum number of hardlinks supported by the $TopDir file system
294 # that BackupPC uses. Most linux or unix file systems should support
295 # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
296 # file already has this number of hardlinks, a new pool file is created
297 # so that new hardlinks can be accommodated. This limit will only
298 # be hit if an identical file appears at least this number of times
299 # across all the backups.
301 $Conf{HardLinkMax} = 31999;
303 ###########################################################################
304 # What to backup and when to do it
305 # (can be overridden in the per-PC config.pl)
306 ###########################################################################
308 # Name of the host share that is backed up when using SMB. This can be a
309 # string or an array of strings if there are multiple shares per host.
312 # $Conf{SmbShareName} = 'c'; # backup 'c' share
313 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
315 # This setting only matters if $Conf{XferMethod} = 'smb'.
317 $Conf{SmbShareName} = 'C$';
320 # Smbclient share user name. This is passed to smbclient's -U argument.
322 # This setting only matters if $Conf{XferMethod} = 'smb'.
324 $Conf{SmbShareUserName} = '';
327 # Smbclient share password. This is passed to smbclient via its PASSWD
328 # environment variable. There are several ways you can tell BackupPC
329 # the smb share password. In each case you should be very careful about
330 # security. If you put the password here, make sure that this file is
331 # not readable by regular users! See the "Setting up config.pl" section
332 # in the documentation for more information.
334 # This setting only matters if $Conf{XferMethod} = 'smb'.
336 $Conf{SmbSharePasswd} = '';
339 # Which host directories to backup when using tar transport. This can be a
340 # string or an array of strings if there are multiple directories to
341 # backup per host. Examples:
343 # $Conf{TarShareName} = '/'; # backup everything
344 # $Conf{TarShareName} = '/home'; # only backup /home
345 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
347 # The fact this parameter is called 'TarShareName' is for historical
348 # consistency with the Smb transport options. You can use any valid
349 # directory on the client: there is no need for it to correspond to
350 # any Smb share or device mount point.
352 # Note also that you can also use $Conf{BackupFilesOnly} to specify
353 # a specific list of directories to backup. It's more efficient to
354 # use this option instead of $Conf{TarShareName} since a new tar is
355 # run for each entry in $Conf{TarShareName}.
357 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
358 # you can backup each file system separately, which makes restoring one
359 # bad file system easier. In this case you would list all of the mount
360 # points here, since you can't get the same result with
361 # $Conf{BackupFilesOnly}:
363 # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
365 # This setting only matters if $Conf{XferMethod} = 'tar'.
367 $Conf{TarShareName} = '/';
370 # Minimum period in days between full backups. A full dump will only be
371 # done if at least this much time has elapsed since the last full dump,
372 # and at least $Conf{IncrPeriod} days has elapsed since the last
375 # Typically this is set slightly less than an integer number of days. The
376 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
377 # will make the actual backup interval a bit longer.
379 # There are two special values for $Conf{FullPeriod}:
381 # -1 Don't do any regular backups on this machine. Manually
382 # requested backups (via the CGI interface) will still occur.
384 # -2 Don't do any backups on this machine. Manually requested
385 # backups (via the CGI interface) will be ignored.
387 # These special settings are useful for a client that is no longer
388 # being backed up (eg: a retired machine), but you wish to keep the
389 # last backups available for browsing or restoring to other machines.
391 $Conf{FullPeriod} = 6.97;
394 # Minimum period in days between incremental backups (a user requested
395 # incremental backup will be done anytime on demand).
397 # Typically this is set slightly less than an integer number of days. The
398 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
399 # will make the actual backup interval a bit longer.
401 $Conf{IncrPeriod} = 0.97;
404 # Number of full backups to keep. Must be >= 1.
406 # In the steady state, each time a full backup completes successfully
407 # the oldest one is removed. If this number is decreased, the
408 # extra old backups will be removed.
410 # If filling of incremental dumps is off the oldest backup always
411 # has to be a full (ie: filled) dump. This might mean one or two
412 # extra full dumps are kept until the oldest incremental backups expire.
414 # Exponential backup expiry is also supported. This allows you to specify:
416 # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
417 # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
418 # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
419 # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
420 # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
422 # and so on. This works by deleting every other full as each expiry
423 # boundary is crossed.
425 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
427 # $Conf{FullKeepCnt} = [4, 2, 3];
429 # Entry #n specifies how many fulls to keep at an interval of
430 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
432 # The example above specifies keeping 4 of the most recent full backups
433 # (1 week interval) two full backups at 2 week intervals, and 3 full
434 # backups at 4 week intervals, eg:
436 # full 0 19 weeks old \
437 # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
438 # full 2 11 weeks old /
439 # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
440 # full 4 5 weeks old /
441 # full 5 3 weeks old \
442 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
443 # full 7 1 week old /
446 # On a given week the spacing might be less than shown as each backup
447 # ages through each expiry period. For example, one week later, a
448 # new full is completed and the oldest is deleted, giving:
450 # full 0 16 weeks old \
451 # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
452 # full 2 8 weeks old /
453 # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
454 # full 4 4 weeks old /
455 # full 5 3 weeks old \
456 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
457 # full 7 1 week old /
460 # You can specify 0 as a count (except in the first entry), and the
461 # array can be as long as you wish. For example:
463 # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
465 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
466 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
467 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
470 # Note that you will have to increase $Conf{FullAgeMax} if you want
471 # very old full backups to be kept. Full backups are removed according
472 # to both $Conf{FullKeepCnt} and $Conf{FullAgeMax}.
474 # Note also that these two settings are equivalent and both keep just
475 # the four most recent full dumps:
477 # $Conf{FullKeepCnt} = 4;
478 # $Conf{FullKeepCnt} = [4];
480 $Conf{FullKeepCnt} = 1;
483 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
484 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
487 $Conf{FullKeepCntMin} = 1;
488 $Conf{FullAgeMax} = 90;
491 # Number of incremental backups to keep. Must be >= 1.
493 # In the steady state, each time an incr backup completes successfully
494 # the oldest one is removed. If this number is decreased, the
495 # extra old backups will be removed.
497 $Conf{IncrKeepCnt} = 6;
500 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
501 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
502 # matter how old they are.
504 $Conf{IncrKeepCntMin} = 1;
505 $Conf{IncrAgeMax} = 30;
508 # Whether incremental backups are filled. "Filling" means that the
509 # most recent full (or filled) dump is merged into the new incremental
510 # dump using hardlinks. This makes an incremental dump look like a
511 # full dump. Prior to v1.03 all incremental backups were filled.
512 # In v1.4.0 and later the default is off.
514 # BackupPC, and the cgi interface in particular, do the right thing on
515 # un-filled incremental backups. It will correctly display the merged
516 # incremental backup with the most recent filled backup, giving the
517 # un-filled incremental backups a filled appearance. That means it
518 # invisible to the user whether incremental dumps are filled or not.
520 # Filling backups takes a little extra disk space, and it does cost
521 # some extra disk activity for filling, and later removal. Filling
522 # is no longer useful, since file mangling and compression doesn't
523 # make a filled backup very useful. It's likely the filling option
524 # will be removed from future versions: filling will be delegated to
525 # the display and extraction of backup data.
527 # If filling is off, BackupPC makes sure that the oldest backup is
528 # a full, otherwise the following incremental backups will be
529 # incomplete. This might mean an extra full backup has to be
530 # kept until the following incremental backups expire.
532 # The default is off. You can turn this on or off at any
533 # time without affecting existing backups.
538 # Number of restore logs to keep. BackupPC remembers information about
539 # each restore request. This number per client will be kept around before
540 # the oldest ones are pruned.
542 # Note: files/dirs delivered via Zip or Tar downloads don't count as
543 # restores. Only the first restore option (where the files and dirs
544 # are written to the host) count as restores that are logged.
546 $Conf{RestoreInfoKeepCnt} = 10;
549 # Number of archive logs to keep. BackupPC remembers information
550 # about each archive request. This number per archive client will
551 # be kept around before the oldest ones are pruned.
553 $Conf{ArchiveInfoKeepCnt} = 10;
556 # List of directories or files to backup. If this is defined, only these
557 # directories or files will be backed up.
559 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
560 # can be specified per share. If both are set for a particular share, then
561 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
564 # This can be set to a string, an array of strings, or, in the case
565 # of multiple shares, a hash of strings or arrays. A hash is used
566 # to give a list of directories or files to backup for each share
567 # (the share name is the key). If this is set to just a string or
568 # array, and $Conf{SmbShareName} contains multiple share names, then
569 # the setting is assumed to apply to only the first share name.
572 # $Conf{BackupFilesOnly} = '/myFiles';
573 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
574 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
575 # $Conf{BackupFilesOnly} = {
576 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
577 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
580 $Conf{BackupFilesOnly} = undef;
583 # List of directories or files to exclude from the backup. For Smb,
584 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
585 # can be specified per share. If both are set for a particular share,
586 # then $Conf{BackupFilesOnly} takes precedence and
587 # $Conf{BackupFilesExclude} is ignored.
589 # This can be set to a string, an array of strings, or, in the case
590 # of multiple shares, a hash of strings or arrays. A hash is used
591 # to give a list of directories or files to exclude for each share
592 # (the share name is the key). If this is set to just a string or
593 # array, and $Conf{SmbShareName} contains multiple share names, then
594 # the setting is assumed to apply to only the first share name.
596 # The exact behavior is determined by the underlying transport program,
597 # smbclient or tar. For smbclient the exlclude file list is passed into
598 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
600 # For tar, if the exclude file contains a "/" it is assumed to be anchored
601 # at the start of the string. Since all the tar paths start with "./",
602 # BackupPC prepends a "." if the exclude file starts with a "/". Note
603 # that GNU tar version >= 1.13.7 is required for the exclude option to
604 # work correctly. For linux or unix machines you should add
605 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
606 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
607 # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
608 # the directory name: a trailing "/" causes the name to not match
609 # and the directory will not be excluded.
611 # Users report that for smbclient you should specify a directory
612 # followed by "/*", eg: "/proc/*", instead of just "/proc".
615 # $Conf{BackupFilesExclude} = '/temp';
616 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
617 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
618 # $Conf{BackupFilesExclude} = {
619 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
620 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
623 $Conf{BackupFilesExclude} = undef;
626 # PCs that are always or often on the network can be backed up after
627 # hours, to reduce PC, network and server load during working hours. For
628 # each PC a count of consecutive good pings is maintained. Once a PC has
629 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
630 # to "blackout" and not backed up during hours and days specified by
631 # $Conf{BlackoutPeriods}.
633 # To allow for periodic rebooting of a PC or other brief periods when a
634 # PC is not on the network, a number of consecutive bad pings is allowed
635 # before the good ping count is reset. This parameter is
636 # $Conf{BlackoutBadPingLimit}.
638 # Note that bad and good pings don't occur with the same interval. If a
639 # machine is always on the network, it will only be pinged roughly once
640 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
641 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
642 # machine to be subject to blackout. On the other hand, if a ping is
643 # failed, it will be retried roughly every time BackupPC wakes up, eg,
644 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
645 # 3 means that the PC will lose its blackout status after 3-6 hours of
648 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
649 # value. A value of 0 will make all machines subject to blackout. But
650 # if you don't want to do any backups during the day it would be easier
651 # to just set $Conf{WakeupSchedule} to a restricted schedule.
653 $Conf{BlackoutBadPingLimit} = 3;
654 $Conf{BlackoutGoodCnt} = 7;
657 # One or more blackout periods can be specified. If a client is
658 # subject to blackout then no regular (non-manual) backups will
659 # be started during any of these periods. hourBegin and hourEnd
660 # specify hours fro midnight and weekDays is a list of days of
661 # the week where 0 is Sunday, 1 is Monday etc.
665 # $Conf{BlackoutPeriods} = [
669 # weekDays => [1, 2, 3, 4, 5],
673 # specifies one blackout period from 7:00am to 7:30pm local time
676 # The blackout period can also span midnight by setting
677 # hourBegin > hourEnd, eg:
679 # $Conf{BlackoutPeriods} = [
683 # weekDays => [1, 2, 3, 4, 5],
688 # weekDays => [5, 6],
692 # This specifies one blackout period from 7:00am to 7:30pm local time
693 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
696 $Conf{BlackoutPeriods} = [
700 weekDays => [1, 2, 3, 4, 5],
705 # A backup of a share that has zero files is considered fatal. This is
706 # used to catch miscellaneous Xfer errors that result in no files being
707 # backed up. If you have shares that might be empty (and therefore an
708 # empty backup is valid) you should set this flag to 0.
710 $Conf{BackupZeroFilesIsFatal} = 1;
712 ###########################################################################
713 # General per-PC configuration settings
714 # (can be overridden in the per-PC config.pl)
715 ###########################################################################
717 # What transport method to use to backup each host. If you have
718 # a mixed set of WinXX and linux/unix hosts you will need to override
719 # this in the per-PC config.pl.
721 # The valid values are:
723 # - 'smb': backup and restore via smbclient and the SMB protocol.
724 # Easiest choice for WinXX.
726 # - 'rsync': backup and restore via rsync (via rsh or ssh).
727 # Best choice for linux/unix. Good choice also for WinXX.
729 # - 'rsyncd': backup and restre via rsync daemon on the client.
730 # Best choice for linux/unix if you have rsyncd running on
731 # the client. Good choice also for WinXX.
733 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
734 # Good choice for linux/unix.
736 # - 'archive': host is a special archive host. Backups are not done.
737 # An archive host is used to archive other host's backups
738 # to permanent media, such as tape, CDR or DVD.
741 $Conf{XferMethod} = 'smb';
744 # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
745 # will give one line per file, 2 will also show skipped files on
746 # incrementals, higher values give more output.
748 $Conf{XferLogLevel} = 1;
751 # Full path for smbclient. Security caution: normal users should not
752 # allowed to write to this file or directory.
754 # smbclient is from the Samba distribution. smbclient is used to
755 # actually extract the incremental or full dump of the share filesystem
758 # This setting only matters if $Conf{XferMethod} = 'smb'.
760 $Conf{SmbClientPath} = '/usr/bin/smbclient';
763 # Commands to run smbclient for a full dump, incremental dump or a restore.
764 # This setting only matters if $Conf{XferMethod} = 'smb'.
766 # The following variables are substituted at run-time:
768 # $smbClientPath same as $Conf{SmbClientPath}
769 # $host host to backup/restore
770 # $hostIP host IP address
771 # $shareName share name
772 # $userName user name
773 # $fileList list of files to backup (based on exclude/include)
774 # $I_option optional -I option to smbclient
775 # $X_option exclude option (if $fileList is an exclude list)
776 # $timeStampFile start time for incremental dump
778 # If your smb share is read-only then direct restores will fail.
779 # You should set $Conf{SmbClientRestoreCmd} to undef and the
780 # corresponding CGI restore option will be removed.
782 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
783 . ' $I_option -U $userName -E -N -d 1'
784 . ' -c tarmode\\ full -Tc$X_option - $fileList';
786 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
787 . ' $I_option -U $userName -E -N -d 1'
788 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
790 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
791 . ' $I_option -U $userName -E -N -d 1'
792 . ' -c tarmode\\ full -Tx -';
795 # Full command to run tar on the client. GNU tar is required. You will
796 # need to fill in the correct paths for ssh2 on the local host (server)
797 # and GNU tar on the client. Security caution: normal users should not
798 # allowed to write to these executable files or directories.
800 # See the documentation for more information about setting up ssh2 keys.
802 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
803 # For example, assuming the client filesystem is mounted below /mnt/hostName,
804 # you could use something like:
806 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
809 # In the case of NFS or rsh you need to make sure BackupPC's privileges
810 # are sufficient to read all the files you want to backup. Also, you
811 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
813 # The following variables are substituted at run-time:
816 # $hostIP host's IP address
817 # $incrDate newer-than date for incremental backups
818 # $shareName share name to backup (ie: top-level directory path)
819 # $fileList specific files to backup or exclude
820 # $tarPath same as $Conf{TarClientPath}
821 # $sshPath same as $Conf{SshPath}
823 # If a variable is followed by a "+" it is shell escaped. This is
824 # necessary for the command part of ssh or rsh, since it ends up
825 # getting passed through the shell.
827 # This setting only matters if $Conf{XferMethod} = 'tar'.
829 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
830 . ' $tarPath -c -v -f - -C $shareName+'
834 # Extra tar arguments for full backups. Several variables are substituted at
835 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
837 # If you are running tar locally (ie: without rsh or ssh) then remove the
838 # "+" so that the argument is no longer shell escaped.
840 # This setting only matters if $Conf{XferMethod} = 'tar'.
842 $Conf{TarFullArgs} = '$fileList+';
845 # Extra tar arguments for incr backups. Several variables are substituted at
846 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
848 # Note that GNU tar has several methods for specifying incremental backups,
851 # --newer-mtime $incrDate+
852 # This causes a file to be included if the modification time is
853 # later than $incrDate (meaning its contents might have changed).
854 # But changes in the ownership or modes will not qualify the
855 # file to be included in an incremental.
858 # This causes the file to be included if any attribute of the
859 # file is later than $incrDate, meaning either attributes or
860 # the modification time. This is the default method. Do
861 # not use --atime-preserve in $Conf{TarClientCmd} above,
862 # otherwise resetting the atime (access time) counts as an
863 # attribute change, meaning the file will always be included
864 # in each new incremental dump.
866 # If you are running tar locally (ie: without rsh or ssh) then remove the
867 # "+" so that the argument is no longer shell escaped.
869 # This setting only matters if $Conf{XferMethod} = 'tar'.
871 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
874 # Full command to run tar for restore on the client. GNU tar is required.
875 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
876 # and ssh's -n removed.
878 # See $Conf{TarClientCmd} for full details.
880 # This setting only matters if $Conf{XferMethod} = "tar".
882 # If you want to disable direct restores using tar, you should set
883 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
884 # restore option will be removed.
886 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
887 . ' $tarPath -x -p --numeric-owner --same-owner'
888 . ' -v -f - -C $shareName+';
891 # Full path for tar on the client. Security caution: normal users should not
892 # allowed to write to this file or directory.
894 # This setting only matters if $Conf{XferMethod} = 'tar'.
896 $Conf{TarClientPath} = '/bin/tar';
899 # Path to rsync executable on the client
901 $Conf{RsyncClientPath} = '/bin/rsync';
904 # Full command to run rsync on the client machine. The following variables
905 # are substituted at run-time:
907 # $host host name being backed up
908 # $hostIP host's IP address
909 # $shareName share name to backup (ie: top-level directory path)
910 # $rsyncPath same as $Conf{RsyncClientPath}
911 # $sshPath same as $Conf{SshPath}
912 # $argList argument list, built from $Conf{RsyncArgs},
913 # $shareName, $Conf{BackupFilesExclude} and
914 # $Conf{BackupFilesOnly}
916 # This setting only matters if $Conf{XferMethod} = 'rsync'.
918 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
921 # Full command to run rsync for restore on the client. The following
922 # variables are substituted at run-time:
924 # $host host name being backed up
925 # $hostIP host's IP address
926 # $shareName share name to backup (ie: top-level directory path)
927 # $rsyncPath same as $Conf{RsyncClientPath}
928 # $sshPath same as $Conf{SshPath}
929 # $argList argument list, built from $Conf{RsyncArgs},
930 # $shareName, $Conf{BackupFilesExclude} and
931 # $Conf{BackupFilesOnly}
933 # This setting only matters if $Conf{XferMethod} = 'rsync'.
935 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
938 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
939 # be a file system path, eg '/' or '/home'.
941 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
942 # to backup (ie: the name from /etc/rsynd.conf).
944 # This can also be a list of multiple file system paths or modules.
945 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
946 # can backup each file system separately, which makes restoring one
947 # bad file system easier. In this case you would list all of the mount
950 # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
952 $Conf{RsyncShareName} = '/';
955 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
957 $Conf{RsyncdClientPort} = 873;
960 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
961 # The user name and password are stored on the client in whatever file
962 # the "secrets file" parameter in rsyncd.conf points to
963 # (eg: /etc/rsyncd.secrets).
965 $Conf{RsyncdUserName} = '';
968 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
969 # The user name and password are stored on the client in whatever file
970 # the "secrets file" parameter in rsyncd.conf points to
971 # (eg: /etc/rsyncd.secrets).
973 $Conf{RsyncdPasswd} = '';
976 # Whether authentication is mandatory when connecting to the client's
977 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
978 # connect to an rsyncd on the client that is not password protected.
979 # Turn off at your own risk.
981 $Conf{RsyncdAuthRequired} = 1;
984 # Arguments to rsync for backup. Do not edit the first set unless you
985 # have a thorough understanding of how File::RsyncP works.
987 # Examples of additional arguments that should work are --exclude/--include,
990 # $Conf{RsyncArgs} = [
991 # # original arguments here
993 # '--exclude', '/proc',
994 # '--exclude', '*.tmp',
1008 '--block-size=2048',
1012 # If you are using a patched client rsync that supports the
1013 # --fixed-csumseed option (see http://backuppc.sourceforge.net),
1014 # then uncomment this to enabled rsync checksum cachcing
1016 #'--fixed-csumseed',
1019 # Add additional arguments here
1024 # Arguments to rsync for restore. Do not edit the first set unless you
1025 # have a thorough understanding of how File::RsyncP works.
1027 # If you want to disable direct restores using rsync (eg: is the module
1028 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1029 # the corresponding CGI restore option will be removed.
1031 $Conf{RsyncRestoreArgs} = [
1033 # Do not edit these!
1042 '--block-size=2048',
1048 # If you are using a patched client rsync that supports the
1049 # --fixed-csumseed option (see http://backuppc.sourceforge.net),
1050 # then uncomment this to enabled rsync checksum cachcing
1052 #'--fixed-csumseed',
1055 # Add additional arguments here
1060 # Archive Destination
1062 # The Destination of the archive
1063 # e.g. /tmp for file archive or /dev/nst0 for device archive
1065 $Conf{ArchiveDest} = '/tmp';
1068 # Archive Compression type
1070 # The valid values are:
1072 # - 'none': No Compression
1074 # - 'gzip': Medium Compression. Recommended.
1076 # - 'bzip2': High Compression but takes longer.
1078 $Conf{ArchiveComp} = 'gzip';
1081 # Archive Parity Files
1083 # The amount of Parity data to generate, as a percentage
1084 # of the archive size.
1085 # Uses the commandline par2 (par2cmdline) available from
1086 # http://parchive.sourceforge.net
1088 # Only useful for file dumps.
1090 # Set to 0 to disable this feature.
1092 $Conf{ArchivePar} = 0;
1095 # Archive Size Split
1097 # Only for file archives. Splits the output into
1098 # the specified size * 1,000,000.
1099 # e.g. to split into 650,000,000 bytes, specify 650 below.
1101 $Conf{ArchiveSplit} = 650;
1106 # This is the command that is called to actually run the archive process
1107 # for each host. The following variables are substituted at run-time:
1109 # $Installdir The installation directory of BackupPC
1110 # $tarCreatePath The path to BackupPC_tarCreate
1111 # $splitpath The path to the split program
1112 # $parpath The path to the par2 program
1113 # $host The host to archive
1114 # $backupnumber The backup number of the host to archive
1115 # $compression The path to the compression program
1116 # $compext The extension assigned to the compression type
1117 # $splitsize The number of bytes to split archives into
1118 # $archiveloc The location to put the archive
1119 # $parfile The amount of parity data to create (percentage)
1121 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1122 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1123 . ' $compression $compext $splitsize $archiveloc $parfile *';
1126 # Full path for ssh. Security caution: normal users should not
1127 # allowed to write to this file or directory.
1129 $Conf{SshPath} = '/usr/bin/ssh';
1132 # Full path for nmblookup. Security caution: normal users should not
1133 # allowed to write to this file or directory.
1135 # nmblookup is from the Samba distribution. nmblookup is used to get the
1136 # netbios name, necessary for DHCP hosts.
1138 $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
1141 # NmbLookup command. Given an IP address, does an nmblookup on that
1142 # IP address. The following variables are substituted at run-time:
1144 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1147 # This command is only used for DHCP hosts: given an IP address, this
1148 # command should try to find its NetBios name.
1150 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1153 # NmbLookup command. Given a netbios name, finds that host by doing
1154 # a NetBios lookup. Several variables are substituted at run-time:
1156 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1157 # $host NetBios name
1159 # In some cases you might need to change the broadcast address, for
1160 # example if nmblookup uses 192.168.255.255 by default and you find
1161 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1162 # address) using the -B option:
1164 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1166 # If you use a WINS server and your machines don't respond to
1167 # multicast NetBios requests you can use this (replace 1.2.3.4
1168 # with the IP address of your WINS server):
1170 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1172 # This is preferred over multicast since it minimizes network traffic.
1174 # Experiment manually for your site to see what form of nmblookup command
1177 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1180 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1181 # name to ensure it matches the host name. An error is generated if
1182 # they do not match. Typically this flag is off. But if you are going
1183 # to transition a bunch of machines from fixed host addresses to DHCP,
1184 # setting this flag is a great way to verify that the machines have
1185 # their netbios name set correctly before turning on DCHP.
1187 $Conf{FixedIPNetBiosNameCheck} = 0;
1190 # Full path to the ping command. Security caution: normal users
1191 # should not be allowed to write to this file or directory.
1193 # If you want to disable ping checking, set this to some program
1194 # that exits with 0 status, eg:
1196 # $Conf{PingPath} = '/bin/echo';
1198 $Conf{PingPath} = '/bin/ping';
1201 # Ping command. The following variables are substituted at run-time:
1203 # $pingPath path to ping ($Conf{PingPath})
1206 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1207 # exit status (0 even on failure). Replace with "ping $host 1", which
1208 # gets the correct exit status but we don't get the round-trip time.
1210 $Conf{PingCmd} = '$pingPath -c 1 $host';
1213 # Path to init.d script and command to use that script to start the
1214 # server from the CGI interface. The following variables are substituted
1217 # $sshPath path to ssh ($Conf{SshPath})
1218 # $serverHost same as $Conf{ServerHost}
1219 # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
1223 # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
1224 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
1225 # . ' $serverInitdPath start'
1226 # . ' < /dev/null >& /dev/null';
1228 $Conf{ServerInitdPath} = '';
1229 $Conf{ServerInitdStartCmd} = '';
1232 # Compression level to use on files. 0 means no compression. Compression
1233 # levels can be from 1 (least cpu time, slightly worse compression) to
1234 # 9 (most cpu time, slightly better compression). The recommended value
1235 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
1236 # and will get another 2-3% additional compression. See the zlib
1237 # documentation for more information about compression levels.
1239 # Changing compression on or off after backups have already been done
1240 # will require both compressed and uncompressed pool files to be stored.
1241 # This will increase the pool storage requirements, at least until all
1242 # the old backups expire and are deleted.
1244 # It is ok to change the compression value (from one non-zero value to
1245 # another non-zero value) after dumps are already done. Since BackupPC
1246 # matches pool files by comparing the uncompressed versions, it will still
1247 # correctly match new incoming files against existing pool files. The
1248 # new compression level will take effect only for new files that are
1249 # newly compressed and added to the pool.
1251 # If compression was off and you are enabling compression for the first
1252 # time you can use the BackupPC_compressPool utility to compress the
1253 # pool. This avoids having the pool grow to accommodate both compressed
1254 # and uncompressed backups. See the documentation for more information.
1256 # Note: compression needs the Compress::Zlib perl library. If the
1257 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1258 # forced to 0 (compression off).
1260 $Conf{CompressLevel} = 0;
1263 # Maximum round-trip ping time in milliseconds. This threshold is set
1264 # to avoid backing up PCs that are remotely connected through WAN or
1265 # dialup connections. The output from ping -s (assuming it is supported
1266 # on your system) is used to check the round-trip packet time. On your
1267 # local LAN round-trip times should be much less than 20msec. On most
1268 # WAN or dialup connections the round-trip time will be typically more
1269 # than 20msec. Tune if necessary.
1271 $Conf{PingMaxMsec} = 20;
1274 # Timeout in seconds when listening for the transport program's
1275 # (smbclient, tar etc) stdout. If no output is received during this
1276 # time, then it is assumed that something has wedged during a backup,
1277 # and the backup is terminated.
1279 # Note that stdout buffering combined with huge files being backed up
1280 # could cause longish delays in the output from smbclient that
1281 # BackupPC_dump sees, so in rare cases you might want to increase
1284 # Despite the name, this parameter sets the timeout for all transport
1285 # methods (tar, smb etc).
1287 $Conf{ClientTimeout} = 7200;
1290 # Maximum number of log files we keep around in each PC's directory
1291 # (ie: pc/$host). These files are aged monthly. A setting of 12
1292 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1293 # in the pc/$host directory (ie: about a years worth). (Except this
1294 # month's LOG, these files will have a .z extension if compression
1297 # If you decrease this number after BackupPC has been running for a
1298 # while you will have to manually remove the older log files.
1300 $Conf{MaxOldPerPCLogFiles} = 12;
1303 # Optional commands to run before and after dumps and restores.
1304 # Stdout from these commands will be written to the Xfer (or Restore)
1305 # log file. One example of using these commands would be to
1306 # shut down and restart a database server, or to dump a database
1307 # to files for backup. Example:
1309 # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1311 # The following variable substitutions are made at run time for
1312 # $Conf{DumpPreUserCmd} and $Conf{DumpPostUserCmd}:
1314 # $type type of dump (incr or full)
1315 # $xferOK 1 if the dump succeeded, 0 if it didn't
1316 # $client client name being backed up
1317 # $host host name (could be different from client name if
1318 # $Conf{ClientNameAlias} is set)
1319 # $hostIP IP address of host
1320 # $user user name from the hosts file
1321 # $moreUsers list of additional users from the hosts file
1322 # $share the first share name
1323 # $shares list of all the share names
1324 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1325 # $sshPath value of $Conf{SshPath},
1327 # The following variable substitutions are made at run time for
1328 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1330 # $client client name being backed up
1331 # $xferOK 1 if the restore succeeded, 0 if it didn't
1332 # $host host name (could be different from client name if
1333 # $Conf{ClientNameAlias} is set)
1334 # $hostIP IP address of host
1335 # $user user name from the hosts file
1336 # $moreUsers list of additional users from the hosts file
1337 # $share the first share name
1338 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1339 # $sshPath value of $Conf{SshPath},
1340 # $type set to "restore"
1341 # $bkupSrcHost host name of the restore source
1342 # $bkupSrcShare share name of the restore source
1343 # $bkupSrcNum backup number of the restore source
1344 # $pathHdrSrc common starting path of restore source
1345 # $pathHdrDest common starting path of destination
1346 # $fileList list of files being restored
1348 # The following variable substitutions are made at run time for
1349 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1351 # $client client name being backed up
1352 # $xferOK 1 if the archive succeeded, 0 if it didn't
1353 # $host Name of the archive host
1354 # $user user name from the hosts file
1355 # $share the first share name
1356 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1357 # $HostList list of hosts being archived
1358 # $BackupList list of backup numbers for the hosts being archived
1359 # $archiveloc location where the archive is sent to
1360 # $parfile amount of parity data being generated (percentage)
1361 # $compression compression program being used (eg: cat, gzip, bzip2)
1362 # $compext extension used for compression type (eg: raw, gz, bz2)
1363 # $splitsize size of the files that the archive creates
1364 # $sshPath value of $Conf{SshPath},
1365 # $type set to "archive"
1367 $Conf{DumpPreUserCmd} = undef;
1368 $Conf{DumpPostUserCmd} = undef;
1369 $Conf{RestorePreUserCmd} = undef;
1370 $Conf{RestorePostUserCmd} = undef;
1371 $Conf{ArchivePreUserCmd} = undef;
1372 $Conf{ArchivePostUserCmd} = undef;
1375 # Override the client's host name. This allows multiple clients
1376 # to all refer to the same physical host. This should only be
1377 # set in the per-PC config file and is only used by BackupPC at
1378 # the last moment prior to generating the command used to backup
1379 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1380 # everywhere else in BackupPC). The setting can be a host name or
1383 # $Conf{ClientNameAlias} = 'realHostName';
1384 # $Conf{ClientNameAlias} = '192.1.1.15';
1386 # will cause the relevant smb/tar/rsync backup/restore commands to be
1387 # directed to realHostName, not the client name.
1389 # Note: this setting doesn't work for hosts with DHCP set to 1.
1391 $Conf{ClientNameAlias} = undef;
1394 # Advanced option for asking BackupPC to load additional perl modules.
1395 # Can be a list (array ref) of module names to load at startup.
1397 $Conf{PerlModuleLoad} = undef;
1399 ###########################################################################
1400 # Email reminders, status and messages
1401 # (can be overridden in the per-PC config.pl)
1402 ###########################################################################
1404 # Full path to the sendmail command. Security caution: normal users
1405 # should not allowed to write to this file or directory.
1407 $Conf{SendmailPath} = '/usr/sbin/sendmail';
1410 # Minimum period between consecutive emails to a single user.
1411 # This tries to keep annoying email to users to a reasonable
1412 # level. Email checks are done nightly, so this number is effectively
1413 # rounded up (ie: 2.5 means a user will never receive email more
1414 # than once every 3 days).
1416 $Conf{EMailNotifyMinDays} = 2.5;
1419 # Name to use as the "from" name for email. Depending upon your mail
1420 # handler this is either a plain name (eg: "admin") or a fully-qualified
1421 # name (eg: "admin@mydomain.com").
1423 $Conf{EMailFromUserName} = '';
1426 # Destination address to an administrative user who will receive a
1427 # nightly email with warnings and errors. If there are no warnings
1428 # or errors then no email will be sent. Depending upon your mail
1429 # handler this is either a plain name (eg: "admin") or a fully-qualified
1430 # name (eg: "admin@mydomain.com").
1432 $Conf{EMailAdminUserName} = '';
1435 # Destination domain name for email sent to users. By default
1436 # this is empty, meaning email is sent to plain, unqualified
1437 # addresses. Otherwise, set it to the destintation domain, eg:
1439 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1441 # With this setting user email will be set to 'user@mydomain.com'.
1443 $Conf{EMailUserDestDomain} = '';
1446 # This subject and message is sent to a user if their PC has never been
1449 # These values are language-dependent. The default versions can be
1450 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1451 # need to change the message, copy it here and edit it, eg:
1453 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1460 # This is a site-specific email message.
1463 $Conf{EMailNoBackupEverSubj} = undef;
1464 $Conf{EMailNoBackupEverMesg} = undef;
1467 # How old the most recent backup has to be before notifying user.
1468 # When there have been no backups in this number of days the user
1471 $Conf{EMailNotifyOldBackupDays} = 7.0;
1474 # This subject and message is sent to a user if their PC has not recently
1475 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1477 # These values are language-dependent. The default versions can be
1478 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1479 # need to change the message, copy it here and edit it, eg:
1481 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1488 # This is a site-specific email message.
1491 $Conf{EMailNoBackupRecentSubj} = undef;
1492 $Conf{EMailNoBackupRecentMesg} = undef;
1495 # How old the most recent backup of Outlook files has to be before
1498 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1501 # This subject and message is sent to a user if their Outlook files have
1502 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1505 # These values are language-dependent. The default versions can be
1506 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1507 # need to change the message, copy it here and edit it, eg:
1509 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1516 # This is a site-specific email message.
1519 $Conf{EMailOutlookBackupSubj} = undef;
1520 $Conf{EMailOutlookBackupMesg} = undef;
1522 ###########################################################################
1523 # CGI user interface configuration settings
1524 # (can be overridden in the per-PC config.pl)
1525 ###########################################################################
1527 # Normal users can only access information specific to their host.
1528 # They can start/stop/browse/restore backups.
1530 # Administrative users have full access to all hosts, plus overall
1531 # status and log information.
1533 # The administrative users are the union of the unix/linux group
1534 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1535 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1536 # manual list of users set the corresponding configuration setting
1537 # to undef or an empty string.
1539 # If you want every user to have admin privileges (careful!), set
1540 # $Conf{CgiAdminUsers} = '*'.
1543 # $Conf{CgiAdminUserGroup} = 'admin';
1544 # $Conf{CgiAdminUsers} = 'craig celia';
1545 # --> administrative users are the union of group admin, plus
1548 # $Conf{CgiAdminUserGroup} = '';
1549 # $Conf{CgiAdminUsers} = 'craig celia';
1550 # --> administrative users are only craig and celia'.
1552 $Conf{CgiAdminUserGroup} = '';
1553 $Conf{CgiAdminUsers} = '';
1556 # URL of the BackupPC_Admin CGI script. Used for email messages.
1558 $Conf{CgiURL} = undef;
1561 # Language to use. See lib/BackupPC/Lang for the list of supported
1562 # languages, which include English (en), French (fr), Spanish (es),
1563 # German (de), and Italian (it).
1565 # Currently the Language setting applies to the CGI interface and email
1566 # messages sent to users. Log files and other text are still in English.
1568 $Conf{Language} = 'en';
1571 # User names that are rendered by the CGI interface can be turned
1572 # into links into their home page or other information about the
1573 # user. To set this up you need to create two sprintf() strings,
1574 # that each contain a single '%s' that will be replaced by the user
1575 # name. The default is a mailto: link.
1577 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1578 # is used to check (via "-f") that the user has a valid home page.
1579 # Set this to undef or an empty string to turn off this check.
1581 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1582 # user's home page. Set this to undef or an empty string to turn
1583 # off generation of URLs for user names.
1586 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1587 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
1588 # --> if /var/www/html/users/craig.html exists, then 'craig' will
1589 # be rendered as a link to http://myhost/users/craig.html.
1591 $Conf{CgiUserHomePageCheck} = '';
1592 $Conf{CgiUserUrlCreate} = 'mailto:%s';
1595 # Date display format for CGI interface. True for US-style dates (MM/DD)
1596 # and zero for international dates (DD/MM).
1598 $Conf{CgiDateFormatMMDD} = 1;
1601 # If set, the complete list of hosts appears in the left navigation
1602 # bar pull-down for administrators. Otherwise, just the hosts for which
1603 # the user is listed in the host file (as either the user or in moreUsers)
1606 $Conf{CgiNavBarAdminAllHosts} = 1;
1609 # Hilight colors based on status that are used in the PC summary page.
1611 $Conf{CgiStatusHilightColor} = {
1612 Reason_backup_failed => '#ffcccc',
1613 Reason_backup_done => '#ccffcc',
1614 Reason_no_ping => '#ffff99',
1615 Reason_backup_canceled_by_user => '#ff9900',
1616 Status_backup_in_progress => '#66cc99',
1620 # Additional CGI header text.
1622 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1625 # Directory where images are stored. This directory should be below
1626 # Apache's DocumentRoot. This value isn't used by BackupPC but is
1627 # used by configure.pl when you upgrade BackupPC.
1630 # $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1632 $Conf{CgiImageDir} = '';
1635 # Additional mappings of file name extenions to Content-Type for
1636 # individual file restore. See $Ext2ContentType in BackupPC_Admin
1637 # for the default setting. You can add additional settings here,
1638 # or override any default settings. Example:
1640 # $Conf{CgiExt2ContentType} = {
1641 # 'pl' => 'text/plain',
1644 $Conf{CgiExt2ContentType} = { };
1647 # URL (without the leading http://host) for BackupPC's image directory.
1648 # The CGI script uses this value to serve up image files.
1651 # $Conf{CgiImageDirURL} = '/BackupPC';
1653 $Conf{CgiImageDirURL} = '';
1656 # CSS stylesheet for the CGI interface. It is stored in the
1657 # $Conf{CgiImageDir} directory and accessed via the
1658 # $Conf{CgiImageDirURL} URL.
1660 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';