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 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} = [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.
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
217 $Conf{SplitPath} = '';
220 $Conf{GzipPath} = '';
221 $Conf{Bzip2Path} = '';
224 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
225 # If the output from $Conf{DfPath} reports a percentage larger than
226 # this number then no new regularly scheduled backups will be run.
227 # However, user requested backups (which are usually incremental and
228 # tend to be small) are still performed, independent of disk usage.
229 # Also, currently running backups will not be terminated when the disk
230 # usage exceeds this number.
232 $Conf{DfMaxUsagePct} = 95;
235 # How long BackupPC_trashClean sleeps in seconds between each check
236 # of the trash directory. Once every 5 minutes should be reasonable.
238 $Conf{TrashCleanSleepSec} = 300;
241 # List of DHCP address ranges we search looking for PCs to backup.
242 # This is an array of hashes for each class C address range.
243 # This is only needed if hosts in the conf/hosts file have the
247 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
248 # $Conf{DHCPAddressRanges} = [
250 # ipAddrBase => '192.10.10',
255 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
256 # $Conf{DHCPAddressRanges} = [
258 # ipAddrBase => '192.10.10',
263 # ipAddrBase => '192.10.11',
269 $Conf{DHCPAddressRanges} = [];
274 $Conf{BackupPCUser} = '';
277 # Important installation directories:
279 # TopDir - where all the backup data is stored
280 # ConfDir - where the main config and hosts files resides
281 # LogDir - where log files and other transient information
282 # InstallDir - where the bin, lib and doc installation dirs reside.
283 # Note: you cannot change this value since all the
284 # perl scripts include this path. You must reinstall
285 # with configure.pl to change InstallDir.
286 # CgiDir - Apache CGI directory for BackupPC_Admin
291 $Conf{InstallDir} = '';
295 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
296 # are really running as user $Conf{BackupPCUser}. If this flag is set
297 # and the effective user id (euid) differs from $Conf{BackupPCUser}
298 # then both scripts exit with an error. This catches cases where
299 # BackupPC might be accidently started as root or the wrong user,
300 # or if the CGI script is not installed correctly.
302 $Conf{BackupPCUserVerify} = 1;
305 # Maximum number of hardlinks supported by the $TopDir file system
306 # that BackupPC uses. Most linux or unix file systems should support
307 # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
308 # file already has this number of hardlinks, a new pool file is created
309 # so that new hardlinks can be accommodated. This limit will only
310 # be hit if an identical file appears at least this number of times
311 # across all the backups.
313 $Conf{HardLinkMax} = 31999;
316 # Advanced option for asking BackupPC to load additional perl modules.
317 # Can be a list (array ref) of module names to load at startup.
319 $Conf{PerlModuleLoad} = undef;
322 # Path to init.d script and command to use that script to start the
323 # server from the CGI interface. The following variables are substituted
326 # $sshPath path to ssh ($Conf{SshPath})
327 # $serverHost same as $Conf{ServerHost}
328 # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
332 # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
333 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
334 # . ' $serverInitdPath start'
335 # . ' < /dev/null >& /dev/null';
337 $Conf{ServerInitdPath} = '';
338 $Conf{ServerInitdStartCmd} = '';
341 ###########################################################################
342 # What to backup and when to do it
343 # (can be overridden in the per-PC config.pl)
344 ###########################################################################
346 # Minimum period in days between full backups. A full dump will only be
347 # done if at least this much time has elapsed since the last full dump,
348 # and at least $Conf{IncrPeriod} days has elapsed since the last
351 # Typically this is set slightly less than an integer number of days. The
352 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
353 # will make the actual backup interval a bit longer.
355 $Conf{FullPeriod} = 6.97;
358 # Minimum period in days between incremental backups (a user requested
359 # incremental backup will be done anytime on demand).
361 # Typically this is set slightly less than an integer number of days. The
362 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
363 # will make the actual backup interval a bit longer.
365 $Conf{IncrPeriod} = 0.97;
368 # Number of full backups to keep. Must be >= 1.
370 # In the steady state, each time a full backup completes successfully
371 # the oldest one is removed. If this number is decreased, the
372 # extra old backups will be removed.
374 # If filling of incremental dumps is off the oldest backup always
375 # has to be a full (ie: filled) dump. This might mean one or two
376 # extra full dumps are kept until the oldest incremental backups expire.
378 # Exponential backup expiry is also supported. This allows you to specify:
380 # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
381 # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
382 # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
383 # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
384 # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
386 # and so on. This works by deleting every other full as each expiry
387 # boundary is crossed.
389 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
391 # $Conf{FullKeepCnt} = [4, 2, 3];
393 # Entry #n specifies how many fulls to keep at an interval of
394 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
396 # The example above specifies keeping 4 of the most recent full backups
397 # (1 week interval) two full backups at 2 week intervals, and 3 full
398 # backups at 4 week intervals, eg:
400 # full 0 19 weeks old \
401 # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
402 # full 2 11 weeks old /
403 # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
404 # full 4 5 weeks old /
405 # full 5 3 weeks old \
406 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
407 # full 7 1 week old /
410 # On a given week the spacing might be less than shown as each backup
411 # ages through each expiry period. For example, one week later, a
412 # new full is completed and the oldest is deleted, giving:
414 # full 0 16 weeks old \
415 # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
416 # full 2 8 weeks old /
417 # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
418 # full 4 4 weeks old /
419 # full 5 3 weeks old \
420 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
421 # full 7 1 week old /
424 # You can specify 0 as a count (except in the first entry), and the
425 # array can be as long as you wish. For example:
427 # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
429 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
430 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
431 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
434 # Example: these two settings are equivalent and both keep just
435 # the four most recent full dumps:
437 # $Conf{FullKeepCnt} = 4;
438 # $Conf{FullKeepCnt} = [4];
440 $Conf{FullKeepCnt} = 1;
443 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
444 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
447 # Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
448 # times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
449 # full backups to exceed $Conf{FullAgeMax}.
451 $Conf{FullKeepCntMin} = 1;
452 $Conf{FullAgeMax} = 90;
455 # Number of incremental backups to keep. Must be >= 1.
457 # In the steady state, each time an incr backup completes successfully
458 # the oldest one is removed. If this number is decreased, the
459 # extra old backups will be removed.
461 $Conf{IncrKeepCnt} = 6;
464 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
465 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
466 # matter how old they are.
468 $Conf{IncrKeepCntMin} = 1;
469 $Conf{IncrAgeMax} = 30;
472 # Level of each incremental. "Level" follows the terminology
473 # of dump(1). A full backup has level 0. A new incremental
474 # of level N will backup all files that have changed since
475 # the most recent backup of a lower level.
477 # The entries of $Conf{IncrLevels} apply in order to each
478 # incremental after each full backup. It wraps around until
479 # the next full backup. For example, these two settings
480 # have the same effect:
482 # $Conf{IncrLevels} = [1, 2, 3];
483 # $Conf{IncrLevels} = [1, 2, 3, 1, 2, 3];
485 # This means the 1st and 4th incrementals (level 1) go all
486 # the way back to the full. The 2nd and 3rd (and 5th and
487 # 6th) backups just go back to the immediate preceeding
490 # Specifying a sequence of multi-level incrementals will
491 # usually mean more than $Conf{IncrKeepCnt} incrementals will
492 # need to be kept, since lower level incrementals are needed
493 # to merge a complete view of a backup. For example, with
495 # $Conf{FullPeriod} = 7;
496 # $Conf{IncrPeriod} = 1;
497 # $Conf{IncrKeepCnt} = 6;
498 # $Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
500 # there will be up to 11 incrementals in this case:
502 # backup #0 (full, level 0, oldest)
503 # backup #1 (incr, level 1)
504 # backup #2 (incr, level 2)
505 # backup #3 (incr, level 3)
506 # backup #4 (incr, level 4)
507 # backup #5 (incr, level 5)
508 # backup #6 (incr, level 6)
509 # backup #7 (full, level 0)
510 # backup #8 (incr, level 1)
511 # backup #9 (incr, level 2)
512 # backup #10 (incr, level 3)
513 # backup #11 (incr, level 4)
514 # backup #12 (incr, level 5, newest)
516 # Backup #1 (the oldest level 1 incremental) can't be deleted
517 # since backups 2..6 depend on it. Those 6 incrementals can't
518 # all be deleted since that would only leave 5 (#8..12).
519 # When the next incremental happens (level 6), the complete
520 # set of 6 older incrementals (#1..6) will be deleted, since
521 # that maintains the required number ($Conf{IncrKeepCnt})
522 # of incrementals. This situation is reduced if you set
523 # shorter chains of multi-level incrementals, eg:
525 # $Conf{IncrLevels} = [1, 2, 3];
527 # would only have up to 2 extra incremenals before all 3
530 # BackupPC as usual merges the full and the sequence
531 # of incrementals together so each incremental can be
532 # browsed and restored as though it is a complete backup.
533 # If you specify a long chain of incrementals then more
534 # backups need to be merged when browsing, restoring,
535 # or getting the starting point for rsync backups.
536 # In the example above (levels 1..6), browing backup
537 # #6 requires 7 different backups (#0..6) to be merged.
539 # Because of this merging and the additional incrementals
540 # that need to be kept, it is recommended that some
541 # level 1 incrementals be included in $Conf{IncrLevels}.
543 # Prior to version 3.0 incrementals were always level 1,
544 # meaning each incremental backed up all the files that
545 # changed since the last full.
547 $Conf{IncrLevels} = [1];
550 # Disable all full and incremental backups. These settings are
551 # useful for a client that is no longer being backed up
552 # (eg: a retired machine), but you wish to keep the last
553 # backups available for browsing or restoring to other machines.
555 # There are three values for $Conf{BackupsDisable}:
557 # 0 Backups are enabled.
559 # 1 Don't do any regular backups on this client. Manually
560 # requested backups (via the CGI interface) will still occur.
562 # 2 Don't do any backups on this client. Manually requested
563 # backups (via the CGI interface) will be ignored.
565 # In versions prior to 3.0 Backups were disabled by setting
566 # $Conf{FullPeriod} to -1 or -2.
568 $Conf{BackupsDisable} = 0;
571 # A failed full backup is saved as a partial backup. The rsync
572 # XferMethod can take advantage of the partial full when the next
573 # backup is run. This parameter sets the age of the partial full
574 # in days: if the partial backup is older than this number of
575 # days, then rsync will ignore (not use) the partial full when
576 # the next backup is run. If you set this to a negative value
577 # then no partials will be saved. If you set this to 0, partials
578 # will be saved, but will not be used by the next backup.
580 # The default setting of 3 days means that a partial older than
581 # 3 days is ignored when the next full backup is done.
583 $Conf{PartialAgeMax} = 3;
586 # Whether incremental backups are filled. "Filling" means that the
587 # most recent full (or filled) dump is merged into the new incremental
588 # dump using hardlinks. This makes an incremental dump look like a
589 # full dump. Prior to v1.03 all incremental backups were filled.
590 # In v1.4.0 and later the default is off.
592 # BackupPC, and the cgi interface in particular, do the right thing on
593 # un-filled incremental backups. It will correctly display the merged
594 # incremental backup with the most recent filled backup, giving the
595 # un-filled incremental backups a filled appearance. That means it
596 # invisible to the user whether incremental dumps are filled or not.
598 # Filling backups takes a little extra disk space, and it does cost
599 # some extra disk activity for filling, and later removal. Filling
600 # is no longer useful, since file mangling and compression doesn't
601 # make a filled backup very useful. It's likely the filling option
602 # will be removed from future versions: filling will be delegated to
603 # the display and extraction of backup data.
605 # If filling is off, BackupPC makes sure that the oldest backup is
606 # a full, otherwise the following incremental backups will be
607 # incomplete. This might mean an extra full backup has to be
608 # kept until the following incremental backups expire.
610 # The default is off. You can turn this on or off at any
611 # time without affecting existing backups.
616 # Number of restore logs to keep. BackupPC remembers information about
617 # each restore request. This number per client will be kept around before
618 # the oldest ones are pruned.
620 # Note: files/dirs delivered via Zip or Tar downloads don't count as
621 # restores. Only the first restore option (where the files and dirs
622 # are written to the host) count as restores that are logged.
624 $Conf{RestoreInfoKeepCnt} = 10;
627 # Number of archive logs to keep. BackupPC remembers information
628 # about each archive request. This number per archive client will
629 # be kept around before the oldest ones are pruned.
631 $Conf{ArchiveInfoKeepCnt} = 10;
634 # List of directories or files to backup. If this is defined, only these
635 # directories or files will be backed up.
637 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
638 # can be specified per share. If both are set for a particular share, then
639 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
642 # This can be set to a string, an array of strings, or, in the case
643 # of multiple shares, a hash of strings or arrays. A hash is used
644 # to give a list of directories or files to backup for each share
645 # (the share name is the key). If this is set to just a string or
646 # array, and $Conf{SmbShareName} contains multiple share names, then
647 # the setting is assumed to apply all shares.
649 # If a hash is used, a special key "*" means it applies to all
653 # $Conf{BackupFilesOnly} = '/myFiles';
654 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
655 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
656 # $Conf{BackupFilesOnly} = {
657 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
658 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
660 # $Conf{BackupFilesOnly} = {
661 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
662 # '*' => ['/myFiles', '/important'], # these are other shares
665 $Conf{BackupFilesOnly} = undef;
668 # List of directories or files to exclude from the backup. For Smb,
669 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
670 # can be specified per share. If both are set for a particular share,
671 # then $Conf{BackupFilesOnly} takes precedence and
672 # $Conf{BackupFilesExclude} is ignored.
674 # This can be set to a string, an array of strings, or, in the case
675 # of multiple shares, a hash of strings or arrays. A hash is used
676 # to give a list of directories or files to exclude for each share
677 # (the share name is the key). If this is set to just a string or
678 # array, and $Conf{SmbShareName} contains multiple share names, then
679 # the setting is assumed to apply to all shares.
681 # The exact behavior is determined by the underlying transport program,
682 # smbclient or tar. For smbclient the exlclude file list is passed into
683 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
685 # For tar, if the exclude file contains a "/" it is assumed to be anchored
686 # at the start of the string. Since all the tar paths start with "./",
687 # BackupPC prepends a "." if the exclude file starts with a "/". Note
688 # that GNU tar version >= 1.13.7 is required for the exclude option to
689 # work correctly. For linux or unix machines you should add
690 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
691 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
692 # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
693 # the directory name: a trailing "/" causes the name to not match
694 # and the directory will not be excluded.
696 # Users report that for smbclient you should specify a directory
697 # followed by "/*", eg: "/proc/*", instead of just "/proc".
699 # If a hash is used, a special key "*" means it applies to all
703 # $Conf{BackupFilesExclude} = '/temp';
704 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
705 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
706 # $Conf{BackupFilesExclude} = {
707 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
708 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
710 # $Conf{BackupFilesExclude} = {
711 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
712 # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
715 $Conf{BackupFilesExclude} = undef;
718 # PCs that are always or often on the network can be backed up after
719 # hours, to reduce PC, network and server load during working hours. For
720 # each PC a count of consecutive good pings is maintained. Once a PC has
721 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
722 # to "blackout" and not backed up during hours and days specified by
723 # $Conf{BlackoutPeriods}.
725 # To allow for periodic rebooting of a PC or other brief periods when a
726 # PC is not on the network, a number of consecutive bad pings is allowed
727 # before the good ping count is reset. This parameter is
728 # $Conf{BlackoutBadPingLimit}.
730 # Note that bad and good pings don't occur with the same interval. If a
731 # machine is always on the network, it will only be pinged roughly once
732 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
733 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
734 # machine to be subject to blackout. On the other hand, if a ping is
735 # failed, it will be retried roughly every time BackupPC wakes up, eg,
736 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
737 # 3 means that the PC will lose its blackout status after 3-6 hours of
740 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
741 # value. A value of 0 will make all machines subject to blackout. But
742 # if you don't want to do any backups during the day it would be easier
743 # to just set $Conf{WakeupSchedule} to a restricted schedule.
745 $Conf{BlackoutBadPingLimit} = 3;
746 $Conf{BlackoutGoodCnt} = 7;
749 # One or more blackout periods can be specified. If a client is
750 # subject to blackout then no regular (non-manual) backups will
751 # be started during any of these periods. hourBegin and hourEnd
752 # specify hours fro midnight and weekDays is a list of days of
753 # the week where 0 is Sunday, 1 is Monday etc.
757 # $Conf{BlackoutPeriods} = [
761 # weekDays => [1, 2, 3, 4, 5],
765 # specifies one blackout period from 7:00am to 7:30pm local time
768 # The blackout period can also span midnight by setting
769 # hourBegin > hourEnd, eg:
771 # $Conf{BlackoutPeriods} = [
775 # weekDays => [1, 2, 3, 4, 5],
780 # weekDays => [5, 6],
784 # This specifies one blackout period from 7:00am to 7:30pm local time
785 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
788 $Conf{BlackoutPeriods} = [
792 weekDays => [1, 2, 3, 4, 5],
797 # A backup of a share that has zero files is considered fatal. This is
798 # used to catch miscellaneous Xfer errors that result in no files being
799 # backed up. If you have shares that might be empty (and therefore an
800 # empty backup is valid) you should set this flag to 0.
802 $Conf{BackupZeroFilesIsFatal} = 1;
804 ###########################################################################
805 # How to backup a client
806 # (can be overridden in the per-PC config.pl)
807 ###########################################################################
809 # What transport method to use to backup each host. If you have
810 # a mixed set of WinXX and linux/unix hosts you will need to override
811 # this in the per-PC config.pl.
813 # The valid values are:
815 # - 'smb': backup and restore via smbclient and the SMB protocol.
816 # Easiest choice for WinXX.
818 # - 'rsync': backup and restore via rsync (via rsh or ssh).
819 # Best choice for linux/unix. Good choice also for WinXX.
821 # - 'rsyncd': backup and restore via rsync daemon on the client.
822 # Best choice for linux/unix if you have rsyncd running on
823 # the client. Good choice also for WinXX.
825 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
826 # Good choice for linux/unix.
828 # - 'archive': host is a special archive host. Backups are not done.
829 # An archive host is used to archive other host's backups
830 # to permanent media, such as tape, CDR or DVD.
833 $Conf{XferMethod} = 'smb';
836 # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
837 # will give one line per file, 2 will also show skipped files on
838 # incrementals, higher values give more output.
840 $Conf{XferLogLevel} = 1;
843 # Filename charset encoding on the client. BackupPC uses utf8
844 # on the server for filename encoding. If this is empty, then
845 # utf8 is assumed and client filenames will not be modified.
846 # If set to a different encoding then filenames will converted
847 # to/from utf8 automatically during backup and restore.
849 # If the file names displayed in the browser (eg: accents or special
850 # characters) don't look right then it is likely you haven't set
851 # $Conf{ClientCharset} correctly.
853 # If you are using smbclient on a WinXX machine, smbclient will convert
854 # to the "unix charset" setting in smb.conf. The default is utf8,
855 # in which case leave $Conf{ClientCharset} empty since smbclient does
856 # the right conversion.
858 # If you are using rsync on a WinXX machine then it does no conversion.
859 # A typical WinXX encoding for latin1/western europe is 'cp1252',
860 # so in this case set $Conf{ClientCharset} to 'cp1252'.
862 # On a linux or unix client, run "locale charmap" to see the client's
863 # charset. Set $Conf{ClientCharset} to this value. A typical value
864 # for english/US is 'ISO-8859-1'.
866 # Do "perldoc Encode::Supported" to see the list of possible charset
867 # values. The FAQ at http://www.cl.cam.ac.uk/~mgk25/unicode.html
868 # is excellent, and http://czyborra.com/charsets/iso8859.html
869 # provides more information on the iso-8859 charsets.
871 $Conf{ClientCharset} = '';
874 # Name of the host share that is backed up when using SMB. This can be a
875 # string or an array of strings if there are multiple shares per host.
878 # $Conf{SmbShareName} = 'c'; # backup 'c' share
879 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
881 # This setting only matters if $Conf{XferMethod} = 'smb'.
883 $Conf{SmbShareName} = 'C$';
886 # Smbclient share user name. This is passed to smbclient's -U argument.
888 # This setting only matters if $Conf{XferMethod} = 'smb'.
890 $Conf{SmbShareUserName} = '';
893 # Smbclient share password. This is passed to smbclient via its PASSWD
894 # environment variable. There are several ways you can tell BackupPC
895 # the smb share password. In each case you should be very careful about
896 # security. If you put the password here, make sure that this file is
897 # not readable by regular users! See the "Setting up config.pl" section
898 # in the documentation for more information.
900 # This setting only matters if $Conf{XferMethod} = 'smb'.
902 $Conf{SmbSharePasswd} = '';
905 # Full path for smbclient. Security caution: normal users should not
906 # allowed to write to this file or directory.
908 # smbclient is from the Samba distribution. smbclient is used to
909 # actually extract the incremental or full dump of the share filesystem
912 # This setting only matters if $Conf{XferMethod} = 'smb'.
914 $Conf{SmbClientPath} = '';
917 # Command to run smbclient for a full dump.
918 # This setting only matters if $Conf{XferMethod} = 'smb'.
920 # The following variables are substituted at run-time:
922 # $smbClientPath same as $Conf{SmbClientPath}
923 # $host host to backup/restore
924 # $hostIP host IP address
925 # $shareName share name
926 # $userName user name
927 # $fileList list of files to backup (based on exclude/include)
928 # $I_option optional -I option to smbclient
929 # $X_option exclude option (if $fileList is an exclude list)
930 # $timeStampFile start time for incremental dump
932 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
933 . ' $I_option -U $userName -E -N -d 1'
934 . ' -c tarmode\\ full -Tc$X_option - $fileList';
937 # Command to run smbclient for an incremental dump.
938 # This setting only matters if $Conf{XferMethod} = 'smb'.
940 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
942 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
943 . ' $I_option -U $userName -E -N -d 1'
944 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
947 # Command to run smbclient for a restore.
948 # This setting only matters if $Conf{XferMethod} = 'smb'.
950 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
952 # If your smb share is read-only then direct restores will fail.
953 # You should set $Conf{SmbClientRestoreCmd} to undef and the
954 # corresponding CGI restore option will be removed.
956 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
957 . ' $I_option -U $userName -E -N -d 1'
958 . ' -c tarmode\\ full -Tx -';
961 # Which host directories to backup when using tar transport. This can be a
962 # string or an array of strings if there are multiple directories to
963 # backup per host. Examples:
965 # $Conf{TarShareName} = '/'; # backup everything
966 # $Conf{TarShareName} = '/home'; # only backup /home
967 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
969 # The fact this parameter is called 'TarShareName' is for historical
970 # consistency with the Smb transport options. You can use any valid
971 # directory on the client: there is no need for it to correspond to
972 # any Smb share or device mount point.
974 # Note also that you can also use $Conf{BackupFilesOnly} to specify
975 # a specific list of directories to backup. It's more efficient to
976 # use this option instead of $Conf{TarShareName} since a new tar is
977 # run for each entry in $Conf{TarShareName}.
979 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
980 # you can backup each file system separately, which makes restoring one
981 # bad file system easier. In this case you would list all of the mount
982 # points here, since you can't get the same result with
983 # $Conf{BackupFilesOnly}:
985 # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
987 # This setting only matters if $Conf{XferMethod} = 'tar'.
989 $Conf{TarShareName} = '/';
992 # Full command to run tar on the client. GNU tar is required. You will
993 # need to fill in the correct paths for ssh2 on the local host (server)
994 # and GNU tar on the client. Security caution: normal users should not
995 # allowed to write to these executable files or directories.
997 # See the documentation for more information about setting up ssh2 keys.
999 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
1000 # For example, assuming the client filesystem is mounted below /mnt/hostName,
1001 # you could use something like:
1003 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
1006 # In the case of NFS or rsh you need to make sure BackupPC's privileges
1007 # are sufficient to read all the files you want to backup. Also, you
1008 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
1010 # The following variables are substituted at run-time:
1013 # $hostIP host's IP address
1014 # $incrDate newer-than date for incremental backups
1015 # $shareName share name to backup (ie: top-level directory path)
1016 # $fileList specific files to backup or exclude
1017 # $tarPath same as $Conf{TarClientPath}
1018 # $sshPath same as $Conf{SshPath}
1020 # If a variable is followed by a "+" it is shell escaped. This is
1021 # necessary for the command part of ssh or rsh, since it ends up
1022 # getting passed through the shell.
1024 # This setting only matters if $Conf{XferMethod} = 'tar'.
1026 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
1027 . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
1031 # Extra tar arguments for full backups. Several variables are substituted at
1032 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1034 # If you are running tar locally (ie: without rsh or ssh) then remove the
1035 # "+" so that the argument is no longer shell escaped.
1037 # This setting only matters if $Conf{XferMethod} = 'tar'.
1039 $Conf{TarFullArgs} = '$fileList+';
1042 # Extra tar arguments for incr backups. Several variables are substituted at
1043 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1045 # Note that GNU tar has several methods for specifying incremental backups,
1048 # --newer-mtime $incrDate+
1049 # This causes a file to be included if the modification time is
1050 # later than $incrDate (meaning its contents might have changed).
1051 # But changes in the ownership or modes will not qualify the
1052 # file to be included in an incremental.
1054 # --newer=$incrDate+
1055 # This causes the file to be included if any attribute of the
1056 # file is later than $incrDate, meaning either attributes or
1057 # the modification time. This is the default method. Do
1058 # not use --atime-preserve in $Conf{TarClientCmd} above,
1059 # otherwise resetting the atime (access time) counts as an
1060 # attribute change, meaning the file will always be included
1061 # in each new incremental dump.
1063 # If you are running tar locally (ie: without rsh or ssh) then remove the
1064 # "+" so that the argument is no longer shell escaped.
1066 # This setting only matters if $Conf{XferMethod} = 'tar'.
1068 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
1071 # Full command to run tar for restore on the client. GNU tar is required.
1072 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
1073 # and ssh's -n removed.
1075 # See $Conf{TarClientCmd} for full details.
1077 # This setting only matters if $Conf{XferMethod} = "tar".
1079 # If you want to disable direct restores using tar, you should set
1080 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
1081 # restore option will be removed.
1083 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
1084 . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
1085 . ' -v -f - -C $shareName+';
1088 # Full path for tar on the client. Security caution: normal users should not
1089 # allowed to write to this file or directory.
1091 # This setting only matters if $Conf{XferMethod} = 'tar'.
1093 $Conf{TarClientPath} = '';
1096 # Path to rsync executable on the client
1098 $Conf{RsyncClientPath} = '';
1101 # Full command to run rsync on the client machine. The following variables
1102 # are substituted at run-time:
1104 # $host host name being backed up
1105 # $hostIP host's IP address
1106 # $shareName share name to backup (ie: top-level directory path)
1107 # $rsyncPath same as $Conf{RsyncClientPath}
1108 # $sshPath same as $Conf{SshPath}
1109 # $argList argument list, built from $Conf{RsyncArgs},
1110 # $shareName, $Conf{BackupFilesExclude} and
1111 # $Conf{BackupFilesOnly}
1113 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1115 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1118 # Full command to run rsync for restore on the client. The following
1119 # variables are substituted at run-time:
1121 # $host host name being backed up
1122 # $hostIP host's IP address
1123 # $shareName share name to backup (ie: top-level directory path)
1124 # $rsyncPath same as $Conf{RsyncClientPath}
1125 # $sshPath same as $Conf{SshPath}
1126 # $argList argument list, built from $Conf{RsyncArgs},
1127 # $shareName, $Conf{BackupFilesExclude} and
1128 # $Conf{BackupFilesOnly}
1130 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1132 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1135 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
1136 # be a file system path, eg '/' or '/home'.
1138 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
1139 # to backup (ie: the name from /etc/rsynd.conf).
1141 # This can also be a list of multiple file system paths or modules.
1142 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
1143 # can backup each file system separately, which makes restoring one
1144 # bad file system easier. In this case you would list all of the mount
1147 # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
1149 $Conf{RsyncShareName} = '/';
1152 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
1154 $Conf{RsyncdClientPort} = 873;
1157 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1158 # The user name and password are stored on the client in whatever file
1159 # the "secrets file" parameter in rsyncd.conf points to
1160 # (eg: /etc/rsyncd.secrets).
1162 $Conf{RsyncdUserName} = '';
1165 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1166 # The user name and password are stored on the client in whatever file
1167 # the "secrets file" parameter in rsyncd.conf points to
1168 # (eg: /etc/rsyncd.secrets).
1170 $Conf{RsyncdPasswd} = '';
1173 # Whether authentication is mandatory when connecting to the client's
1174 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
1175 # connect to an rsyncd on the client that is not password protected.
1176 # Turn off at your own risk.
1178 $Conf{RsyncdAuthRequired} = 1;
1181 # When rsync checksum caching is enabled (by adding the
1182 # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
1183 # checksums can be occasionally verified to make sure the file
1184 # contents matches the cached checksums. This is to avoid the
1185 # risk that disk problems might cause the pool file contents to
1186 # get corrupted, but the cached checksums would make BackupPC
1187 # think that the file still matches the client.
1189 # This setting is the probability (0 means never and 1 means always)
1190 # that a file will be rechecked. Setting it to 0 means the checksums
1191 # will not be rechecked (unless there is a phase 0 failure). Setting
1192 # it to 1 (ie: 100%) means all files will be checked, but that is
1193 # not a desirable setting since you are better off simply turning
1194 # caching off (ie: remove the --checksum-seed option).
1196 # The default of 0.01 means 1% (on average) of the files during a full
1197 # backup will have their cached checksum re-checked.
1199 # This setting has no effect unless checksum caching is turned on.
1201 $Conf{RsyncCsumCacheVerifyProb} = 0.01;
1204 # Arguments to rsync for backup. Do not edit the first set unless you
1205 # have a thorough understanding of how File::RsyncP works.
1207 # Examples of additional arguments that should work are --exclude/--include,
1210 # $Conf{RsyncArgs} = [
1211 # # original arguments here
1213 # '--exclude', '/proc',
1214 # '--exclude', '*.tmp',
1217 $Conf{RsyncArgs} = [
1219 # Do not edit these!
1229 '--block-size=2048',
1233 # Rsync >= 2.6.3 supports the --checksum-seed option
1234 # which allows rsync checksum caching on the server.
1235 # Uncomment this to enable rsync checksum caching if
1236 # you have a recent client rsync version and you want
1237 # to enable checksum caching.
1239 #'--checksum-seed=32761',
1242 # Add additional arguments here
1247 # Arguments to rsync for restore. Do not edit the first set unless you
1248 # have a thorough understanding of how File::RsyncP works.
1250 # If you want to disable direct restores using rsync (eg: is the module
1251 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1252 # the corresponding CGI restore option will be removed.
1254 $Conf{RsyncRestoreArgs} = [
1256 # Do not edit these!
1266 '--block-size=2048',
1272 # Rsync >= 2.6.3 supports the --checksum-seed option
1273 # which allows rsync checksum caching on the server.
1274 # Uncomment this to enable rsync checksum caching if
1275 # you have a recent client rsync version and you want
1276 # to enable checksum caching.
1278 #'--checksum-seed=32761',
1281 # Add additional arguments here
1286 # Share name to backup. For $Conf{XferMethod} = "backuppcd" this should
1287 # be a file system path, eg '/' or '/home'.
1289 # This can also be a list of multiple file system paths or modules.
1292 # $Conf{BackupPCdShareName} = ['/', '/var', '/data', '/boot'];
1294 $Conf{BackupPCdShareName} = '/';
1297 # Path to backuppcd executable on the server
1299 $Conf{BackupPCdPath} = '';
1302 # Full command to run backuppcd on the server to backup a given
1303 # client machine. The following variables are substituted at
1304 # run-time (TODO: update this list)
1306 # $host host name being backed up
1307 # $hostIP host's IP address
1308 # $shareName share name to backup (ie: top-level directory path)
1309 # $backuppcdPath same as $Conf{BackupPCdPath}
1310 # $sshPath same as $Conf{SshPath}
1312 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1314 # Arguments to backupcpd are:
1316 # - the host name to backup
1317 # - the share name to backup
1318 # - the directory where the pool is
1319 # - the directory where the last run was (NOT DONE YET)
1320 # - a boolean value indicating whether or not the pool is
1322 # - the directory where the new run should occur (currently it assumes ".")
1324 $Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
1327 # Full command to run backuppcd on the server for restore to a
1328 # client machine. The following variables are substituted at
1329 # run-time (TODO: update this list)
1331 # $host host name being backed up
1332 # $hostIP host's IP address
1333 # $shareName share name to backup (ie: top-level directory path)
1334 # $backuppcdPath same as $Conf{BackupPCdPath}
1335 # $sshPath same as $Conf{SshPath}
1337 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1339 $Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
1343 # Archive Destination
1345 # The Destination of the archive
1346 # e.g. /tmp for file archive or /dev/nst0 for device archive
1348 $Conf{ArchiveDest} = '/tmp';
1351 # Archive Compression type
1353 # The valid values are:
1355 # - 'none': No Compression
1357 # - 'gzip': Medium Compression. Recommended.
1359 # - 'bzip2': High Compression but takes longer.
1361 $Conf{ArchiveComp} = 'gzip';
1364 # Archive Parity Files
1366 # The amount of Parity data to generate, as a percentage
1367 # of the archive size.
1368 # Uses the commandline par2 (par2cmdline) available from
1369 # http://parchive.sourceforge.net
1371 # Only useful for file dumps.
1373 # Set to 0 to disable this feature.
1375 $Conf{ArchivePar} = 0;
1378 # Archive Size Split
1380 # Only for file archives. Splits the output into
1381 # the specified size * 1,000,000.
1382 # e.g. to split into 650,000,000 bytes, specify 650 below.
1384 # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
1385 # device (e.g. a streaming tape drive), this feature is disabled.
1387 $Conf{ArchiveSplit} = 0;
1392 # This is the command that is called to actually run the archive process
1393 # for each host. The following variables are substituted at run-time:
1395 # $Installdir The installation directory of BackupPC
1396 # $tarCreatePath The path to BackupPC_tarCreate
1397 # $splitpath The path to the split program
1398 # $parpath The path to the par2 program
1399 # $host The host to archive
1400 # $backupnumber The backup number of the host to archive
1401 # $compression The path to the compression program
1402 # $compext The extension assigned to the compression type
1403 # $splitsize The number of bytes to split archives into
1404 # $archiveloc The location to put the archive
1405 # $parfile The amount of parity data to create (percentage)
1407 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1408 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1409 . ' $compression $compext $splitsize $archiveloc $parfile *';
1412 # Full path for ssh. Security caution: normal users should not
1413 # allowed to write to this file or directory.
1415 $Conf{SshPath} = '';
1418 # Full path for nmblookup. Security caution: normal users should not
1419 # allowed to write to this file or directory.
1421 # nmblookup is from the Samba distribution. nmblookup is used to get the
1422 # netbios name, necessary for DHCP hosts.
1424 $Conf{NmbLookupPath} = '';
1427 # NmbLookup command. Given an IP address, does an nmblookup on that
1428 # IP address. The following variables are substituted at run-time:
1430 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1433 # This command is only used for DHCP hosts: given an IP address, this
1434 # command should try to find its NetBios name.
1436 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1439 # NmbLookup command. Given a netbios name, finds that host by doing
1440 # a NetBios lookup. Several variables are substituted at run-time:
1442 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1443 # $host NetBios name
1445 # In some cases you might need to change the broadcast address, for
1446 # example if nmblookup uses 192.168.255.255 by default and you find
1447 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1448 # address) using the -B option:
1450 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1452 # If you use a WINS server and your machines don't respond to
1453 # multicast NetBios requests you can use this (replace 1.2.3.4
1454 # with the IP address of your WINS server):
1456 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1458 # This is preferred over multicast since it minimizes network traffic.
1460 # Experiment manually for your site to see what form of nmblookup command
1463 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1466 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1467 # name to ensure it matches the host name. An error is generated if
1468 # they do not match. Typically this flag is off. But if you are going
1469 # to transition a bunch of machines from fixed host addresses to DHCP,
1470 # setting this flag is a great way to verify that the machines have
1471 # their netbios name set correctly before turning on DCHP.
1473 $Conf{FixedIPNetBiosNameCheck} = 0;
1476 # Full path to the ping command. Security caution: normal users
1477 # should not be allowed to write to this file or directory.
1479 # If you want to disable ping checking, set this to some program
1480 # that exits with 0 status, eg:
1482 # $Conf{PingPath} = '/bin/echo';
1484 $Conf{PingPath} = '';
1487 # Ping command. The following variables are substituted at run-time:
1489 # $pingPath path to ping ($Conf{PingPath})
1492 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1493 # exit status (0 even on failure). Replace with "ping $host 1", which
1494 # gets the correct exit status but we don't get the round-trip time.
1496 $Conf{PingCmd} = '$pingPath -c 1 $host';
1499 # Maximum round-trip ping time in milliseconds. This threshold is set
1500 # to avoid backing up PCs that are remotely connected through WAN or
1501 # dialup connections. The output from ping -s (assuming it is supported
1502 # on your system) is used to check the round-trip packet time. On your
1503 # local LAN round-trip times should be much less than 20msec. On most
1504 # WAN or dialup connections the round-trip time will be typically more
1505 # than 20msec. Tune if necessary.
1507 $Conf{PingMaxMsec} = 20;
1510 # Compression level to use on files. 0 means no compression. Compression
1511 # levels can be from 1 (least cpu time, slightly worse compression) to
1512 # 9 (most cpu time, slightly better compression). The recommended value
1513 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
1514 # and will get another 2-3% additional compression. See the zlib
1515 # documentation for more information about compression levels.
1517 # Changing compression on or off after backups have already been done
1518 # will require both compressed and uncompressed pool files to be stored.
1519 # This will increase the pool storage requirements, at least until all
1520 # the old backups expire and are deleted.
1522 # It is ok to change the compression value (from one non-zero value to
1523 # another non-zero value) after dumps are already done. Since BackupPC
1524 # matches pool files by comparing the uncompressed versions, it will still
1525 # correctly match new incoming files against existing pool files. The
1526 # new compression level will take effect only for new files that are
1527 # newly compressed and added to the pool.
1529 # If compression was off and you are enabling compression for the first
1530 # time you can use the BackupPC_compressPool utility to compress the
1531 # pool. This avoids having the pool grow to accommodate both compressed
1532 # and uncompressed backups. See the documentation for more information.
1534 # Note: compression needs the Compress::Zlib perl library. If the
1535 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1536 # forced to 0 (compression off).
1538 $Conf{CompressLevel} = 0;
1541 # Timeout in seconds when listening for the transport program's
1542 # (smbclient, tar etc) stdout. If no output is received during this
1543 # time, then it is assumed that something has wedged during a backup,
1544 # and the backup is terminated.
1546 # Note that stdout buffering combined with huge files being backed up
1547 # could cause longish delays in the output from smbclient that
1548 # BackupPC_dump sees, so in rare cases you might want to increase
1551 # Despite the name, this parameter sets the timeout for all transport
1552 # methods (tar, smb etc).
1554 $Conf{ClientTimeout} = 72000;
1557 # Maximum number of log files we keep around in each PC's directory
1558 # (ie: pc/$host). These files are aged monthly. A setting of 12
1559 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1560 # in the pc/$host directory (ie: about a years worth). (Except this
1561 # month's LOG, these files will have a .z extension if compression
1564 # If you decrease this number after BackupPC has been running for a
1565 # while you will have to manually remove the older log files.
1567 $Conf{MaxOldPerPCLogFiles} = 12;
1570 # Optional commands to run before and after dumps and restores,
1571 # and also before and after each share of a dump.
1573 # Stdout from these commands will be written to the Xfer (or Restore)
1574 # log file. One example of using these commands would be to
1575 # shut down and restart a database server, dump a database
1576 # to files for backup, or doing a snapshot of a share prior
1577 # to a backup. Example:
1579 # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1581 # The following variable substitutions are made at run time for
1582 # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
1583 # and $Conf{DumpPostShareCmd}:
1585 # $type type of dump (incr or full)
1586 # $xferOK 1 if the dump succeeded, 0 if it didn't
1587 # $client client name being backed up
1588 # $host host name (could be different from client name if
1589 # $Conf{ClientNameAlias} is set)
1590 # $hostIP IP address of host
1591 # $user user name from the hosts file
1592 # $moreUsers list of additional users from the hosts file
1593 # $share the first share name (or current share for
1594 # $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
1595 # $shares list of all the share names
1596 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1597 # $sshPath value of $Conf{SshPath},
1598 # $cmdType set to DumpPreUserCmd or DumpPostUserCmd
1600 # The following variable substitutions are made at run time for
1601 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1603 # $client client name being backed up
1604 # $xferOK 1 if the restore succeeded, 0 if it didn't
1605 # $host host name (could be different from client name if
1606 # $Conf{ClientNameAlias} is set)
1607 # $hostIP IP address of host
1608 # $user user name from the hosts file
1609 # $moreUsers list of additional users from the hosts file
1610 # $share the first share name
1611 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1612 # $sshPath value of $Conf{SshPath},
1613 # $type set to "restore"
1614 # $bkupSrcHost host name of the restore source
1615 # $bkupSrcShare share name of the restore source
1616 # $bkupSrcNum backup number of the restore source
1617 # $pathHdrSrc common starting path of restore source
1618 # $pathHdrDest common starting path of destination
1619 # $fileList list of files being restored
1620 # $cmdType set to RestorePreUserCmd or RestorePostUserCmd
1622 # The following variable substitutions are made at run time for
1623 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1625 # $client client name being backed up
1626 # $xferOK 1 if the archive succeeded, 0 if it didn't
1627 # $host Name of the archive host
1628 # $user user name from the hosts file
1629 # $share the first share name
1630 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1631 # $HostList list of hosts being archived
1632 # $BackupList list of backup numbers for the hosts being archived
1633 # $archiveloc location where the archive is sent to
1634 # $parfile amount of parity data being generated (percentage)
1635 # $compression compression program being used (eg: cat, gzip, bzip2)
1636 # $compext extension used for compression type (eg: raw, gz, bz2)
1637 # $splitsize size of the files that the archive creates
1638 # $sshPath value of $Conf{SshPath},
1639 # $type set to "archive"
1640 # $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd
1642 $Conf{DumpPreUserCmd} = undef;
1643 $Conf{DumpPostUserCmd} = undef;
1644 $Conf{DumpPreShareCmd} = undef;
1645 $Conf{DumpPostShareCmd} = undef;
1646 $Conf{RestorePreUserCmd} = undef;
1647 $Conf{RestorePostUserCmd} = undef;
1648 $Conf{ArchivePreUserCmd} = undef;
1649 $Conf{ArchivePostUserCmd} = undef;
1652 # Whether the exit status of each PreUserCmd and
1653 # PostUserCmd is checked.
1655 # If set and the Dump/Restore/Archive Pre/Post UserCmd
1656 # returns a non-zero exit status then the dump/restore/archive
1657 # is aborted. To maintain backward compatibility (where
1658 # the exit status in early versions was always ignored),
1659 # this flag defaults to 0.
1661 # If this flag is set and the Dump/Restore/Archive PreUserCmd
1662 # fails then the matching Dump/Restore/Archive PostUserCmd is
1663 # not executed. If DumpPreShareCmd returns a non-exit status,
1664 # then DumpPostShareCmd is not executed, but the DumpPostUserCmd
1665 # is still run (since DumpPreUserCmd must have previously
1668 # An example of a DumpPreUserCmd that might fail is a script
1669 # that snapshots or dumps a database which fails because
1670 # of some database error.
1672 $Conf{UserCmdCheckStatus} = 0;
1675 # Override the client's host name. This allows multiple clients
1676 # to all refer to the same physical host. This should only be
1677 # set in the per-PC config file and is only used by BackupPC at
1678 # the last moment prior to generating the command used to backup
1679 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1680 # everywhere else in BackupPC). The setting can be a host name or
1683 # $Conf{ClientNameAlias} = 'realHostName';
1684 # $Conf{ClientNameAlias} = '192.1.1.15';
1686 # will cause the relevant smb/tar/rsync backup/restore commands to be
1687 # directed to realHostName, not the client name.
1689 # Note: this setting doesn't work for hosts with DHCP set to 1.
1691 $Conf{ClientNameAlias} = undef;
1693 ###########################################################################
1694 # Email reminders, status and messages
1695 # (can be overridden in the per-PC config.pl)
1696 ###########################################################################
1698 # Full path to the sendmail command. Security caution: normal users
1699 # should not allowed to write to this file or directory.
1701 $Conf{SendmailPath} = '';
1704 # Minimum period between consecutive emails to a single user.
1705 # This tries to keep annoying email to users to a reasonable
1706 # level. Email checks are done nightly, so this number is effectively
1707 # rounded up (ie: 2.5 means a user will never receive email more
1708 # than once every 3 days).
1710 $Conf{EMailNotifyMinDays} = 2.5;
1713 # Name to use as the "from" name for email. Depending upon your mail
1714 # handler this is either a plain name (eg: "admin") or a fully-qualified
1715 # name (eg: "admin@mydomain.com").
1717 $Conf{EMailFromUserName} = '';
1720 # Destination address to an administrative user who will receive a
1721 # nightly email with warnings and errors. If there are no warnings
1722 # or errors then no email will be sent. Depending upon your mail
1723 # handler this is either a plain name (eg: "admin") or a fully-qualified
1724 # name (eg: "admin@mydomain.com").
1726 $Conf{EMailAdminUserName} = '';
1729 # Destination domain name for email sent to users. By default
1730 # this is empty, meaning email is sent to plain, unqualified
1731 # addresses. Otherwise, set it to the destintation domain, eg:
1733 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1735 # With this setting user email will be set to 'user@mydomain.com'.
1737 $Conf{EMailUserDestDomain} = '';
1740 # This subject and message is sent to a user if their PC has never been
1743 # These values are language-dependent. The default versions can be
1744 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1745 # need to change the message, copy it here and edit it, eg:
1747 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1754 # This is a site-specific email message.
1757 $Conf{EMailNoBackupEverSubj} = undef;
1758 $Conf{EMailNoBackupEverMesg} = undef;
1761 # How old the most recent backup has to be before notifying user.
1762 # When there have been no backups in this number of days the user
1765 $Conf{EMailNotifyOldBackupDays} = 7.0;
1768 # This subject and message is sent to a user if their PC has not recently
1769 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1771 # These values are language-dependent. The default versions can be
1772 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1773 # need to change the message, copy it here and edit it, eg:
1775 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1782 # This is a site-specific email message.
1785 $Conf{EMailNoBackupRecentSubj} = undef;
1786 $Conf{EMailNoBackupRecentMesg} = undef;
1789 # How old the most recent backup of Outlook files has to be before
1792 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1795 # This subject and message is sent to a user if their Outlook files have
1796 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1799 # These values are language-dependent. The default versions can be
1800 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1801 # need to change the message, copy it here and edit it, eg:
1803 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1810 # This is a site-specific email message.
1813 $Conf{EMailOutlookBackupSubj} = undef;
1814 $Conf{EMailOutlookBackupMesg} = undef;
1817 # Additional email headers. If you change the charset
1818 # to utf8 then BackupPC_sendEmail will use utf8 for
1821 $Conf{EMailHeaders} = <<EOF;
1823 Content-Type: text/plain; charset="iso-8859-1"
1826 ###########################################################################
1827 # CGI user interface configuration settings
1828 # (can be overridden in the per-PC config.pl)
1829 ###########################################################################
1831 # Normal users can only access information specific to their host.
1832 # They can start/stop/browse/restore backups.
1834 # Administrative users have full access to all hosts, plus overall
1835 # status and log information.
1837 # The administrative users are the union of the unix/linux group
1838 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1839 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1840 # manual list of users set the corresponding configuration setting
1841 # to undef or an empty string.
1843 # If you want every user to have admin privileges (careful!), set
1844 # $Conf{CgiAdminUsers} = '*'.
1847 # $Conf{CgiAdminUserGroup} = 'admin';
1848 # $Conf{CgiAdminUsers} = 'craig celia';
1849 # --> administrative users are the union of group admin, plus
1852 # $Conf{CgiAdminUserGroup} = '';
1853 # $Conf{CgiAdminUsers} = 'craig celia';
1854 # --> administrative users are only craig and celia'.
1856 $Conf{CgiAdminUserGroup} = '';
1857 $Conf{CgiAdminUsers} = '';
1860 # URL of the BackupPC_Admin CGI script. Used for email messages.
1862 $Conf{CgiURL} = undef;
1865 # Language to use. See lib/BackupPC/Lang for the list of supported
1866 # languages, which include English (en), French (fr), Spanish (es),
1867 # German (de), Italian (it), Dutch (nl) and Portuguese Brazillian
1870 # Currently the Language setting applies to the CGI interface and email
1871 # messages sent to users. Log files and other text are still in English.
1873 $Conf{Language} = 'en';
1876 # User names that are rendered by the CGI interface can be turned
1877 # into links into their home page or other information about the
1878 # user. To set this up you need to create two sprintf() strings,
1879 # that each contain a single '%s' that will be replaced by the user
1880 # name. The default is a mailto: link.
1882 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1883 # is used to check (via "-f") that the user has a valid home page.
1884 # Set this to undef or an empty string to turn off this check.
1886 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1887 # user's home page. Set this to undef or an empty string to turn
1888 # off generation of URLs for user names.
1891 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1892 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
1893 # --> if /var/www/html/users/craig.html exists, then 'craig' will
1894 # be rendered as a link to http://myhost/users/craig.html.
1896 $Conf{CgiUserHomePageCheck} = '';
1897 $Conf{CgiUserUrlCreate} = 'mailto:%s';
1900 # Date display format for CGI interface. True for US-style dates (MM/DD)
1901 # and zero for international dates (DD/MM).
1903 $Conf{CgiDateFormatMMDD} = 1;
1906 # If set, the complete list of hosts appears in the left navigation
1907 # bar pull-down for administrators. Otherwise, just the hosts for which
1908 # the user is listed in the host file (as either the user or in moreUsers)
1911 $Conf{CgiNavBarAdminAllHosts} = 1;
1914 # Enable/disable the search box in the navigation bar.
1916 $Conf{CgiSearchBoxEnable} = 1;
1919 # Additional navigation bar links. These appear for both regular users
1920 # and administrators. This is a list of hashes giving the link (URL)
1921 # and the text (name) for the link. Specifying lname instead of name
1922 # uses the language specific string (ie: $Lang->{lname}) instead of
1923 # just literally displaying name.
1925 $Conf{CgiNavBarLinks} = [
1927 link => "?action=view&type=docs",
1928 lname => "Documentation", # actually displays $Lang->{Documentation}
1931 link => "http://backuppc.sourceforge.net/faq",
1932 name => "FAQ", # displays literal "FAQ"
1935 link => "http://backuppc.sourceforge.net",
1936 name => "SourceForge", # displays literal "SourceForge"
1941 # Hilight colors based on status that are used in the PC summary page.
1943 $Conf{CgiStatusHilightColor} = {
1944 Reason_backup_failed => '#ffcccc',
1945 Reason_backup_done => '#ccffcc',
1946 Reason_no_ping => '#ffff99',
1947 Reason_backup_canceled_by_user => '#ff9900',
1948 Status_backup_in_progress => '#66cc99',
1949 Disabled_OnlyManualBackups => '#d1d1d1',
1950 Disabled_AllBackupsDisabled => '#d1d1d1',
1954 # Additional CGI header text.
1956 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1959 # Directory where images are stored. This directory should be below
1960 # Apache's DocumentRoot. This value isn't used by BackupPC but is
1961 # used by configure.pl when you upgrade BackupPC.
1964 # $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1966 $Conf{CgiImageDir} = '';
1969 # Additional mappings of file name extenions to Content-Type for
1970 # individual file restore. See $Ext2ContentType in BackupPC_Admin
1971 # for the default setting. You can add additional settings here,
1972 # or override any default settings. Example:
1974 # $Conf{CgiExt2ContentType} = {
1975 # 'pl' => 'text/plain',
1978 $Conf{CgiExt2ContentType} = { };
1981 # URL (without the leading http://host) for BackupPC's image directory.
1982 # The CGI script uses this value to serve up image files.
1985 # $Conf{CgiImageDirURL} = '/BackupPC';
1987 $Conf{CgiImageDirURL} = '';
1990 # CSS stylesheet "skin" for the CGI interface. It is stored
1991 # in the $Conf{CgiImageDir} directory and accessed via the
1992 # $Conf{CgiImageDirURL} URL.
1994 # For BackupPC v3.x several color, layout and font changes were made.
1995 # The previous v2.x version is available as BackupPC_stnd_orig.css, so
1996 # if you prefer the old skin, change this to BackupPC_stnd_orig.css.
1998 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
2001 # Whether the user is allowed to edit their per-PC config.
2003 $Conf{CgiUserConfigEditEnable} = 1;
2006 # Which per-host config variables a non-admin user is allowed
2007 # to edit. Admin users can edit all per-host config variables,
2008 # even if disabled in this list.
2010 # SECURITY WARNING: Do not let users edit any of the Cmd
2011 # config variables! That's because a user could set a
2012 # Cmd to a shell script of their choice and it will be
2013 # run as the BackupPC user. That script could do all
2014 # sorts of bad things.
2016 $Conf{CgiUserConfigEdit} = {
2020 FullKeepCntMin => 1,
2023 IncrKeepCntMin => 1,
2028 RestoreInfoKeepCnt => 1,
2029 ArchiveInfoKeepCnt => 1,
2030 BackupFilesOnly => 1,
2031 BackupFilesExclude => 1,
2032 BackupsDisable => 1,
2033 BlackoutBadPingLimit => 1,
2034 BlackoutGoodCnt => 1,
2035 BlackoutPeriods => 1,
2036 BackupZeroFilesIsFatal => 1,
2041 SmbShareUserName => 1,
2042 SmbSharePasswd => 1,
2043 SmbClientFullCmd => 0,
2044 SmbClientIncrCmd => 0,
2045 SmbClientRestoreCmd => 0,
2050 TarClientRestoreCmd => 0,
2051 RsyncShareName => 1,
2052 RsyncdClientPort => 1,
2054 RsyncdAuthRequired => 1,
2055 RsyncCsumCacheVerifyProb => 1,
2057 RsyncRestoreArgs => 1,
2058 RsyncClientCmd => 0,
2059 RsyncClientRestoreCmd => 0,
2064 ArchiveClientCmd => 0,
2065 FixedIPNetBiosNameCheck => 1,
2067 NmbLookupFindHostCmd => 0,
2071 MaxOldPerPCLogFiles => 1,
2073 ClientNameAlias => 1,
2074 DumpPreUserCmd => 0,
2075 DumpPostUserCmd => 0,
2076 RestorePreUserCmd => 0,
2077 RestorePostUserCmd => 0,
2078 ArchivePreUserCmd => 0,
2079 ArchivePostUserCmd => 0,
2080 DumpPostShareCmd => 0,
2081 DumpPreShareCmd => 0,
2082 UserCmdCheckStatus => 0,
2083 EMailNotifyMinDays => 1,
2084 EMailFromUserName => 1,
2085 EMailAdminUserName => 1,
2086 EMailUserDestDomain => 1,
2087 EMailNoBackupEverSubj => 1,
2088 EMailNoBackupEverMesg => 1,
2089 EMailNotifyOldBackupDays => 1,
2090 EMailNoBackupRecentSubj => 1,
2091 EMailNoBackupRecentMesg => 1,
2092 EMailNotifyOldOutlookDays => 1,
2093 EMailOutlookBackupSubj => 1,
2094 EMailOutlookBackupMesg => 1,