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-2007 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 maximize the chance
102 # that each laptop is backed up.
105 # $Conf{WakeupSchedule} = [22.5]; # once per day at 10:30 pm.
106 # $Conf{WakeupSchedule} = [2,4,6,8,10,12,14,16,18,20,22]; # every 2 hours
108 # The default value is every hour except midnight.
110 # The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly is run.
111 # You might want to re-arrange the entries in $Conf{WakeupSchedule}
112 # (they don't have to be ascending) so that the first entry is when
113 # you want BackupPC_nightly to run (eg: when you don't expect a lot
114 # of regular backups to run).
116 $Conf{WakeupSchedule} = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
119 # Maximum number of simultaneous backups to run. If there
120 # are no user backup requests then this is the maximum number
121 # of simultaneous backups.
123 $Conf{MaxBackups} = 4;
126 # Additional number of simultaneous backups that users can run.
127 # As many as $Conf{MaxBackups} + $Conf{MaxUserBackups} requests can
128 # run at the same time.
130 $Conf{MaxUserBackups} = 4;
133 # Maximum number of pending link commands. New backups will only be
134 # started if there are no more than $Conf{MaxPendingCmds} plus
135 # $Conf{MaxBackups} number of pending link commands, plus running jobs.
136 # This limit is to make sure BackupPC doesn't fall too far behind in
137 # running BackupPC_link commands.
139 $Conf{MaxPendingCmds} = 10;
142 # How many BackupPC_nightly processes to run in parallel.
144 # Each night, at the first wakeup listed in $Conf{WakeupSchedule},
145 # BackupPC_nightly is run. Its job is to remove unneeded files
146 # in the pool, ie: files that only have one link. To avoid race
147 # conditions, BackupPC_nightly runs only when there are no backups
148 # running, and no backups will start while it runs.
150 # So to reduce the elapsed time, you might want to increase this
151 # setting to run several BackupPC_nightly processes in parallel
152 # (eg: 4, or even 8).
154 $Conf{MaxBackupPCNightlyJobs} = 2;
157 # How many days (runs) it takes BackupPC_nightly to traverse the
158 # entire pool. Normally this is 1, which means every night it runs,
159 # it does traverse the entire pool removing unused pool files.
161 # Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
162 # traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
163 # takes 2, 4, 8 or 16 days to completely traverse the pool. The
164 # advantage is that each night the running time of BackupPC_nightly
165 # is reduced roughly in proportion, since the total job is split
166 # over multiple days. The disadvantage is that unused pool files
167 # take longer to get deleted, which will slightly increase disk
170 # Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly
171 # still runs every night. It just does less work each time it runs.
175 # $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night
177 # $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check
178 # # (different half each night)
180 # $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check
181 # # (different quarter each night)
183 $Conf{BackupPCNightlyPeriod} = 1;
186 # Maximum number of log files we keep around in log directory.
187 # These files are aged nightly. A setting of 14 means the log
188 # directory will contain about 2 weeks of old log files, in
189 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
190 # (except today's LOG, these files will have a .z extension if
191 # compression is on).
193 # If you decrease this number after BackupPC has been running for a
194 # while you will have to manually remove the older log files.
196 $Conf{MaxOldLogFiles} = 14;
199 # Full path to the df command. Security caution: normal users
200 # should not allowed to write to this file or directory.
205 # Command to run df. The following variables are substituted at run-time:
207 # $dfPath path to df ($Conf{DfPath})
208 # $topDir top-level BackupPC data directory
210 $Conf{DfCmd} = '$dfPath $topDir';
213 # Full path to various commands for archiving
215 $Conf{SplitPath} = '';
218 $Conf{GzipPath} = '';
219 $Conf{Bzip2Path} = '';
222 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
223 # If the output from $Conf{DfPath} reports a percentage larger than
224 # this number then no new regularly scheduled backups will be run.
225 # However, user requested backups (which are usually incremental and
226 # tend to be small) are still performed, independent of disk usage.
227 # Also, currently running backups will not be terminated when the disk
228 # usage exceeds this number.
230 $Conf{DfMaxUsagePct} = 95;
233 # How long BackupPC_trashClean sleeps in seconds between each check
234 # of the trash directory. Once every 5 minutes should be reasonable.
236 $Conf{TrashCleanSleepSec} = 300;
239 # List of DHCP address ranges we search looking for PCs to backup.
240 # This is an array of hashes for each class C address range.
241 # This is only needed if hosts in the conf/hosts file have the
245 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
246 # $Conf{DHCPAddressRanges} = [
248 # ipAddrBase => '192.10.10',
253 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
254 # $Conf{DHCPAddressRanges} = [
256 # ipAddrBase => '192.10.10',
261 # ipAddrBase => '192.10.11',
267 $Conf{DHCPAddressRanges} = [];
272 $Conf{BackupPCUser} = '';
275 # Important installation directories:
277 # TopDir - where all the backup data is stored
278 # ConfDir - where the main config and hosts files resides
279 # LogDir - where log files and other transient information
280 # InstallDir - where the bin, lib and doc installation dirs reside.
281 # Note: you cannot change this value since all the
282 # perl scripts include this path. You must reinstall
283 # with configure.pl to change InstallDir.
284 # CgiDir - Apache CGI directory for BackupPC_Admin
289 $Conf{InstallDir} = '';
293 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
294 # are really running as user $Conf{BackupPCUser}. If this flag is set
295 # and the effective user id (euid) differs from $Conf{BackupPCUser}
296 # then both scripts exit with an error. This catches cases where
297 # BackupPC might be accidently started as root or the wrong user,
298 # or if the CGI script is not installed correctly.
300 $Conf{BackupPCUserVerify} = 1;
303 # Maximum number of hardlinks supported by the $TopDir file system
304 # that BackupPC uses. Most linux or unix file systems should support
305 # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
306 # file already has this number of hardlinks, a new pool file is created
307 # so that new hardlinks can be accommodated. This limit will only
308 # be hit if an identical file appears at least this number of times
309 # across all the backups.
311 $Conf{HardLinkMax} = 31999;
314 # Advanced option for asking BackupPC to load additional perl modules.
315 # Can be a list (array ref) of module names to load at startup.
317 $Conf{PerlModuleLoad} = undef;
320 # Path to init.d script and command to use that script to start the
321 # server from the CGI interface. The following variables are substituted
324 # $sshPath path to ssh ($Conf{SshPath})
325 # $serverHost same as $Conf{ServerHost}
326 # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
330 # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
331 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
332 # . ' $serverInitdPath start'
333 # . ' < /dev/null >& /dev/null';
335 $Conf{ServerInitdPath} = '';
336 $Conf{ServerInitdStartCmd} = '';
339 ###########################################################################
340 # What to backup and when to do it
341 # (can be overridden in the per-PC config.pl)
342 ###########################################################################
344 # Minimum period in days between full backups. A full dump will only be
345 # done if at least this much time has elapsed since the last full dump,
346 # and at least $Conf{IncrPeriod} days has elapsed since the last
349 # Typically this is set slightly less than an integer number of days. The
350 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
351 # will make the actual backup interval a bit longer.
353 $Conf{FullPeriod} = 6.97;
356 # Minimum period in days between incremental backups (a user requested
357 # incremental backup will be done anytime on demand).
359 # Typically this is set slightly less than an integer number of days. The
360 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
361 # will make the actual backup interval a bit longer.
363 $Conf{IncrPeriod} = 0.97;
366 # Number of full backups to keep. Must be >= 1.
368 # In the steady state, each time a full backup completes successfully
369 # the oldest one is removed. If this number is decreased, the
370 # extra old backups will be removed.
372 # If filling of incremental dumps is off the oldest backup always
373 # has to be a full (ie: filled) dump. This might mean one or two
374 # extra full dumps are kept until the oldest incremental backups expire.
376 # Exponential backup expiry is also supported. This allows you to specify:
378 # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
379 # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
380 # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
381 # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
382 # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
384 # and so on. This works by deleting every other full as each expiry
385 # boundary is crossed.
387 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
389 # $Conf{FullKeepCnt} = [4, 2, 3];
391 # Entry #n specifies how many fulls to keep at an interval of
392 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
394 # The example above specifies keeping 4 of the most recent full backups
395 # (1 week interval) two full backups at 2 week intervals, and 3 full
396 # backups at 4 week intervals, eg:
398 # full 0 19 weeks old \
399 # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
400 # full 2 11 weeks old /
401 # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
402 # full 4 5 weeks old /
403 # full 5 3 weeks old \
404 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
405 # full 7 1 week old /
408 # On a given week the spacing might be less than shown as each backup
409 # ages through each expiry period. For example, one week later, a
410 # new full is completed and the oldest is deleted, giving:
412 # full 0 16 weeks old \
413 # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
414 # full 2 8 weeks old /
415 # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
416 # full 4 4 weeks old /
417 # full 5 3 weeks old \
418 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
419 # full 7 1 week old /
422 # You can specify 0 as a count (except in the first entry), and the
423 # array can be as long as you wish. For example:
425 # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
427 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
428 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
429 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
432 # Example: these two settings are equivalent and both keep just
433 # the four most recent full dumps:
435 # $Conf{FullKeepCnt} = 4;
436 # $Conf{FullKeepCnt} = [4];
438 $Conf{FullKeepCnt} = 1;
441 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
442 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
445 # Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
446 # times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
447 # full backups to exceed $Conf{FullAgeMax}.
449 $Conf{FullKeepCntMin} = 1;
450 $Conf{FullAgeMax} = 90;
453 # Number of incremental backups to keep. Must be >= 1.
455 # In the steady state, each time an incr backup completes successfully
456 # the oldest one is removed. If this number is decreased, the
457 # extra old backups will be removed.
459 $Conf{IncrKeepCnt} = 6;
462 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
463 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
464 # matter how old they are.
466 $Conf{IncrKeepCntMin} = 1;
467 $Conf{IncrAgeMax} = 30;
470 # Level of each incremental. "Level" follows the terminology
471 # of dump(1). A full backup has level 0. A new incremental
472 # of level N will backup all files that have changed since
473 # the most recent backup of a lower level.
475 # The entries of $Conf{IncrLevels} apply in order to each
476 # incremental after each full backup. It wraps around until
477 # the next full backup. For example, these two settings
478 # have the same effect:
480 # $Conf{IncrLevels} = [1, 2, 3];
481 # $Conf{IncrLevels} = [1, 2, 3, 1, 2, 3];
483 # This means the 1st and 4th incrementals (level 1) go all
484 # the way back to the full. The 2nd and 3rd (and 5th and
485 # 6th) backups just go back to the immediate preceeding
488 # Specifying a sequence of multi-level incrementals will
489 # usually mean more than $Conf{IncrKeepCnt} incrementals will
490 # need to be kept, since lower level incrementals are needed
491 # to merge a complete view of a backup. For example, with
493 # $Conf{FullPeriod} = 7;
494 # $Conf{IncrPeriod} = 1;
495 # $Conf{IncrKeepCnt} = 6;
496 # $Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
498 # there will be up to 11 incrementals in this case:
500 # backup #0 (full, level 0, oldest)
501 # backup #1 (incr, level 1)
502 # backup #2 (incr, level 2)
503 # backup #3 (incr, level 3)
504 # backup #4 (incr, level 4)
505 # backup #5 (incr, level 5)
506 # backup #6 (incr, level 6)
507 # backup #7 (full, level 0)
508 # backup #8 (incr, level 1)
509 # backup #9 (incr, level 2)
510 # backup #10 (incr, level 3)
511 # backup #11 (incr, level 4)
512 # backup #12 (incr, level 5, newest)
514 # Backup #1 (the oldest level 1 incremental) can't be deleted
515 # since backups 2..6 depend on it. Those 6 incrementals can't
516 # all be deleted since that would only leave 5 (#8..12).
517 # When the next incremental happens (level 6), the complete
518 # set of 6 older incrementals (#1..6) will be deleted, since
519 # that maintains the required number ($Conf{IncrKeepCnt})
520 # of incrementals. This situation is reduced if you set
521 # shorter chains of multi-level incrementals, eg:
523 # $Conf{IncrLevels} = [1, 2, 3];
525 # would only have up to 2 extra incremenals before all 3
528 # BackupPC as usual merges the full and the sequence
529 # of incrementals together so each incremental can be
530 # browsed and restored as though it is a complete backup.
531 # If you specify a long chain of incrementals then more
532 # backups need to be merged when browsing, restoring,
533 # or getting the starting point for rsync backups.
534 # In the example above (levels 1..6), browing backup
535 # #6 requires 7 different backups (#0..6) to be merged.
537 # Because of this merging and the additional incrementals
538 # that need to be kept, it is recommended that some
539 # level 1 incrementals be included in $Conf{IncrLevels}.
541 # Prior to version 3.0 incrementals were always level 1,
542 # meaning each incremental backed up all the files that
543 # changed since the last full.
545 $Conf{IncrLevels} = [1];
548 # Disable all full and incremental backups. These settings are
549 # useful for a client that is no longer being backed up
550 # (eg: a retired machine), but you wish to keep the last
551 # backups available for browsing or restoring to other machines.
553 # There are three values for $Conf{BackupsDisable}:
555 # 0 Backups are enabled.
557 # 1 Don't do any regular backups on this client. Manually
558 # requested backups (via the CGI interface) will still occur.
560 # 2 Don't do any backups on this client. Manually requested
561 # backups (via the CGI interface) will be ignored.
563 # In versions prior to 3.0 Backups were disabled by setting
564 # $Conf{FullPeriod} to -1 or -2.
566 $Conf{BackupsDisable} = 0;
569 # A failed full backup is saved as a partial backup. The rsync
570 # XferMethod can take advantage of the partial full when the next
571 # backup is run. This parameter sets the age of the partial full
572 # in days: if the partial backup is older than this number of
573 # days, then rsync will ignore (not use) the partial full when
574 # the next backup is run. If you set this to a negative value
575 # then no partials will be saved. If you set this to 0, partials
576 # will be saved, but will not be used by the next backup.
578 # The default setting of 3 days means that a partial older than
579 # 3 days is ignored when the next full backup is done.
581 $Conf{PartialAgeMax} = 3;
584 # Whether incremental backups are filled. "Filling" means that the
585 # most recent full (or filled) dump is merged into the new incremental
586 # dump using hardlinks. This makes an incremental dump look like a
587 # full dump. Prior to v1.03 all incremental backups were filled.
588 # In v1.4.0 and later the default is off.
590 # BackupPC, and the cgi interface in particular, do the right thing on
591 # un-filled incremental backups. It will correctly display the merged
592 # incremental backup with the most recent filled backup, giving the
593 # un-filled incremental backups a filled appearance. That means it
594 # invisible to the user whether incremental dumps are filled or not.
596 # Filling backups takes a little extra disk space, and it does cost
597 # some extra disk activity for filling, and later removal. Filling
598 # is no longer useful, since file mangling and compression doesn't
599 # make a filled backup very useful. It's likely the filling option
600 # will be removed from future versions: filling will be delegated to
601 # the display and extraction of backup data.
603 # If filling is off, BackupPC makes sure that the oldest backup is
604 # a full, otherwise the following incremental backups will be
605 # incomplete. This might mean an extra full backup has to be
606 # kept until the following incremental backups expire.
608 # The default is off. You can turn this on or off at any
609 # time without affecting existing backups.
614 # Number of restore logs to keep. BackupPC remembers information about
615 # each restore request. This number per client will be kept around before
616 # the oldest ones are pruned.
618 # Note: files/dirs delivered via Zip or Tar downloads don't count as
619 # restores. Only the first restore option (where the files and dirs
620 # are written to the host) count as restores that are logged.
622 $Conf{RestoreInfoKeepCnt} = 10;
625 # Number of archive logs to keep. BackupPC remembers information
626 # about each archive request. This number per archive client will
627 # be kept around before the oldest ones are pruned.
629 $Conf{ArchiveInfoKeepCnt} = 10;
632 # List of directories or files to backup. If this is defined, only these
633 # directories or files will be backed up.
635 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
636 # can be specified per share. If both are set for a particular share, then
637 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
640 # This can be set to a string, an array of strings, or, in the case
641 # of multiple shares, a hash of strings or arrays. A hash is used
642 # to give a list of directories or files to backup for each share
643 # (the share name is the key). If this is set to just a string or
644 # array, and $Conf{SmbShareName} contains multiple share names, then
645 # the setting is assumed to apply all shares.
647 # If a hash is used, a special key "*" means it applies to all
648 # shares that don't have a specific entry.
651 # $Conf{BackupFilesOnly} = '/myFiles';
652 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
653 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
654 # $Conf{BackupFilesOnly} = {
655 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
656 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
658 # $Conf{BackupFilesOnly} = {
659 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
660 # '*' => ['/myFiles', '/important'], # these are other shares
663 $Conf{BackupFilesOnly} = undef;
666 # List of directories or files to exclude from the backup. For Smb,
667 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
668 # can be specified per share. If both are set for a particular share,
669 # then $Conf{BackupFilesOnly} takes precedence and
670 # $Conf{BackupFilesExclude} is ignored.
672 # This can be set to a string, an array of strings, or, in the case
673 # of multiple shares, a hash of strings or arrays. A hash is used
674 # to give a list of directories or files to exclude for each share
675 # (the share name is the key). If this is set to just a string or
676 # array, and $Conf{SmbShareName} contains multiple share names, then
677 # the setting is assumed to apply to all shares.
679 # The exact behavior is determined by the underlying transport program,
680 # smbclient or tar. For smbclient the exlclude file list is passed into
681 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
683 # For tar, if the exclude file contains a "/" it is assumed to be anchored
684 # at the start of the string. Since all the tar paths start with "./",
685 # BackupPC prepends a "." if the exclude file starts with a "/". Note
686 # that GNU tar version >= 1.13.7 is required for the exclude option to
687 # work correctly. For linux or unix machines you should add
688 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
689 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
690 # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
691 # the directory name: a trailing "/" causes the name to not match
692 # and the directory will not be excluded.
694 # Users report that for smbclient you should specify a directory
695 # followed by "/*", eg: "/proc/*", instead of just "/proc".
697 # If a hash is used, a special key "*" means it applies to all
698 # shares that don't have a specific entry.
701 # $Conf{BackupFilesExclude} = '/temp';
702 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
703 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
704 # $Conf{BackupFilesExclude} = {
705 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
706 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
708 # $Conf{BackupFilesExclude} = {
709 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
710 # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
713 $Conf{BackupFilesExclude} = undef;
716 # PCs that are always or often on the network can be backed up after
717 # hours, to reduce PC, network and server load during working hours. For
718 # each PC a count of consecutive good pings is maintained. Once a PC has
719 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
720 # to "blackout" and not backed up during hours and days specified by
721 # $Conf{BlackoutPeriods}.
723 # To allow for periodic rebooting of a PC or other brief periods when a
724 # PC is not on the network, a number of consecutive bad pings is allowed
725 # before the good ping count is reset. This parameter is
726 # $Conf{BlackoutBadPingLimit}.
728 # Note that bad and good pings don't occur with the same interval. If a
729 # machine is always on the network, it will only be pinged roughly once
730 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
731 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
732 # machine to be subject to blackout. On the other hand, if a ping is
733 # failed, it will be retried roughly every time BackupPC wakes up, eg,
734 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
735 # 3 means that the PC will lose its blackout status after 3-6 hours of
738 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
739 # value. A value of 0 will make all machines subject to blackout. But
740 # if you don't want to do any backups during the day it would be easier
741 # to just set $Conf{WakeupSchedule} to a restricted schedule.
743 $Conf{BlackoutBadPingLimit} = 3;
744 $Conf{BlackoutGoodCnt} = 7;
747 # One or more blackout periods can be specified. If a client is
748 # subject to blackout then no regular (non-manual) backups will
749 # be started during any of these periods. hourBegin and hourEnd
750 # specify hours fro midnight and weekDays is a list of days of
751 # the week where 0 is Sunday, 1 is Monday etc.
755 # $Conf{BlackoutPeriods} = [
759 # weekDays => [1, 2, 3, 4, 5],
763 # specifies one blackout period from 7:00am to 7:30pm local time
766 # The blackout period can also span midnight by setting
767 # hourBegin > hourEnd, eg:
769 # $Conf{BlackoutPeriods} = [
773 # weekDays => [1, 2, 3, 4, 5],
778 # weekDays => [5, 6],
782 # This specifies one blackout period from 7:00am to 7:30pm local time
783 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
786 $Conf{BlackoutPeriods} = [
790 weekDays => [1, 2, 3, 4, 5],
795 # A backup of a share that has zero files is considered fatal. This is
796 # used to catch miscellaneous Xfer errors that result in no files being
797 # backed up. If you have shares that might be empty (and therefore an
798 # empty backup is valid) you should set this flag to 0.
800 $Conf{BackupZeroFilesIsFatal} = 1;
802 ###########################################################################
803 # How to backup a client
804 # (can be overridden in the per-PC config.pl)
805 ###########################################################################
807 # What transport method to use to backup each host. If you have
808 # a mixed set of WinXX and linux/unix hosts you will need to override
809 # this in the per-PC config.pl.
811 # The valid values are:
813 # - 'smb': backup and restore via smbclient and the SMB protocol.
814 # Easiest choice for WinXX.
816 # - 'rsync': backup and restore via rsync (via rsh or ssh).
817 # Best choice for linux/unix. Good choice also for WinXX.
819 # - 'rsyncd': backup and restore via rsync daemon on the client.
820 # Best choice for linux/unix if you have rsyncd running on
821 # the client. Good choice also for WinXX.
823 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
824 # Good choice for linux/unix.
826 # - 'archive': host is a special archive host. Backups are not done.
827 # An archive host is used to archive other host's backups
828 # to permanent media, such as tape, CDR or DVD.
831 $Conf{XferMethod} = 'smb';
834 # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
835 # will give one line per file, 2 will also show skipped files on
836 # incrementals, higher values give more output.
838 $Conf{XferLogLevel} = 1;
841 # Filename charset encoding on the client. BackupPC uses utf8
842 # on the server for filename encoding. If this is empty, then
843 # utf8 is assumed and client filenames will not be modified.
844 # If set to a different encoding then filenames will converted
845 # to/from utf8 automatically during backup and restore.
847 # If the file names displayed in the browser (eg: accents or special
848 # characters) don't look right then it is likely you haven't set
849 # $Conf{ClientCharset} correctly.
851 # If you are using smbclient on a WinXX machine, smbclient will convert
852 # to the "unix charset" setting in smb.conf. The default is utf8,
853 # in which case leave $Conf{ClientCharset} empty since smbclient does
854 # the right conversion.
856 # If you are using rsync on a WinXX machine then it does no conversion.
857 # A typical WinXX encoding for latin1/western europe is 'cp1252',
858 # so in this case set $Conf{ClientCharset} to 'cp1252'.
860 # On a linux or unix client, run "locale charmap" to see the client's
861 # charset. Set $Conf{ClientCharset} to this value. A typical value
862 # for english/US is 'ISO-8859-1'.
864 # Do "perldoc Encode::Supported" to see the list of possible charset
865 # values. The FAQ at http://www.cl.cam.ac.uk/~mgk25/unicode.html
866 # is excellent, and http://czyborra.com/charsets/iso8859.html
867 # provides more information on the iso-8859 charsets.
869 $Conf{ClientCharset} = '';
872 # Name of the host share that is backed up when using SMB. This can be a
873 # string or an array of strings if there are multiple shares per host.
876 # $Conf{SmbShareName} = 'c'; # backup 'c' share
877 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
879 # This setting only matters if $Conf{XferMethod} = 'smb'.
881 $Conf{SmbShareName} = 'C$';
884 # Smbclient share user name. This is passed to smbclient's -U argument.
886 # This setting only matters if $Conf{XferMethod} = 'smb'.
888 $Conf{SmbShareUserName} = '';
891 # Smbclient share password. This is passed to smbclient via its PASSWD
892 # environment variable. There are several ways you can tell BackupPC
893 # the smb share password. In each case you should be very careful about
894 # security. If you put the password here, make sure that this file is
895 # not readable by regular users! See the "Setting up config.pl" section
896 # in the documentation for more information.
898 # This setting only matters if $Conf{XferMethod} = 'smb'.
900 $Conf{SmbSharePasswd} = '';
903 # Full path for smbclient. Security caution: normal users should not
904 # allowed to write to this file or directory.
906 # smbclient is from the Samba distribution. smbclient is used to
907 # actually extract the incremental or full dump of the share filesystem
910 # This setting only matters if $Conf{XferMethod} = 'smb'.
912 $Conf{SmbClientPath} = '';
915 # Command to run smbclient for a full dump.
916 # This setting only matters if $Conf{XferMethod} = 'smb'.
918 # The following variables are substituted at run-time:
920 # $smbClientPath same as $Conf{SmbClientPath}
921 # $host host to backup/restore
922 # $hostIP host IP address
923 # $shareName share name
924 # $userName user name
925 # $fileList list of files to backup (based on exclude/include)
926 # $I_option optional -I option to smbclient
927 # $X_option exclude option (if $fileList is an exclude list)
928 # $timeStampFile start time for incremental dump
930 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
931 . ' $I_option -U $userName -E -N -d 1'
932 . ' -c tarmode\\ full -Tc$X_option - $fileList';
935 # Command to run smbclient for an incremental dump.
936 # This setting only matters if $Conf{XferMethod} = 'smb'.
938 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
940 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
941 . ' $I_option -U $userName -E -N -d 1'
942 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
945 # Command to run smbclient for a restore.
946 # This setting only matters if $Conf{XferMethod} = 'smb'.
948 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
950 # If your smb share is read-only then direct restores will fail.
951 # You should set $Conf{SmbClientRestoreCmd} to undef and the
952 # corresponding CGI restore option will be removed.
954 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
955 . ' $I_option -U $userName -E -N -d 1'
956 . ' -c tarmode\\ full -Tx -';
959 # Which host directories to backup when using tar transport. This can be a
960 # string or an array of strings if there are multiple directories to
961 # backup per host. Examples:
963 # $Conf{TarShareName} = '/'; # backup everything
964 # $Conf{TarShareName} = '/home'; # only backup /home
965 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
967 # The fact this parameter is called 'TarShareName' is for historical
968 # consistency with the Smb transport options. You can use any valid
969 # directory on the client: there is no need for it to correspond to
970 # any Smb share or device mount point.
972 # Note also that you can also use $Conf{BackupFilesOnly} to specify
973 # a specific list of directories to backup. It's more efficient to
974 # use this option instead of $Conf{TarShareName} since a new tar is
975 # run for each entry in $Conf{TarShareName}.
977 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
978 # you can backup each file system separately, which makes restoring one
979 # bad file system easier. In this case you would list all of the mount
980 # points here, since you can't get the same result with
981 # $Conf{BackupFilesOnly}:
983 # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
985 # This setting only matters if $Conf{XferMethod} = 'tar'.
987 $Conf{TarShareName} = '/';
990 # Full command to run tar on the client. GNU tar is required. You will
991 # need to fill in the correct paths for ssh2 on the local host (server)
992 # and GNU tar on the client. Security caution: normal users should not
993 # allowed to write to these executable files or directories.
995 # See the documentation for more information about setting up ssh2 keys.
997 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
998 # For example, assuming the client filesystem is mounted below /mnt/hostName,
999 # you could use something like:
1001 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
1004 # In the case of NFS or rsh you need to make sure BackupPC's privileges
1005 # are sufficient to read all the files you want to backup. Also, you
1006 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
1008 # The following variables are substituted at run-time:
1011 # $hostIP host's IP address
1012 # $incrDate newer-than date for incremental backups
1013 # $shareName share name to backup (ie: top-level directory path)
1014 # $fileList specific files to backup or exclude
1015 # $tarPath same as $Conf{TarClientPath}
1016 # $sshPath same as $Conf{SshPath}
1018 # If a variable is followed by a "+" it is shell escaped. This is
1019 # necessary for the command part of ssh or rsh, since it ends up
1020 # getting passed through the shell.
1022 # This setting only matters if $Conf{XferMethod} = 'tar'.
1024 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
1025 . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
1029 # Extra tar arguments for full backups. Several variables are substituted at
1030 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1032 # If you are running tar locally (ie: without rsh or ssh) then remove the
1033 # "+" so that the argument is no longer shell escaped.
1035 # This setting only matters if $Conf{XferMethod} = 'tar'.
1037 $Conf{TarFullArgs} = '$fileList+';
1040 # Extra tar arguments for incr backups. Several variables are substituted at
1041 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1043 # Note that GNU tar has several methods for specifying incremental backups,
1046 # --newer-mtime $incrDate+
1047 # This causes a file to be included if the modification time is
1048 # later than $incrDate (meaning its contents might have changed).
1049 # But changes in the ownership or modes will not qualify the
1050 # file to be included in an incremental.
1052 # --newer=$incrDate+
1053 # This causes the file to be included if any attribute of the
1054 # file is later than $incrDate, meaning either attributes or
1055 # the modification time. This is the default method. Do
1056 # not use --atime-preserve in $Conf{TarClientCmd} above,
1057 # otherwise resetting the atime (access time) counts as an
1058 # attribute change, meaning the file will always be included
1059 # in each new incremental dump.
1061 # If you are running tar locally (ie: without rsh or ssh) then remove the
1062 # "+" so that the argument is no longer shell escaped.
1064 # This setting only matters if $Conf{XferMethod} = 'tar'.
1066 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
1069 # Full command to run tar for restore on the client. GNU tar is required.
1070 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
1071 # and ssh's -n removed.
1073 # See $Conf{TarClientCmd} for full details.
1075 # This setting only matters if $Conf{XferMethod} = "tar".
1077 # If you want to disable direct restores using tar, you should set
1078 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
1079 # restore option will be removed.
1081 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
1082 . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
1083 . ' -v -f - -C $shareName+';
1086 # Full path for tar on the client. Security caution: normal users should not
1087 # allowed to write to this file or directory.
1089 # This setting only matters if $Conf{XferMethod} = 'tar'.
1091 $Conf{TarClientPath} = '';
1094 # Path to rsync executable on the client
1096 $Conf{RsyncClientPath} = '';
1099 # Full command to run rsync on the client machine. The following variables
1100 # are substituted at run-time:
1102 # $host host name being backed up
1103 # $hostIP host's IP address
1104 # $shareName share name to backup (ie: top-level directory path)
1105 # $rsyncPath same as $Conf{RsyncClientPath}
1106 # $sshPath same as $Conf{SshPath}
1107 # $argList argument list, built from $Conf{RsyncArgs},
1108 # $shareName, $Conf{BackupFilesExclude} and
1109 # $Conf{BackupFilesOnly}
1111 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1113 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1116 # Full command to run rsync for restore on the client. The following
1117 # variables are substituted at run-time:
1119 # $host host name being backed up
1120 # $hostIP host's IP address
1121 # $shareName share name to backup (ie: top-level directory path)
1122 # $rsyncPath same as $Conf{RsyncClientPath}
1123 # $sshPath same as $Conf{SshPath}
1124 # $argList argument list, built from $Conf{RsyncArgs},
1125 # $shareName, $Conf{BackupFilesExclude} and
1126 # $Conf{BackupFilesOnly}
1128 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1130 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1133 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
1134 # be a file system path, eg '/' or '/home'.
1136 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
1137 # to backup (ie: the name from /etc/rsynd.conf).
1139 # This can also be a list of multiple file system paths or modules.
1140 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
1141 # can backup each file system separately, which makes restoring one
1142 # bad file system easier. In this case you would list all of the mount
1145 # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
1147 $Conf{RsyncShareName} = '/';
1150 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
1152 $Conf{RsyncdClientPort} = 873;
1155 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1156 # The user name and password are stored on the client in whatever file
1157 # the "secrets file" parameter in rsyncd.conf points to
1158 # (eg: /etc/rsyncd.secrets).
1160 $Conf{RsyncdUserName} = '';
1163 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1164 # The user name and password are stored on the client in whatever file
1165 # the "secrets file" parameter in rsyncd.conf points to
1166 # (eg: /etc/rsyncd.secrets).
1168 $Conf{RsyncdPasswd} = '';
1171 # Whether authentication is mandatory when connecting to the client's
1172 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
1173 # connect to an rsyncd on the client that is not password protected.
1174 # Turn off at your own risk.
1176 $Conf{RsyncdAuthRequired} = 1;
1179 # When rsync checksum caching is enabled (by adding the
1180 # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
1181 # checksums can be occasionally verified to make sure the file
1182 # contents matches the cached checksums. This is to avoid the
1183 # risk that disk problems might cause the pool file contents to
1184 # get corrupted, but the cached checksums would make BackupPC
1185 # think that the file still matches the client.
1187 # This setting is the probability (0 means never and 1 means always)
1188 # that a file will be rechecked. Setting it to 0 means the checksums
1189 # will not be rechecked (unless there is a phase 0 failure). Setting
1190 # it to 1 (ie: 100%) means all files will be checked, but that is
1191 # not a desirable setting since you are better off simply turning
1192 # caching off (ie: remove the --checksum-seed option).
1194 # The default of 0.01 means 1% (on average) of the files during a full
1195 # backup will have their cached checksum re-checked.
1197 # This setting has no effect unless checksum caching is turned on.
1199 $Conf{RsyncCsumCacheVerifyProb} = 0.01;
1202 # Arguments to rsync for backup. Do not edit the first set unless you
1203 # have a thorough understanding of how File::RsyncP works.
1205 # Examples of additional arguments that should work are --exclude/--include,
1208 # $Conf{RsyncArgs} = [
1209 # # original arguments here
1211 # '--exclude', '/proc',
1212 # '--exclude', '*.tmp',
1215 $Conf{RsyncArgs} = [
1217 # Do not edit these!
1227 '--block-size=2048',
1231 # Rsync >= 2.6.3 supports the --checksum-seed option
1232 # which allows rsync checksum caching on the server.
1233 # Uncomment this to enable rsync checksum caching if
1234 # you have a recent client rsync version and you want
1235 # to enable checksum caching.
1237 #'--checksum-seed=32761',
1240 # Add additional arguments here
1245 # Arguments to rsync for restore. Do not edit the first set unless you
1246 # have a thorough understanding of how File::RsyncP works.
1248 # If you want to disable direct restores using rsync (eg: is the module
1249 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1250 # the corresponding CGI restore option will be removed.
1252 $Conf{RsyncRestoreArgs} = [
1254 # Do not edit these!
1264 '--block-size=2048',
1270 # Rsync >= 2.6.3 supports the --checksum-seed option
1271 # which allows rsync checksum caching on the server.
1272 # Uncomment this to enable rsync checksum caching if
1273 # you have a recent client rsync version and you want
1274 # to enable checksum caching.
1276 #'--checksum-seed=32761',
1279 # Add additional arguments here
1284 # Share name to backup. For $Conf{XferMethod} = "backuppcd" this should
1285 # be a file system path, eg '/' or '/home'.
1287 # This can also be a list of multiple file system paths or modules.
1290 # $Conf{BackupPCdShareName} = ['/', '/var', '/data', '/boot'];
1292 $Conf{BackupPCdShareName} = '/';
1295 # Path to backuppcd executable on the server
1297 $Conf{BackupPCdPath} = '';
1300 # Full command to run backuppcd on the server to backup a given
1301 # client machine. The following variables are substituted at
1302 # run-time (TODO: update this list)
1304 # $host host name being backed up
1305 # $hostIP host's IP address
1306 # $shareName share name to backup (ie: top-level directory path)
1307 # $backuppcdPath same as $Conf{BackupPCdPath}
1308 # $sshPath same as $Conf{SshPath}
1310 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1312 # Arguments to backupcpd are:
1314 # - the host name to backup
1315 # - the share name to backup
1316 # - the directory where the pool is
1317 # - the directory where the last run was (NOT DONE YET)
1318 # - a boolean value indicating whether or not the pool is
1320 # - the directory where the new run should occur (currently it assumes ".")
1322 $Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
1325 # Full command to run backuppcd on the server for restore to a
1326 # client machine. The following variables are substituted at
1327 # run-time (TODO: update this list)
1329 # $host host name being backed up
1330 # $hostIP host's IP address
1331 # $shareName share name to backup (ie: top-level directory path)
1332 # $backuppcdPath same as $Conf{BackupPCdPath}
1333 # $sshPath same as $Conf{SshPath}
1335 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1337 $Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
1341 # Archive Destination
1343 # The Destination of the archive
1344 # e.g. /tmp for file archive or /dev/nst0 for device archive
1346 $Conf{ArchiveDest} = '/tmp';
1349 # Archive Compression type
1351 # The valid values are:
1353 # - 'none': No Compression
1355 # - 'gzip': Medium Compression. Recommended.
1357 # - 'bzip2': High Compression but takes longer.
1359 $Conf{ArchiveComp} = 'gzip';
1362 # Archive Parity Files
1364 # The amount of Parity data to generate, as a percentage
1365 # of the archive size.
1366 # Uses the commandline par2 (par2cmdline) available from
1367 # http://parchive.sourceforge.net
1369 # Only useful for file dumps.
1371 # Set to 0 to disable this feature.
1373 $Conf{ArchivePar} = 0;
1376 # Archive Size Split
1378 # Only for file archives. Splits the output into
1379 # the specified size * 1,000,000.
1380 # e.g. to split into 650,000,000 bytes, specify 650 below.
1382 # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
1383 # device (e.g. a streaming tape drive), this feature is disabled.
1385 $Conf{ArchiveSplit} = 0;
1390 # This is the command that is called to actually run the archive process
1391 # for each host. The following variables are substituted at run-time:
1393 # $Installdir The installation directory of BackupPC
1394 # $tarCreatePath The path to BackupPC_tarCreate
1395 # $splitpath The path to the split program
1396 # $parpath The path to the par2 program
1397 # $host The host to archive
1398 # $backupnumber The backup number of the host to archive
1399 # $compression The path to the compression program
1400 # $compext The extension assigned to the compression type
1401 # $splitsize The number of bytes to split archives into
1402 # $archiveloc The location to put the archive
1403 # $parfile The amount of parity data to create (percentage)
1405 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1406 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1407 . ' $compression $compext $splitsize $archiveloc $parfile *';
1410 # Full path for ssh. Security caution: normal users should not
1411 # allowed to write to this file or directory.
1413 $Conf{SshPath} = '';
1416 # Full path for nmblookup. Security caution: normal users should not
1417 # allowed to write to this file or directory.
1419 # nmblookup is from the Samba distribution. nmblookup is used to get the
1420 # netbios name, necessary for DHCP hosts.
1422 $Conf{NmbLookupPath} = '';
1425 # NmbLookup command. Given an IP address, does an nmblookup on that
1426 # IP address. The following variables are substituted at run-time:
1428 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1431 # This command is only used for DHCP hosts: given an IP address, this
1432 # command should try to find its NetBios name.
1434 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1437 # NmbLookup command. Given a netbios name, finds that host by doing
1438 # a NetBios lookup. Several variables are substituted at run-time:
1440 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1441 # $host NetBios name
1443 # In some cases you might need to change the broadcast address, for
1444 # example if nmblookup uses 192.168.255.255 by default and you find
1445 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1446 # address) using the -B option:
1448 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1450 # If you use a WINS server and your machines don't respond to
1451 # multicast NetBios requests you can use this (replace 1.2.3.4
1452 # with the IP address of your WINS server):
1454 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1456 # This is preferred over multicast since it minimizes network traffic.
1458 # Experiment manually for your site to see what form of nmblookup command
1461 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1464 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1465 # name to ensure it matches the host name. An error is generated if
1466 # they do not match. Typically this flag is off. But if you are going
1467 # to transition a bunch of machines from fixed host addresses to DHCP,
1468 # setting this flag is a great way to verify that the machines have
1469 # their netbios name set correctly before turning on DCHP.
1471 $Conf{FixedIPNetBiosNameCheck} = 0;
1474 # Full path to the ping command. Security caution: normal users
1475 # should not be allowed to write to this file or directory.
1477 # If you want to disable ping checking, set this to some program
1478 # that exits with 0 status, eg:
1480 # $Conf{PingPath} = '/bin/echo';
1482 $Conf{PingPath} = '';
1485 # Ping command. The following variables are substituted at run-time:
1487 # $pingPath path to ping ($Conf{PingPath})
1490 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1491 # exit status (0 even on failure). Replace with "ping $host 1", which
1492 # gets the correct exit status but we don't get the round-trip time.
1494 $Conf{PingCmd} = '$pingPath -c 1 $host';
1497 # Maximum round-trip ping time in milliseconds. This threshold is set
1498 # to avoid backing up PCs that are remotely connected through WAN or
1499 # dialup connections. The output from ping -s (assuming it is supported
1500 # on your system) is used to check the round-trip packet time. On your
1501 # local LAN round-trip times should be much less than 20msec. On most
1502 # WAN or dialup connections the round-trip time will be typically more
1503 # than 20msec. Tune if necessary.
1505 $Conf{PingMaxMsec} = 20;
1508 # Compression level to use on files. 0 means no compression. Compression
1509 # levels can be from 1 (least cpu time, slightly worse compression) to
1510 # 9 (most cpu time, slightly better compression). The recommended value
1511 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
1512 # and will get another 2-3% additional compression. See the zlib
1513 # documentation for more information about compression levels.
1515 # Changing compression on or off after backups have already been done
1516 # will require both compressed and uncompressed pool files to be stored.
1517 # This will increase the pool storage requirements, at least until all
1518 # the old backups expire and are deleted.
1520 # It is ok to change the compression value (from one non-zero value to
1521 # another non-zero value) after dumps are already done. Since BackupPC
1522 # matches pool files by comparing the uncompressed versions, it will still
1523 # correctly match new incoming files against existing pool files. The
1524 # new compression level will take effect only for new files that are
1525 # newly compressed and added to the pool.
1527 # If compression was off and you are enabling compression for the first
1528 # time you can use the BackupPC_compressPool utility to compress the
1529 # pool. This avoids having the pool grow to accommodate both compressed
1530 # and uncompressed backups. See the documentation for more information.
1532 # Note: compression needs the Compress::Zlib perl library. If the
1533 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1534 # forced to 0 (compression off).
1536 $Conf{CompressLevel} = 0;
1539 # Timeout in seconds when listening for the transport program's
1540 # (smbclient, tar etc) stdout. If no output is received during this
1541 # time, then it is assumed that something has wedged during a backup,
1542 # and the backup is terminated.
1544 # Note that stdout buffering combined with huge files being backed up
1545 # could cause longish delays in the output from smbclient that
1546 # BackupPC_dump sees, so in rare cases you might want to increase
1549 # Despite the name, this parameter sets the timeout for all transport
1550 # methods (tar, smb etc).
1552 $Conf{ClientTimeout} = 72000;
1555 # Maximum number of log files we keep around in each PC's directory
1556 # (ie: pc/$host). These files are aged monthly. A setting of 12
1557 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1558 # in the pc/$host directory (ie: about a years worth). (Except this
1559 # month's LOG, these files will have a .z extension if compression
1562 # If you decrease this number after BackupPC has been running for a
1563 # while you will have to manually remove the older log files.
1565 $Conf{MaxOldPerPCLogFiles} = 12;
1568 # Optional commands to run before and after dumps and restores,
1569 # and also before and after each share of a dump.
1571 # Stdout from these commands will be written to the Xfer (or Restore)
1572 # log file. One example of using these commands would be to
1573 # shut down and restart a database server, dump a database
1574 # to files for backup, or doing a snapshot of a share prior
1575 # to a backup. Example:
1577 # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1579 # The following variable substitutions are made at run time for
1580 # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
1581 # and $Conf{DumpPostShareCmd}:
1583 # $type type of dump (incr or full)
1584 # $xferOK 1 if the dump succeeded, 0 if it didn't
1585 # $client client name being backed up
1586 # $host host name (could be different from client name if
1587 # $Conf{ClientNameAlias} is set)
1588 # $hostIP IP address of host
1589 # $user user name from the hosts file
1590 # $moreUsers list of additional users from the hosts file
1591 # $share the first share name (or current share for
1592 # $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
1593 # $shares list of all the share names
1594 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1595 # $sshPath value of $Conf{SshPath},
1596 # $cmdType set to DumpPreUserCmd or DumpPostUserCmd
1598 # The following variable substitutions are made at run time for
1599 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1601 # $client client name being backed up
1602 # $xferOK 1 if the restore succeeded, 0 if it didn't
1603 # $host host name (could be different from client name if
1604 # $Conf{ClientNameAlias} is set)
1605 # $hostIP IP address of host
1606 # $user user name from the hosts file
1607 # $moreUsers list of additional users from the hosts file
1608 # $share the first share name
1609 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1610 # $sshPath value of $Conf{SshPath},
1611 # $type set to "restore"
1612 # $bkupSrcHost host name of the restore source
1613 # $bkupSrcShare share name of the restore source
1614 # $bkupSrcNum backup number of the restore source
1615 # $pathHdrSrc common starting path of restore source
1616 # $pathHdrDest common starting path of destination
1617 # $fileList list of files being restored
1618 # $cmdType set to RestorePreUserCmd or RestorePostUserCmd
1620 # The following variable substitutions are made at run time for
1621 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1623 # $client client name being backed up
1624 # $xferOK 1 if the archive succeeded, 0 if it didn't
1625 # $host Name of the archive host
1626 # $user user name from the hosts file
1627 # $share the first share name
1628 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1629 # $HostList list of hosts being archived
1630 # $BackupList list of backup numbers for the hosts being archived
1631 # $archiveloc location where the archive is sent to
1632 # $parfile amount of parity data being generated (percentage)
1633 # $compression compression program being used (eg: cat, gzip, bzip2)
1634 # $compext extension used for compression type (eg: raw, gz, bz2)
1635 # $splitsize size of the files that the archive creates
1636 # $sshPath value of $Conf{SshPath},
1637 # $type set to "archive"
1638 # $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd
1640 $Conf{DumpPreUserCmd} = undef;
1641 $Conf{DumpPostUserCmd} = undef;
1642 $Conf{DumpPreShareCmd} = undef;
1643 $Conf{DumpPostShareCmd} = undef;
1644 $Conf{RestorePreUserCmd} = undef;
1645 $Conf{RestorePostUserCmd} = undef;
1646 $Conf{ArchivePreUserCmd} = undef;
1647 $Conf{ArchivePostUserCmd} = undef;
1650 # Whether the exit status of each PreUserCmd and
1651 # PostUserCmd is checked.
1653 # If set and the Dump/Restore/Archive Pre/Post UserCmd
1654 # returns a non-zero exit status then the dump/restore/archive
1655 # is aborted. To maintain backward compatibility (where
1656 # the exit status in early versions was always ignored),
1657 # this flag defaults to 0.
1659 # If this flag is set and the Dump/Restore/Archive PreUserCmd
1660 # fails then the matching Dump/Restore/Archive PostUserCmd is
1661 # not executed. If DumpPreShareCmd returns a non-exit status,
1662 # then DumpPostShareCmd is not executed, but the DumpPostUserCmd
1663 # is still run (since DumpPreUserCmd must have previously
1666 # An example of a DumpPreUserCmd that might fail is a script
1667 # that snapshots or dumps a database which fails because
1668 # of some database error.
1670 $Conf{UserCmdCheckStatus} = 0;
1673 # Override the client's host name. This allows multiple clients
1674 # to all refer to the same physical host. This should only be
1675 # set in the per-PC config file and is only used by BackupPC at
1676 # the last moment prior to generating the command used to backup
1677 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1678 # everywhere else in BackupPC). The setting can be a host name or
1681 # $Conf{ClientNameAlias} = 'realHostName';
1682 # $Conf{ClientNameAlias} = '192.1.1.15';
1684 # will cause the relevant smb/tar/rsync backup/restore commands to be
1685 # directed to realHostName, not the client name.
1687 # Note: this setting doesn't work for hosts with DHCP set to 1.
1689 $Conf{ClientNameAlias} = undef;
1691 ###########################################################################
1692 # Email reminders, status and messages
1693 # (can be overridden in the per-PC config.pl)
1694 ###########################################################################
1696 # Full path to the sendmail command. Security caution: normal users
1697 # should not allowed to write to this file or directory.
1699 $Conf{SendmailPath} = '';
1702 # Minimum period between consecutive emails to a single user.
1703 # This tries to keep annoying email to users to a reasonable
1704 # level. Email checks are done nightly, so this number is effectively
1705 # rounded up (ie: 2.5 means a user will never receive email more
1706 # than once every 3 days).
1708 $Conf{EMailNotifyMinDays} = 2.5;
1711 # Name to use as the "from" name for email. Depending upon your mail
1712 # handler this is either a plain name (eg: "admin") or a fully-qualified
1713 # name (eg: "admin@mydomain.com").
1715 $Conf{EMailFromUserName} = '';
1718 # Destination address to an administrative user who will receive a
1719 # nightly email with warnings and errors. If there are no warnings
1720 # or errors then no email will be sent. Depending upon your mail
1721 # handler this is either a plain name (eg: "admin") or a fully-qualified
1722 # name (eg: "admin@mydomain.com").
1724 $Conf{EMailAdminUserName} = '';
1727 # Destination domain name for email sent to users. By default
1728 # this is empty, meaning email is sent to plain, unqualified
1729 # addresses. Otherwise, set it to the destintation domain, eg:
1731 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1733 # With this setting user email will be set to 'user@mydomain.com'.
1735 $Conf{EMailUserDestDomain} = '';
1738 # This subject and message is sent to a user if their PC has never been
1741 # These values are language-dependent. The default versions can be
1742 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1743 # need to change the message, copy it here and edit it, eg:
1745 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1752 # This is a site-specific email message.
1755 $Conf{EMailNoBackupEverSubj} = undef;
1756 $Conf{EMailNoBackupEverMesg} = undef;
1759 # How old the most recent backup has to be before notifying user.
1760 # When there have been no backups in this number of days the user
1763 $Conf{EMailNotifyOldBackupDays} = 7.0;
1766 # This subject and message is sent to a user if their PC has not recently
1767 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1769 # These values are language-dependent. The default versions can be
1770 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1771 # need to change the message, copy it here and edit it, eg:
1773 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1780 # This is a site-specific email message.
1783 $Conf{EMailNoBackupRecentSubj} = undef;
1784 $Conf{EMailNoBackupRecentMesg} = undef;
1787 # How old the most recent backup of Outlook files has to be before
1790 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1793 # This subject and message is sent to a user if their Outlook files have
1794 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1797 # These values are language-dependent. The default versions can be
1798 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1799 # need to change the message, copy it here and edit it, eg:
1801 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1808 # This is a site-specific email message.
1811 $Conf{EMailOutlookBackupSubj} = undef;
1812 $Conf{EMailOutlookBackupMesg} = undef;
1815 # Additional email headers. If you change the charset
1816 # to utf8 then BackupPC_sendEmail will use utf8 for
1819 $Conf{EMailHeaders} = <<EOF;
1821 Content-Type: text/plain; charset="iso-8859-1"
1824 ###########################################################################
1825 # CGI user interface configuration settings
1826 # (can be overridden in the per-PC config.pl)
1827 ###########################################################################
1829 # Normal users can only access information specific to their host.
1830 # They can start/stop/browse/restore backups.
1832 # Administrative users have full access to all hosts, plus overall
1833 # status and log information.
1835 # The administrative users are the union of the unix/linux group
1836 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1837 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1838 # manual list of users set the corresponding configuration setting
1839 # to undef or an empty string.
1841 # If you want every user to have admin privileges (careful!), set
1842 # $Conf{CgiAdminUsers} = '*'.
1845 # $Conf{CgiAdminUserGroup} = 'admin';
1846 # $Conf{CgiAdminUsers} = 'craig celia';
1847 # --> administrative users are the union of group admin, plus
1850 # $Conf{CgiAdminUserGroup} = '';
1851 # $Conf{CgiAdminUsers} = 'craig celia';
1852 # --> administrative users are only craig and celia'.
1854 $Conf{CgiAdminUserGroup} = '';
1855 $Conf{CgiAdminUsers} = '';
1858 # URL of the BackupPC_Admin CGI script. Used for email messages.
1860 $Conf{CgiURL} = undef;
1863 # Language to use. See lib/BackupPC/Lang for the list of supported
1864 # languages, which include English (en), French (fr), Spanish (es),
1865 # German (de), Italian (it), Dutch (nl), Portuguese Brazillian
1866 # (pt_br) and Chinese (zh_CH).
1868 # Currently the Language setting applies to the CGI interface and email
1869 # messages sent to users. Log files and other text are still in English.
1871 $Conf{Language} = 'en';
1874 # User names that are rendered by the CGI interface can be turned
1875 # into links into their home page or other information about the
1876 # user. To set this up you need to create two sprintf() strings,
1877 # that each contain a single '%s' that will be replaced by the user
1878 # name. The default is a mailto: link.
1880 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1881 # is used to check (via "-f") that the user has a valid home page.
1882 # Set this to undef or an empty string to turn off this check.
1884 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1885 # user's home page. Set this to undef or an empty string to turn
1886 # off generation of URLs for user names.
1889 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1890 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
1891 # --> if /var/www/html/users/craig.html exists, then 'craig' will
1892 # be rendered as a link to http://myhost/users/craig.html.
1894 $Conf{CgiUserHomePageCheck} = '';
1895 $Conf{CgiUserUrlCreate} = 'mailto:%s';
1898 # Date display format for CGI interface. A value of 1 uses US-style
1899 # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
1900 # for international dates (DD/MM).
1902 $Conf{CgiDateFormatMMDD} = 1;
1905 # If set, the complete list of hosts appears in the left navigation
1906 # bar pull-down for administrators. Otherwise, just the hosts for which
1907 # the user is listed in the host file (as either the user or in moreUsers)
1910 $Conf{CgiNavBarAdminAllHosts} = 1;
1913 # Enable/disable the search box in the navigation bar.
1915 $Conf{CgiSearchBoxEnable} = 1;
1918 # Additional navigation bar links. These appear for both regular users
1919 # and administrators. This is a list of hashes giving the link (URL)
1920 # and the text (name) for the link. Specifying lname instead of name
1921 # uses the language specific string (ie: $Lang->{lname}) instead of
1922 # just literally displaying name.
1924 $Conf{CgiNavBarLinks} = [
1926 link => "?action=view&type=docs",
1927 lname => "Documentation", # actually displays $Lang->{Documentation}
1930 link => "http://backuppc.sourceforge.net/faq",
1931 name => "FAQ", # displays literal "FAQ"
1934 link => "http://backuppc.sourceforge.net",
1935 name => "SourceForge", # displays literal "SourceForge"
1940 # Hilight colors based on status that are used in the PC summary page.
1942 $Conf{CgiStatusHilightColor} = {
1943 Reason_backup_failed => '#ffcccc',
1944 Reason_backup_done => '#ccffcc',
1945 Reason_no_ping => '#ffff99',
1946 Reason_backup_canceled_by_user => '#ff9900',
1947 Status_backup_in_progress => '#66cc99',
1948 Disabled_OnlyManualBackups => '#d1d1d1',
1949 Disabled_AllBackupsDisabled => '#d1d1d1',
1953 # Additional CGI header text.
1955 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1958 # Directory where images are stored. This directory should be below
1959 # Apache's DocumentRoot. This value isn't used by BackupPC but is
1960 # used by configure.pl when you upgrade BackupPC.
1963 # $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1965 $Conf{CgiImageDir} = '';
1968 # Additional mappings of file name extenions to Content-Type for
1969 # individual file restore. See $Ext2ContentType in BackupPC_Admin
1970 # for the default setting. You can add additional settings here,
1971 # or override any default settings. Example:
1973 # $Conf{CgiExt2ContentType} = {
1974 # 'pl' => 'text/plain',
1977 $Conf{CgiExt2ContentType} = { };
1980 # URL (without the leading http://host) for BackupPC's image directory.
1981 # The CGI script uses this value to serve up image files.
1984 # $Conf{CgiImageDirURL} = '/BackupPC';
1986 $Conf{CgiImageDirURL} = '';
1989 # CSS stylesheet "skin" for the CGI interface. It is stored
1990 # in the $Conf{CgiImageDir} directory and accessed via the
1991 # $Conf{CgiImageDirURL} URL.
1993 # For BackupPC v3.x several color, layout and font changes were made.
1994 # The previous v2.x version is available as BackupPC_stnd_orig.css, so
1995 # if you prefer the old skin, change this to BackupPC_stnd_orig.css.
1997 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
2000 # Whether the user is allowed to edit their per-PC config.
2002 $Conf{CgiUserConfigEditEnable} = 1;
2005 # Which per-host config variables a non-admin user is allowed
2006 # to edit. Admin users can edit all per-host config variables,
2007 # even if disabled in this list.
2009 # SECURITY WARNING: Do not let users edit any of the Cmd
2010 # config variables! That's because a user could set a
2011 # Cmd to a shell script of their choice and it will be
2012 # run as the BackupPC user. That script could do all
2013 # sorts of bad things.
2015 $Conf{CgiUserConfigEdit} = {
2019 FullKeepCntMin => 1,
2022 IncrKeepCntMin => 1,
2027 RestoreInfoKeepCnt => 1,
2028 ArchiveInfoKeepCnt => 1,
2029 BackupFilesOnly => 1,
2030 BackupFilesExclude => 1,
2031 BackupsDisable => 1,
2032 BlackoutBadPingLimit => 1,
2033 BlackoutGoodCnt => 1,
2034 BlackoutPeriods => 1,
2035 BackupZeroFilesIsFatal => 1,
2040 SmbShareUserName => 1,
2041 SmbSharePasswd => 1,
2042 SmbClientFullCmd => 0,
2043 SmbClientIncrCmd => 0,
2044 SmbClientRestoreCmd => 0,
2049 TarClientRestoreCmd => 0,
2051 RsyncShareName => 1,
2052 RsyncdClientPort => 1,
2054 RsyncdUserName => 1,
2055 RsyncdAuthRequired => 1,
2056 RsyncCsumCacheVerifyProb => 1,
2058 RsyncRestoreArgs => 1,
2059 RsyncClientCmd => 0,
2060 RsyncClientRestoreCmd => 0,
2061 RsyncClientPath => 0,
2066 ArchiveClientCmd => 0,
2067 FixedIPNetBiosNameCheck => 1,
2069 NmbLookupFindHostCmd => 0,
2073 MaxOldPerPCLogFiles => 1,
2075 ClientNameAlias => 1,
2076 DumpPreUserCmd => 0,
2077 DumpPostUserCmd => 0,
2078 RestorePreUserCmd => 0,
2079 RestorePostUserCmd => 0,
2080 ArchivePreUserCmd => 0,
2081 ArchivePostUserCmd => 0,
2082 DumpPostShareCmd => 0,
2083 DumpPreShareCmd => 0,
2084 UserCmdCheckStatus => 0,
2085 EMailNotifyMinDays => 1,
2086 EMailFromUserName => 1,
2087 EMailAdminUserName => 1,
2088 EMailUserDestDomain => 1,
2089 EMailNoBackupEverSubj => 1,
2090 EMailNoBackupEverMesg => 1,
2091 EMailNotifyOldBackupDays => 1,
2092 EMailNoBackupRecentSubj => 1,
2093 EMailNoBackupRecentMesg => 1,
2094 EMailNotifyOldOutlookDays => 1,
2095 EMailOutlookBackupSubj => 1,
2096 EMailOutlookBackupMesg => 1,