1 #============================================================= -*-perl-*-
3 # Configuration file for BackupPC.
7 # This is the main configuration file for BackupPC.
9 # This file must be valid perl source, so make sure the punctuation,
10 # quotes, and other syntax are valid.
12 # This file is read by BackupPC at startup, when a HUP (-1) signal
13 # is sent to BackupPC and also at each wakeup time whenever the
14 # modification time of this file changes.
16 # The configuration parameters are divided into four general groups.
17 # The first group (general server configuration) provides general
18 # configuration for BackupPC. The next two groups describe what
19 # to backup, when to do it, and how long to keep it. The fourth
20 # group are settings for the CGI http interface.
22 # Configuration settings can also be specified on a per-PC basis.
23 # Simply put the relevant settings in a config.pl file in the
24 # PC's backup directory (ie: in __TOPDIR__/pc/hostName).
25 # All configuration settings in the second, third and fourth
26 # groups can be overridden by the per-PC config.pl file.
29 # Craig Barratt <cbarratt@users.sourceforge.net>
32 # Copyright (C) 2001-2003 Craig Barratt
34 # See http://backuppc.sourceforge.net.
36 #========================================================================
38 ###########################################################################
39 # General server configuration
40 ###########################################################################
42 # Host name on which the BackupPC server is running.
44 $Conf{ServerHost} = '';
47 # TCP port number on which the BackupPC server listens for and accepts
48 # connections. Normally this should be disabled (set to -1). The TCP
49 # port is only needed if apache runs on a different machine from BackupPC.
50 # In that case, set this to any spare port number over 1024 (eg: 2359).
51 # If you enable the TCP port, make sure you set $Conf{ServerMesgSecret}
54 $Conf{ServerPort} = -1;
57 # Shared secret to make the TCP port secure. Set this to a hard to guess
58 # string if you enable the TCP port (ie: $Conf{ServerPort} > 0).
60 # To avoid possible attacks via the TCP socket interface, every client
61 # message is protected by an MD5 digest. The MD5 digest includes four
63 # - a seed that is sent to the client when the connection opens
64 # - a sequence number that increments for each message
65 # - a shared secret that is stored in $Conf{ServerMesgSecret}
66 # - the message itself.
68 # The message is sent in plain text preceded by the MD5 digest. A
69 # snooper can see the plain-text seed sent by BackupPC and plain-text
70 # message from the client, but cannot construct a valid MD5 digest since
71 # the secret $Conf{ServerMesgSecret} is unknown. A replay attack is
72 # not possible since the seed changes on a per-connection and
75 $Conf{ServerMesgSecret} = '';
78 # PATH setting for BackupPC. An explicit value is necessary
79 # for taint mode. Value shouldn't matter too much since
80 # all execs use explicit paths. However, taint mode in perl
81 # will complain if this directory is world writable.
83 $Conf{MyPath} = '/bin';
86 # Permission mask for directories and files created by BackupPC.
87 # Default value prevents any access from group other, and prevents
90 $Conf{UmaskMode} = 027;
93 # Times at which we wake up, check all the PCs, and schedule necessary
94 # backups. Times are measured in hours since midnight. Can be
95 # fractional if necessary (eg: 4.25 means 4:15am).
97 # If the hosts you are backing up are always connected to the network
98 # you might have only one or two wakeups each night. This will keep
99 # the backup activity after hours. On the other hand, if you are backing
100 # up laptops that are only intermittently connected to the network you
101 # will want to have frequent wakeups (eg: hourly) to maximized the chance
102 # that each laptop is backed up.
105 # $Conf{WakeupSchedule} = [22.5]; # once per day at 10:30 pm.
106 # $Conf{WakeupSchedule} = [1..23]; # every hour except midnight
107 # $Conf{WakeupSchedule} = [2,4,6,8,10,12,14,16,18,20,22]; # every 2 hours
109 # The default value is every hour except midnight.
111 # The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly
112 # is run. No other backups can run while BackupPC_nightly is
113 # running. You might want to re-arrange the entries in
114 # $Conf{WakeupSchedule} (they don't have to be ascending) so that
115 # the first entry is when you want BackupPC_nightly to run
116 # (eg: when you don't expect a lot of regular backups to run).
118 $Conf{WakeupSchedule} = [1..23];
121 # Maximum number of simultaneous backups to run. If there
122 # are no user backup requests then this is the maximum number
123 # of simultaneous backups.
125 $Conf{MaxBackups} = 4;
128 # Additional number of simultaneous backups that users can run.
129 # As many as $Conf{MaxBackups} + $Conf{MaxUserBackups} requests can
130 # run at the same time.
132 $Conf{MaxUserBackups} = 4;
135 # Maximum number of pending link commands. New backups will only be
136 # started if there are no more than $Conf{MaxPendingCmds} plus
137 # $Conf{MaxBackups} number of pending link commands, plus running jobs.
138 # This limit is to make sure BackupPC doesn't fall too far behind in
139 # running BackupPC_link commands.
141 $Conf{MaxPendingCmds} = 10;
144 # How many BackupPC_nightly processes to run in parallel.
146 # Each night, at the first wakeup listed in $Conf{WakeupSchedule},
147 # BackupPC_nightly is run. Its job is to remove unneeded files
148 # in the pool, ie: files that only have one link. To avoid race
149 # conditions, BackupPC_nightly runs only when there are no backups
150 # running, and no backups will start while it runs.
152 # So to reduce the elapsed time, you might want to increase this
153 # setting to run several BackupPC_nightly processes in parallel
154 # (eg: 4, or even 8).
156 $Conf{MaxBackupPCNightlyJobs} = 2;
159 # How many days (runs) it takes BackupPC_nightly to traverse the
160 # entire pool. Normally this is 1, which means every night it runs,
161 # it does traverse the entire pool removing unused pool files.
163 # Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
164 # traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
165 # takes 2, 4, 8 or 16 days to completely traverse the pool. The
166 # advantage is that each night the running time of BackupPC_nightly
167 # is reduced roughly in proportion, since the total job is split
168 # over multiple days. The disadvantage is that unused pool files
169 # take longer to get deleted, which will slightly increase disk
172 # Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly
173 # still runs every night. It just does less work each time it runs.
177 # $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night
179 # $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check
180 # # (different half each night)
182 # $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check
183 # # (different quarter each night)
185 $Conf{BackupPCNightlyPeriod} = 1;
188 # Maximum number of log files we keep around in log directory.
189 # These files are aged nightly. A setting of 14 means the log
190 # directory will contain about 2 weeks of old log files, in
191 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
192 # (except today's LOG, these files will have a .z extension if
193 # compression is on).
195 # If you decrease this number after BackupPC has been running for a
196 # while you will have to manually remove the older log files.
198 $Conf{MaxOldLogFiles} = 14;
201 # Full path to the df command. Security caution: normal users
202 # should not allowed to write to this file or directory.
204 $Conf{DfPath} = '/bin/df';
207 # Command to run df. The following variables are substituted at run-time:
209 # $dfPath path to df ($Conf{DfPath})
210 # $topDir top-level BackupPC data directory
212 $Conf{DfCmd} = '$dfPath $topDir';
215 # Full path to various commands for archiving
218 $Conf{SplitPath} = '/usr/bin/split';
219 $Conf{ParPath} = '/usr/bin/par2';
220 $Conf{CatPath} = '/bin/cat';
221 $Conf{GzipPath} = '/bin/gzip';
222 $Conf{Bzip2Path} = '/usr/bin/bzip2';
225 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
226 # If the output from $Conf{DfPath} reports a percentage larger than
227 # this number then no new regularly scheduled backups will be run.
228 # However, user requested backups (which are usually incremental and
229 # tend to be small) are still performed, independent of disk usage.
230 # Also, currently running backups will not be terminated when the disk
231 # usage exceeds this number.
233 $Conf{DfMaxUsagePct} = 95;
236 # How long BackupPC_trashClean sleeps in seconds between each check
237 # of the trash directory. Once every 5 minutes should be reasonable.
239 $Conf{TrashCleanSleepSec} = 300;
242 # List of DHCP address ranges we search looking for PCs to backup.
243 # This is an array of hashes for each class C address range.
244 # This is only needed if hosts in the conf/hosts file have the
248 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
249 # $Conf{DHCPAddressRanges} = [
251 # ipAddrBase => '192.10.10',
256 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
257 # $Conf{DHCPAddressRanges} = [
259 # ipAddrBase => '192.10.10',
264 # ipAddrBase => '192.10.11',
270 $Conf{DHCPAddressRanges} = [];
275 $Conf{BackupPCUser} = '';
278 # Important installation directories:
280 # TopDir - where all the backup data is stored
281 # ConfDir - where the main config and hosts files resides
282 # LogDir - where log files and other transient information
283 # InstallDir - where the bin, lib and doc installation dirs reside.
284 # Note: you cannot change this value since all the
285 # perl scripts include this path. You must reinstall
286 # with configure.pl to change InstallDir.
287 # CgiDir - Apache CGI directory for BackupPC_Admin
292 $Conf{InstallDir} = '';
296 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
297 # are really running as user $Conf{BackupPCUser}. If this flag is set
298 # and the effective user id (euid) differs from $Conf{BackupPCUser}
299 # then both scripts exit with an error. This catches cases where
300 # BackupPC might be accidently started as root or the wrong user,
301 # or if the CGI script is not installed correctly.
303 $Conf{BackupPCUserVerify} = 1;
306 # Maximum number of hardlinks supported by the $TopDir file system
307 # that BackupPC uses. Most linux or unix file systems should support
308 # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
309 # file already has this number of hardlinks, a new pool file is created
310 # so that new hardlinks can be accommodated. This limit will only
311 # be hit if an identical file appears at least this number of times
312 # across all the backups.
314 $Conf{HardLinkMax} = 31999;
317 # Advanced option for asking BackupPC to load additional perl modules.
318 # Can be a list (array ref) of module names to load at startup.
320 $Conf{PerlModuleLoad} = undef;
323 # Path to init.d script and command to use that script to start the
324 # server from the CGI interface. The following variables are substituted
327 # $sshPath path to ssh ($Conf{SshPath})
328 # $serverHost same as $Conf{ServerHost}
329 # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
333 # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
334 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
335 # . ' $serverInitdPath start'
336 # . ' < /dev/null >& /dev/null';
338 $Conf{ServerInitdPath} = '';
339 $Conf{ServerInitdStartCmd} = '';
342 ###########################################################################
343 # What to backup and when to do it
344 # (can be overridden in the per-PC config.pl)
345 ###########################################################################
347 # Minimum period in days between full backups. A full dump will only be
348 # done if at least this much time has elapsed since the last full dump,
349 # and at least $Conf{IncrPeriod} days has elapsed since the last
352 # Typically this is set slightly less than an integer number of days. The
353 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
354 # will make the actual backup interval a bit longer.
356 # There are two special values for $Conf{FullPeriod}:
358 # -1 Don't do any regular backups on this machine. Manually
359 # requested backups (via the CGI interface) will still occur.
361 # -2 Don't do any backups on this machine. Manually requested
362 # backups (via the CGI interface) will be ignored.
364 # These special settings are useful for a client that is no longer
365 # being backed up (eg: a retired machine), but you wish to keep the
366 # last backups available for browsing or restoring to other machines.
368 $Conf{FullPeriod} = 6.97;
371 # Minimum period in days between incremental backups (a user requested
372 # incremental backup will be done anytime on demand).
374 # Typically this is set slightly less than an integer number of days. The
375 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
376 # will make the actual backup interval a bit longer.
378 $Conf{IncrPeriod} = 0.97;
381 # Number of full backups to keep. Must be >= 1.
383 # In the steady state, each time a full backup completes successfully
384 # the oldest one is removed. If this number is decreased, the
385 # extra old backups will be removed.
387 # If filling of incremental dumps is off the oldest backup always
388 # has to be a full (ie: filled) dump. This might mean one or two
389 # extra full dumps are kept until the oldest incremental backups expire.
391 # Exponential backup expiry is also supported. This allows you to specify:
393 # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
394 # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
395 # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
396 # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
397 # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
399 # and so on. This works by deleting every other full as each expiry
400 # boundary is crossed.
402 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
404 # $Conf{FullKeepCnt} = [4, 2, 3];
406 # Entry #n specifies how many fulls to keep at an interval of
407 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
409 # The example above specifies keeping 4 of the most recent full backups
410 # (1 week interval) two full backups at 2 week intervals, and 3 full
411 # backups at 4 week intervals, eg:
413 # full 0 19 weeks old \
414 # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
415 # full 2 11 weeks old /
416 # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
417 # full 4 5 weeks old /
418 # full 5 3 weeks old \
419 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
420 # full 7 1 week old /
423 # On a given week the spacing might be less than shown as each backup
424 # ages through each expiry period. For example, one week later, a
425 # new full is completed and the oldest is deleted, giving:
427 # full 0 16 weeks old \
428 # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
429 # full 2 8 weeks old /
430 # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
431 # full 4 4 weeks old /
432 # full 5 3 weeks old \
433 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
434 # full 7 1 week old /
437 # You can specify 0 as a count (except in the first entry), and the
438 # array can be as long as you wish. For example:
440 # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
442 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
443 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
444 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
447 # Example: these two settings are equivalent and both keep just
448 # the four most recent full dumps:
450 # $Conf{FullKeepCnt} = 4;
451 # $Conf{FullKeepCnt} = [4];
453 $Conf{FullKeepCnt} = 1;
456 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
457 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
460 # Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
461 # times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
462 # full backups to exceed $Conf{FullAgeMax}.
464 $Conf{FullKeepCntMin} = 1;
465 $Conf{FullAgeMax} = 90;
468 # Number of incremental backups to keep. Must be >= 1.
470 # In the steady state, each time an incr backup completes successfully
471 # the oldest one is removed. If this number is decreased, the
472 # extra old backups will be removed.
474 $Conf{IncrKeepCnt} = 6;
477 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
478 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
479 # matter how old they are.
481 $Conf{IncrKeepCntMin} = 1;
482 $Conf{IncrAgeMax} = 30;
485 # A failed full backup is saved as a partial backup. The rsync
486 # XferMethod can take advantage of the partial full when the next
487 # backup is run. This parameter sets the age of the partial full
488 # in days: if the partial backup is older than this number of
489 # days, then rsync will ignore (not use) the partial full when
490 # the next backup is run. If you set this to a negative value
491 # then no partials will be saved. If you set this to 0, partials
492 # will be saved, but will not be used by the next backup.
494 # The default setting of 3 days means that a partial older than
495 # 3 days is ignored when the next full backup is done.
497 $Conf{PartialAgeMax} = 3;
500 # Whether incremental backups are filled. "Filling" means that the
501 # most recent full (or filled) dump is merged into the new incremental
502 # dump using hardlinks. This makes an incremental dump look like a
503 # full dump. Prior to v1.03 all incremental backups were filled.
504 # In v1.4.0 and later the default is off.
506 # BackupPC, and the cgi interface in particular, do the right thing on
507 # un-filled incremental backups. It will correctly display the merged
508 # incremental backup with the most recent filled backup, giving the
509 # un-filled incremental backups a filled appearance. That means it
510 # invisible to the user whether incremental dumps are filled or not.
512 # Filling backups takes a little extra disk space, and it does cost
513 # some extra disk activity for filling, and later removal. Filling
514 # is no longer useful, since file mangling and compression doesn't
515 # make a filled backup very useful. It's likely the filling option
516 # will be removed from future versions: filling will be delegated to
517 # the display and extraction of backup data.
519 # If filling is off, BackupPC makes sure that the oldest backup is
520 # a full, otherwise the following incremental backups will be
521 # incomplete. This might mean an extra full backup has to be
522 # kept until the following incremental backups expire.
524 # The default is off. You can turn this on or off at any
525 # time without affecting existing backups.
530 # Number of restore logs to keep. BackupPC remembers information about
531 # each restore request. This number per client will be kept around before
532 # the oldest ones are pruned.
534 # Note: files/dirs delivered via Zip or Tar downloads don't count as
535 # restores. Only the first restore option (where the files and dirs
536 # are written to the host) count as restores that are logged.
538 $Conf{RestoreInfoKeepCnt} = 10;
541 # Number of archive logs to keep. BackupPC remembers information
542 # about each archive request. This number per archive client will
543 # be kept around before the oldest ones are pruned.
545 $Conf{ArchiveInfoKeepCnt} = 10;
548 # List of directories or files to backup. If this is defined, only these
549 # directories or files will be backed up.
551 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
552 # can be specified per share. If both are set for a particular share, then
553 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
556 # This can be set to a string, an array of strings, or, in the case
557 # of multiple shares, a hash of strings or arrays. A hash is used
558 # to give a list of directories or files to backup for each share
559 # (the share name is the key). If this is set to just a string or
560 # array, and $Conf{SmbShareName} contains multiple share names, then
561 # the setting is assumed to apply all shares.
563 # If a hash is used, a special key "*" means it applies to all
567 # $Conf{BackupFilesOnly} = '/myFiles';
568 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
569 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
570 # $Conf{BackupFilesOnly} = {
571 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
572 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
574 # $Conf{BackupFilesOnly} = {
575 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
576 # '*' => ['/myFiles', '/important'], # these are other shares
579 $Conf{BackupFilesOnly} = undef;
582 # List of directories or files to exclude from the backup. For Smb,
583 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
584 # can be specified per share. If both are set for a particular share,
585 # then $Conf{BackupFilesOnly} takes precedence and
586 # $Conf{BackupFilesExclude} is ignored.
588 # This can be set to a string, an array of strings, or, in the case
589 # of multiple shares, a hash of strings or arrays. A hash is used
590 # to give a list of directories or files to exclude for each share
591 # (the share name is the key). If this is set to just a string or
592 # array, and $Conf{SmbShareName} contains multiple share names, then
593 # the setting is assumed to apply to all shares.
595 # The exact behavior is determined by the underlying transport program,
596 # smbclient or tar. For smbclient the exlclude file list is passed into
597 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
599 # For tar, if the exclude file contains a "/" it is assumed to be anchored
600 # at the start of the string. Since all the tar paths start with "./",
601 # BackupPC prepends a "." if the exclude file starts with a "/". Note
602 # that GNU tar version >= 1.13.7 is required for the exclude option to
603 # work correctly. For linux or unix machines you should add
604 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
605 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
606 # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
607 # the directory name: a trailing "/" causes the name to not match
608 # and the directory will not be excluded.
610 # Users report that for smbclient you should specify a directory
611 # followed by "/*", eg: "/proc/*", instead of just "/proc".
613 # If a hash is used, a special key "*" means it applies to all
617 # $Conf{BackupFilesExclude} = '/temp';
618 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
619 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
620 # $Conf{BackupFilesExclude} = {
621 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
622 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
624 # $Conf{BackupFilesExclude} = {
625 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
626 # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
629 $Conf{BackupFilesExclude} = undef;
632 # PCs that are always or often on the network can be backed up after
633 # hours, to reduce PC, network and server load during working hours. For
634 # each PC a count of consecutive good pings is maintained. Once a PC has
635 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
636 # to "blackout" and not backed up during hours and days specified by
637 # $Conf{BlackoutPeriods}.
639 # To allow for periodic rebooting of a PC or other brief periods when a
640 # PC is not on the network, a number of consecutive bad pings is allowed
641 # before the good ping count is reset. This parameter is
642 # $Conf{BlackoutBadPingLimit}.
644 # Note that bad and good pings don't occur with the same interval. If a
645 # machine is always on the network, it will only be pinged roughly once
646 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
647 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
648 # machine to be subject to blackout. On the other hand, if a ping is
649 # failed, it will be retried roughly every time BackupPC wakes up, eg,
650 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
651 # 3 means that the PC will lose its blackout status after 3-6 hours of
654 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
655 # value. A value of 0 will make all machines subject to blackout. But
656 # if you don't want to do any backups during the day it would be easier
657 # to just set $Conf{WakeupSchedule} to a restricted schedule.
659 $Conf{BlackoutBadPingLimit} = 3;
660 $Conf{BlackoutGoodCnt} = 7;
663 # One or more blackout periods can be specified. If a client is
664 # subject to blackout then no regular (non-manual) backups will
665 # be started during any of these periods. hourBegin and hourEnd
666 # specify hours fro midnight and weekDays is a list of days of
667 # the week where 0 is Sunday, 1 is Monday etc.
671 # $Conf{BlackoutPeriods} = [
675 # weekDays => [1, 2, 3, 4, 5],
679 # specifies one blackout period from 7:00am to 7:30pm local time
682 # The blackout period can also span midnight by setting
683 # hourBegin > hourEnd, eg:
685 # $Conf{BlackoutPeriods} = [
689 # weekDays => [1, 2, 3, 4, 5],
694 # weekDays => [5, 6],
698 # This specifies one blackout period from 7:00am to 7:30pm local time
699 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
702 $Conf{BlackoutPeriods} = [
706 weekDays => [1, 2, 3, 4, 5],
711 # A backup of a share that has zero files is considered fatal. This is
712 # used to catch miscellaneous Xfer errors that result in no files being
713 # backed up. If you have shares that might be empty (and therefore an
714 # empty backup is valid) you should set this flag to 0.
716 $Conf{BackupZeroFilesIsFatal} = 1;
718 ###########################################################################
719 # How to backup a client
720 # (can be overridden in the per-PC config.pl)
721 ###########################################################################
723 # What transport method to use to backup each host. If you have
724 # a mixed set of WinXX and linux/unix hosts you will need to override
725 # this in the per-PC config.pl.
727 # The valid values are:
729 # - 'smb': backup and restore via smbclient and the SMB protocol.
730 # Easiest choice for WinXX.
732 # - 'rsync': backup and restore via rsync (via rsh or ssh).
733 # Best choice for linux/unix. Good choice also for WinXX.
735 # - 'rsyncd': backup and restore via rsync daemon on the client.
736 # Best choice for linux/unix if you have rsyncd running on
737 # the client. Good choice also for WinXX.
739 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
740 # Good choice for linux/unix.
742 # - 'archive': host is a special archive host. Backups are not done.
743 # An archive host is used to archive other host's backups
744 # to permanent media, such as tape, CDR or DVD.
747 $Conf{XferMethod} = 'smb';
750 # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
751 # will give one line per file, 2 will also show skipped files on
752 # incrementals, higher values give more output.
754 $Conf{XferLogLevel} = 1;
757 # Filename charset encoding on the client. BackupPC uses utf8
758 # on the server for filename encoding. If this is empty, then
759 # utf8 is assumed and client filenames will not be modified. If set
760 # to a different encoding then filenames will be re-encoded in utf8.
761 # A typical WinXX encoding for latin1/western europe is 'cp1252'.
762 # Do "perldoc Encode::Supported" to see the list of possible charset
763 # values, and also see http://czyborra.com/charsets/iso8859.html.
765 $Conf{ClientCharset} = '';
768 # Name of the host share that is backed up when using SMB. This can be a
769 # string or an array of strings if there are multiple shares per host.
772 # $Conf{SmbShareName} = 'c'; # backup 'c' share
773 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
775 # This setting only matters if $Conf{XferMethod} = 'smb'.
777 $Conf{SmbShareName} = 'C$';
780 # Smbclient share user name. This is passed to smbclient's -U argument.
782 # This setting only matters if $Conf{XferMethod} = 'smb'.
784 $Conf{SmbShareUserName} = '';
787 # Smbclient share password. This is passed to smbclient via its PASSWD
788 # environment variable. There are several ways you can tell BackupPC
789 # the smb share password. In each case you should be very careful about
790 # security. If you put the password here, make sure that this file is
791 # not readable by regular users! See the "Setting up config.pl" section
792 # in the documentation for more information.
794 # This setting only matters if $Conf{XferMethod} = 'smb'.
796 $Conf{SmbSharePasswd} = '';
799 # Full path for smbclient. Security caution: normal users should not
800 # allowed to write to this file or directory.
802 # smbclient is from the Samba distribution. smbclient is used to
803 # actually extract the incremental or full dump of the share filesystem
806 # This setting only matters if $Conf{XferMethod} = 'smb'.
808 $Conf{SmbClientPath} = '/usr/bin/smbclient';
811 # Command to run smbclient for a full dump.
812 # This setting only matters if $Conf{XferMethod} = 'smb'.
814 # The following variables are substituted at run-time:
816 # $smbClientPath same as $Conf{SmbClientPath}
817 # $host host to backup/restore
818 # $hostIP host IP address
819 # $shareName share name
820 # $userName user name
821 # $fileList list of files to backup (based on exclude/include)
822 # $I_option optional -I option to smbclient
823 # $X_option exclude option (if $fileList is an exclude list)
824 # $timeStampFile start time for incremental dump
826 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
827 . ' $I_option -U $userName -E -N -d 1'
828 . ' -c tarmode\\ full -Tc$X_option - $fileList';
831 # Command to run smbclient for an incremental dump.
832 # This setting only matters if $Conf{XferMethod} = 'smb'.
834 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
836 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
837 . ' $I_option -U $userName -E -N -d 1'
838 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
841 # Command to run smbclient for a restore.
842 # This setting only matters if $Conf{XferMethod} = 'smb'.
844 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
846 # If your smb share is read-only then direct restores will fail.
847 # You should set $Conf{SmbClientRestoreCmd} to undef and the
848 # corresponding CGI restore option will be removed.
850 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
851 . ' $I_option -U $userName -E -N -d 1'
852 . ' -c tarmode\\ full -Tx -';
855 # Which host directories to backup when using tar transport. This can be a
856 # string or an array of strings if there are multiple directories to
857 # backup per host. Examples:
859 # $Conf{TarShareName} = '/'; # backup everything
860 # $Conf{TarShareName} = '/home'; # only backup /home
861 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
863 # The fact this parameter is called 'TarShareName' is for historical
864 # consistency with the Smb transport options. You can use any valid
865 # directory on the client: there is no need for it to correspond to
866 # any Smb share or device mount point.
868 # Note also that you can also use $Conf{BackupFilesOnly} to specify
869 # a specific list of directories to backup. It's more efficient to
870 # use this option instead of $Conf{TarShareName} since a new tar is
871 # run for each entry in $Conf{TarShareName}.
873 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
874 # you can backup each file system separately, which makes restoring one
875 # bad file system easier. In this case you would list all of the mount
876 # points here, since you can't get the same result with
877 # $Conf{BackupFilesOnly}:
879 # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
881 # This setting only matters if $Conf{XferMethod} = 'tar'.
883 $Conf{TarShareName} = '/';
886 # Full command to run tar on the client. GNU tar is required. You will
887 # need to fill in the correct paths for ssh2 on the local host (server)
888 # and GNU tar on the client. Security caution: normal users should not
889 # allowed to write to these executable files or directories.
891 # See the documentation for more information about setting up ssh2 keys.
893 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
894 # For example, assuming the client filesystem is mounted below /mnt/hostName,
895 # you could use something like:
897 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
900 # In the case of NFS or rsh you need to make sure BackupPC's privileges
901 # are sufficient to read all the files you want to backup. Also, you
902 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
904 # The following variables are substituted at run-time:
907 # $hostIP host's IP address
908 # $incrDate newer-than date for incremental backups
909 # $shareName share name to backup (ie: top-level directory path)
910 # $fileList specific files to backup or exclude
911 # $tarPath same as $Conf{TarClientPath}
912 # $sshPath same as $Conf{SshPath}
914 # If a variable is followed by a "+" it is shell escaped. This is
915 # necessary for the command part of ssh or rsh, since it ends up
916 # getting passed through the shell.
918 # This setting only matters if $Conf{XferMethod} = 'tar'.
920 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
921 . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
925 # Extra tar arguments for full backups. Several variables are substituted at
926 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
928 # If you are running tar locally (ie: without rsh or ssh) then remove the
929 # "+" so that the argument is no longer shell escaped.
931 # This setting only matters if $Conf{XferMethod} = 'tar'.
933 $Conf{TarFullArgs} = '$fileList+';
936 # Extra tar arguments for incr backups. Several variables are substituted at
937 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
939 # Note that GNU tar has several methods for specifying incremental backups,
942 # --newer-mtime $incrDate+
943 # This causes a file to be included if the modification time is
944 # later than $incrDate (meaning its contents might have changed).
945 # But changes in the ownership or modes will not qualify the
946 # file to be included in an incremental.
949 # This causes the file to be included if any attribute of the
950 # file is later than $incrDate, meaning either attributes or
951 # the modification time. This is the default method. Do
952 # not use --atime-preserve in $Conf{TarClientCmd} above,
953 # otherwise resetting the atime (access time) counts as an
954 # attribute change, meaning the file will always be included
955 # in each new incremental dump.
957 # If you are running tar locally (ie: without rsh or ssh) then remove the
958 # "+" so that the argument is no longer shell escaped.
960 # This setting only matters if $Conf{XferMethod} = 'tar'.
962 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
965 # Full command to run tar for restore on the client. GNU tar is required.
966 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
967 # and ssh's -n removed.
969 # See $Conf{TarClientCmd} for full details.
971 # This setting only matters if $Conf{XferMethod} = "tar".
973 # If you want to disable direct restores using tar, you should set
974 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
975 # restore option will be removed.
977 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
978 . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
979 . ' -v -f - -C $shareName+';
982 # Full path for tar on the client. Security caution: normal users should not
983 # allowed to write to this file or directory.
985 # This setting only matters if $Conf{XferMethod} = 'tar'.
987 $Conf{TarClientPath} = '/bin/tar';
990 # Path to rsync executable on the client
992 $Conf{RsyncClientPath} = '/bin/rsync';
995 # Full command to run rsync on the client machine. The following variables
996 # are substituted at run-time:
998 # $host host name being backed up
999 # $hostIP host's IP address
1000 # $shareName share name to backup (ie: top-level directory path)
1001 # $rsyncPath same as $Conf{RsyncClientPath}
1002 # $sshPath same as $Conf{SshPath}
1003 # $argList argument list, built from $Conf{RsyncArgs},
1004 # $shareName, $Conf{BackupFilesExclude} and
1005 # $Conf{BackupFilesOnly}
1007 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1009 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1012 # Full command to run rsync for restore on the client. The following
1013 # variables are substituted at run-time:
1015 # $host host name being backed up
1016 # $hostIP host's IP address
1017 # $shareName share name to backup (ie: top-level directory path)
1018 # $rsyncPath same as $Conf{RsyncClientPath}
1019 # $sshPath same as $Conf{SshPath}
1020 # $argList argument list, built from $Conf{RsyncArgs},
1021 # $shareName, $Conf{BackupFilesExclude} and
1022 # $Conf{BackupFilesOnly}
1024 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1026 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1029 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
1030 # be a file system path, eg '/' or '/home'.
1032 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
1033 # to backup (ie: the name from /etc/rsynd.conf).
1035 # This can also be a list of multiple file system paths or modules.
1036 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
1037 # can backup each file system separately, which makes restoring one
1038 # bad file system easier. In this case you would list all of the mount
1041 # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
1043 $Conf{RsyncShareName} = '/';
1046 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
1048 $Conf{RsyncdClientPort} = 873;
1051 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1052 # The user name and password are stored on the client in whatever file
1053 # the "secrets file" parameter in rsyncd.conf points to
1054 # (eg: /etc/rsyncd.secrets).
1056 $Conf{RsyncdUserName} = '';
1059 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1060 # The user name and password are stored on the client in whatever file
1061 # the "secrets file" parameter in rsyncd.conf points to
1062 # (eg: /etc/rsyncd.secrets).
1064 $Conf{RsyncdPasswd} = '';
1067 # Whether authentication is mandatory when connecting to the client's
1068 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
1069 # connect to an rsyncd on the client that is not password protected.
1070 # Turn off at your own risk.
1072 $Conf{RsyncdAuthRequired} = 1;
1075 # When rsync checksum caching is enabled (by adding the
1076 # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
1077 # checksums can be occaisonally verified to make sure the file
1078 # contents matches the cached checksums. This is to avoid the
1079 # risk that disk problems might cause the pool file contents to
1080 # get corrupted, but the cached checksums would make BackupPC
1081 # think that the file still matches the client.
1083 # This setting is the probability (0 means never and 1 means always)
1084 # that a file will be rechecked. Setting it to 0 means the checksums
1085 # will not be rechecked (unless there is a phase 0 failure). Setting
1086 # it to 1 (ie: 100%) means all files will be checked, but that is
1087 # not a desirable setting since you are better off simply turning
1088 # caching off (ie: remove the --checksum-seed option).
1090 # The default of 0.01 means 1% (on average) of the files during a full
1091 # backup will have their cached checksum re-checked.
1093 # This setting has no effect unless checksum caching is turned on.
1095 $Conf{RsyncCsumCacheVerifyProb} = 0.01;
1098 # Arguments to rsync for backup. Do not edit the first set unless you
1099 # have a thorough understanding of how File::RsyncP works.
1101 # Examples of additional arguments that should work are --exclude/--include,
1104 # $Conf{RsyncArgs} = [
1105 # # original arguments here
1107 # '--exclude', '/proc',
1108 # '--exclude', '*.tmp',
1111 $Conf{RsyncArgs} = [
1113 # Do not edit these!
1122 '--block-size=2048',
1126 # If you are using a patched client rsync that supports the
1127 # --checksum-seed option (see http://backuppc.sourceforge.net),
1128 # then uncomment this to enabled rsync checksum cachcing
1130 #'--checksum-seed=32761',
1133 # Add additional arguments here
1138 # Arguments to rsync for restore. Do not edit the first set unless you
1139 # have a thorough understanding of how File::RsyncP works.
1141 # If you want to disable direct restores using rsync (eg: is the module
1142 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1143 # the corresponding CGI restore option will be removed.
1145 $Conf{RsyncRestoreArgs} = [
1147 # Do not edit these!
1156 '--block-size=2048',
1162 # If you are using a patched client rsync that supports the
1163 # --checksum-seed option (see http://backuppc.sourceforge.net),
1164 # then uncomment this to enabled rsync checksum cachcing
1166 #'--checksum-seed=32761',
1169 # Add additional arguments here
1174 # Share name to backup. For $Conf{XferMethod} = "backuppcd" this should
1175 # be a file system path, eg '/' or '/home'.
1177 # This can also be a list of multiple file system paths or modules.
1180 # $Conf{BackupPCdShareName} = ['/', '/var', '/data', '/boot'];
1182 $Conf{BackupPCdShareName} = '/';
1185 # Path to backuppcd executable on the server
1187 $Conf{BackupPCdPath} = '/usr/bin/backuppcd';
1190 # Full command to run backuppcd on the server to backup a given
1191 # client machine. The following variables are substituted at
1192 # run-time (TODO: update this list)
1194 # $host host name being backed up
1195 # $hostIP host's IP address
1196 # $shareName share name to backup (ie: top-level directory path)
1197 # $backuppcdPath same as $Conf{BackupPCdPath}
1198 # $sshPath same as $Conf{SshPath}
1200 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1202 # Arguments to backupcpd are:
1204 # - the host name to backup
1205 # - the share name to backup
1206 # - the directory where the pool is
1207 # - the directory where the last run was (NOT DONE YET)
1208 # - a boolean value indicating whether or not the pool is
1210 # - the directory where the new run should occur (currently it assumes ".")
1212 $Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
1215 # Full command to run backuppcd on the server for restore to a
1216 # client machine. The following variables are substituted at
1217 # run-time (TODO: update this list)
1219 # $host host name being backed up
1220 # $hostIP host's IP address
1221 # $shareName share name to backup (ie: top-level directory path)
1222 # $backuppcdPath same as $Conf{BackupPCdPath}
1223 # $sshPath same as $Conf{SshPath}
1225 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1227 $Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
1231 # Archive Destination
1233 # The Destination of the archive
1234 # e.g. /tmp for file archive or /dev/nst0 for device archive
1236 $Conf{ArchiveDest} = '/tmp';
1239 # Archive Compression type
1241 # The valid values are:
1243 # - 'none': No Compression
1245 # - 'gzip': Medium Compression. Recommended.
1247 # - 'bzip2': High Compression but takes longer.
1249 $Conf{ArchiveComp} = 'gzip';
1252 # Archive Parity Files
1254 # The amount of Parity data to generate, as a percentage
1255 # of the archive size.
1256 # Uses the commandline par2 (par2cmdline) available from
1257 # http://parchive.sourceforge.net
1259 # Only useful for file dumps.
1261 # Set to 0 to disable this feature.
1263 $Conf{ArchivePar} = 0;
1266 # Archive Size Split
1268 # Only for file archives. Splits the output into
1269 # the specified size * 1,000,000.
1270 # e.g. to split into 650,000,000 bytes, specify 650 below.
1272 # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
1273 # device (e.g. a streaming tape drive), this feature is disabled.
1275 $Conf{ArchiveSplit} = 0;
1280 # This is the command that is called to actually run the archive process
1281 # for each host. The following variables are substituted at run-time:
1283 # $Installdir The installation directory of BackupPC
1284 # $tarCreatePath The path to BackupPC_tarCreate
1285 # $splitpath The path to the split program
1286 # $parpath The path to the par2 program
1287 # $host The host to archive
1288 # $backupnumber The backup number of the host to archive
1289 # $compression The path to the compression program
1290 # $compext The extension assigned to the compression type
1291 # $splitsize The number of bytes to split archives into
1292 # $archiveloc The location to put the archive
1293 # $parfile The amount of parity data to create (percentage)
1295 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1296 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1297 . ' $compression $compext $splitsize $archiveloc $parfile *';
1300 # Full path for ssh. Security caution: normal users should not
1301 # allowed to write to this file or directory.
1303 $Conf{SshPath} = '/usr/bin/ssh';
1306 # Full path for nmblookup. Security caution: normal users should not
1307 # allowed to write to this file or directory.
1309 # nmblookup is from the Samba distribution. nmblookup is used to get the
1310 # netbios name, necessary for DHCP hosts.
1312 $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
1315 # NmbLookup command. Given an IP address, does an nmblookup on that
1316 # IP address. The following variables are substituted at run-time:
1318 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1321 # This command is only used for DHCP hosts: given an IP address, this
1322 # command should try to find its NetBios name.
1324 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1327 # NmbLookup command. Given a netbios name, finds that host by doing
1328 # a NetBios lookup. Several variables are substituted at run-time:
1330 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1331 # $host NetBios name
1333 # In some cases you might need to change the broadcast address, for
1334 # example if nmblookup uses 192.168.255.255 by default and you find
1335 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1336 # address) using the -B option:
1338 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1340 # If you use a WINS server and your machines don't respond to
1341 # multicast NetBios requests you can use this (replace 1.2.3.4
1342 # with the IP address of your WINS server):
1344 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1346 # This is preferred over multicast since it minimizes network traffic.
1348 # Experiment manually for your site to see what form of nmblookup command
1351 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1354 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1355 # name to ensure it matches the host name. An error is generated if
1356 # they do not match. Typically this flag is off. But if you are going
1357 # to transition a bunch of machines from fixed host addresses to DHCP,
1358 # setting this flag is a great way to verify that the machines have
1359 # their netbios name set correctly before turning on DCHP.
1361 $Conf{FixedIPNetBiosNameCheck} = 0;
1364 # Full path to the ping command. Security caution: normal users
1365 # should not be allowed to write to this file or directory.
1367 # If you want to disable ping checking, set this to some program
1368 # that exits with 0 status, eg:
1370 # $Conf{PingPath} = '/bin/echo';
1372 $Conf{PingPath} = '/bin/ping';
1375 # Ping command. The following variables are substituted at run-time:
1377 # $pingPath path to ping ($Conf{PingPath})
1380 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1381 # exit status (0 even on failure). Replace with "ping $host 1", which
1382 # gets the correct exit status but we don't get the round-trip time.
1384 $Conf{PingCmd} = '$pingPath -c 1 $host';
1387 # Maximum round-trip ping time in milliseconds. This threshold is set
1388 # to avoid backing up PCs that are remotely connected through WAN or
1389 # dialup connections. The output from ping -s (assuming it is supported
1390 # on your system) is used to check the round-trip packet time. On your
1391 # local LAN round-trip times should be much less than 20msec. On most
1392 # WAN or dialup connections the round-trip time will be typically more
1393 # than 20msec. Tune if necessary.
1395 $Conf{PingMaxMsec} = 20;
1398 # Compression level to use on files. 0 means no compression. Compression
1399 # levels can be from 1 (least cpu time, slightly worse compression) to
1400 # 9 (most cpu time, slightly better compression). The recommended value
1401 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
1402 # and will get another 2-3% additional compression. See the zlib
1403 # documentation for more information about compression levels.
1405 # Changing compression on or off after backups have already been done
1406 # will require both compressed and uncompressed pool files to be stored.
1407 # This will increase the pool storage requirements, at least until all
1408 # the old backups expire and are deleted.
1410 # It is ok to change the compression value (from one non-zero value to
1411 # another non-zero value) after dumps are already done. Since BackupPC
1412 # matches pool files by comparing the uncompressed versions, it will still
1413 # correctly match new incoming files against existing pool files. The
1414 # new compression level will take effect only for new files that are
1415 # newly compressed and added to the pool.
1417 # If compression was off and you are enabling compression for the first
1418 # time you can use the BackupPC_compressPool utility to compress the
1419 # pool. This avoids having the pool grow to accommodate both compressed
1420 # and uncompressed backups. See the documentation for more information.
1422 # Note: compression needs the Compress::Zlib perl library. If the
1423 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1424 # forced to 0 (compression off).
1426 $Conf{CompressLevel} = 0;
1429 # Timeout in seconds when listening for the transport program's
1430 # (smbclient, tar etc) stdout. If no output is received during this
1431 # time, then it is assumed that something has wedged during a backup,
1432 # and the backup is terminated.
1434 # Note that stdout buffering combined with huge files being backed up
1435 # could cause longish delays in the output from smbclient that
1436 # BackupPC_dump sees, so in rare cases you might want to increase
1439 # Despite the name, this parameter sets the timeout for all transport
1440 # methods (tar, smb etc).
1442 $Conf{ClientTimeout} = 72000;
1445 # Maximum number of log files we keep around in each PC's directory
1446 # (ie: pc/$host). These files are aged monthly. A setting of 12
1447 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1448 # in the pc/$host directory (ie: about a years worth). (Except this
1449 # month's LOG, these files will have a .z extension if compression
1452 # If you decrease this number after BackupPC has been running for a
1453 # while you will have to manually remove the older log files.
1455 $Conf{MaxOldPerPCLogFiles} = 12;
1458 # Optional commands to run before and after dumps and restores,
1459 # and also before and after each share of a dump.
1461 # Stdout from these commands will be written to the Xfer (or Restore)
1462 # log file. One example of using these commands would be to
1463 # shut down and restart a database server, dump a database
1464 # to files for backup, or doing a snapshot of a share prior
1465 # to a backup. Example:
1467 # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1469 # The following variable substitutions are made at run time for
1470 # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
1471 # and $Conf{DumpPostShareCmd}:
1473 # $type type of dump (incr or full)
1474 # $xferOK 1 if the dump succeeded, 0 if it didn't
1475 # $client client name being backed up
1476 # $host host name (could be different from client name if
1477 # $Conf{ClientNameAlias} is set)
1478 # $hostIP IP address of host
1479 # $user user name from the hosts file
1480 # $moreUsers list of additional users from the hosts file
1481 # $share the first share name (or current share for
1482 # $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
1483 # $shares list of all the share names
1484 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1485 # $sshPath value of $Conf{SshPath},
1486 # $cmdType set to DumpPreUserCmd or DumpPostUserCmd
1488 # The following variable substitutions are made at run time for
1489 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1491 # $client client name being backed up
1492 # $xferOK 1 if the restore succeeded, 0 if it didn't
1493 # $host host name (could be different from client name if
1494 # $Conf{ClientNameAlias} is set)
1495 # $hostIP IP address of host
1496 # $user user name from the hosts file
1497 # $moreUsers list of additional users from the hosts file
1498 # $share the first share name
1499 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1500 # $sshPath value of $Conf{SshPath},
1501 # $type set to "restore"
1502 # $bkupSrcHost host name of the restore source
1503 # $bkupSrcShare share name of the restore source
1504 # $bkupSrcNum backup number of the restore source
1505 # $pathHdrSrc common starting path of restore source
1506 # $pathHdrDest common starting path of destination
1507 # $fileList list of files being restored
1508 # $cmdType set to RestorePreUserCmd or RestorePostUserCmd
1510 # The following variable substitutions are made at run time for
1511 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1513 # $client client name being backed up
1514 # $xferOK 1 if the archive succeeded, 0 if it didn't
1515 # $host Name of the archive host
1516 # $user user name from the hosts file
1517 # $share the first share name
1518 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1519 # $HostList list of hosts being archived
1520 # $BackupList list of backup numbers for the hosts being archived
1521 # $archiveloc location where the archive is sent to
1522 # $parfile amount of parity data being generated (percentage)
1523 # $compression compression program being used (eg: cat, gzip, bzip2)
1524 # $compext extension used for compression type (eg: raw, gz, bz2)
1525 # $splitsize size of the files that the archive creates
1526 # $sshPath value of $Conf{SshPath},
1527 # $type set to "archive"
1528 # $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd
1530 $Conf{DumpPreUserCmd} = undef;
1531 $Conf{DumpPostUserCmd} = undef;
1532 $Conf{DumpPreShareCmd} = undef;
1533 $Conf{DumpPostShareCmd} = undef;
1534 $Conf{RestorePreUserCmd} = undef;
1535 $Conf{RestorePostUserCmd} = undef;
1536 $Conf{ArchivePreUserCmd} = undef;
1537 $Conf{ArchivePostUserCmd} = undef;
1540 # Override the client's host name. This allows multiple clients
1541 # to all refer to the same physical host. This should only be
1542 # set in the per-PC config file and is only used by BackupPC at
1543 # the last moment prior to generating the command used to backup
1544 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1545 # everywhere else in BackupPC). The setting can be a host name or
1548 # $Conf{ClientNameAlias} = 'realHostName';
1549 # $Conf{ClientNameAlias} = '192.1.1.15';
1551 # will cause the relevant smb/tar/rsync backup/restore commands to be
1552 # directed to realHostName, not the client name.
1554 # Note: this setting doesn't work for hosts with DHCP set to 1.
1556 $Conf{ClientNameAlias} = undef;
1558 ###########################################################################
1559 # Email reminders, status and messages
1560 # (can be overridden in the per-PC config.pl)
1561 ###########################################################################
1563 # Full path to the sendmail command. Security caution: normal users
1564 # should not allowed to write to this file or directory.
1566 $Conf{SendmailPath} = '/usr/sbin/sendmail';
1569 # Minimum period between consecutive emails to a single user.
1570 # This tries to keep annoying email to users to a reasonable
1571 # level. Email checks are done nightly, so this number is effectively
1572 # rounded up (ie: 2.5 means a user will never receive email more
1573 # than once every 3 days).
1575 $Conf{EMailNotifyMinDays} = 2.5;
1578 # Name to use as the "from" name for email. Depending upon your mail
1579 # handler this is either a plain name (eg: "admin") or a fully-qualified
1580 # name (eg: "admin@mydomain.com").
1582 $Conf{EMailFromUserName} = '';
1585 # Destination address to an administrative user who will receive a
1586 # nightly email with warnings and errors. If there are no warnings
1587 # or errors then no email will be sent. Depending upon your mail
1588 # handler this is either a plain name (eg: "admin") or a fully-qualified
1589 # name (eg: "admin@mydomain.com").
1591 $Conf{EMailAdminUserName} = '';
1594 # Destination domain name for email sent to users. By default
1595 # this is empty, meaning email is sent to plain, unqualified
1596 # addresses. Otherwise, set it to the destintation domain, eg:
1598 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1600 # With this setting user email will be set to 'user@mydomain.com'.
1602 $Conf{EMailUserDestDomain} = '';
1605 # This subject and message is sent to a user if their PC has never been
1608 # These values are language-dependent. The default versions can be
1609 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1610 # need to change the message, copy it here and edit it, eg:
1612 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1619 # This is a site-specific email message.
1622 $Conf{EMailNoBackupEverSubj} = undef;
1623 $Conf{EMailNoBackupEverMesg} = undef;
1626 # How old the most recent backup has to be before notifying user.
1627 # When there have been no backups in this number of days the user
1630 $Conf{EMailNotifyOldBackupDays} = 7.0;
1633 # This subject and message is sent to a user if their PC has not recently
1634 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1636 # These values are language-dependent. The default versions can be
1637 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1638 # need to change the message, copy it here and edit it, eg:
1640 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1647 # This is a site-specific email message.
1650 $Conf{EMailNoBackupRecentSubj} = undef;
1651 $Conf{EMailNoBackupRecentMesg} = undef;
1654 # How old the most recent backup of Outlook files has to be before
1657 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1660 # This subject and message is sent to a user if their Outlook files have
1661 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1664 # These values are language-dependent. The default versions can be
1665 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1666 # need to change the message, copy it here and edit it, eg:
1668 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1675 # This is a site-specific email message.
1678 $Conf{EMailOutlookBackupSubj} = undef;
1679 $Conf{EMailOutlookBackupMesg} = undef;
1682 # Additional email headers
1684 $Conf{EMailHeaders} = <<EOF;
1686 Content-Type: text/plain; charset="iso-8859-1"
1689 ###########################################################################
1690 # CGI user interface configuration settings
1691 # (can be overridden in the per-PC config.pl)
1692 ###########################################################################
1694 # Normal users can only access information specific to their host.
1695 # They can start/stop/browse/restore backups.
1697 # Administrative users have full access to all hosts, plus overall
1698 # status and log information.
1700 # The administrative users are the union of the unix/linux group
1701 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1702 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1703 # manual list of users set the corresponding configuration setting
1704 # to undef or an empty string.
1706 # If you want every user to have admin privileges (careful!), set
1707 # $Conf{CgiAdminUsers} = '*'.
1710 # $Conf{CgiAdminUserGroup} = 'admin';
1711 # $Conf{CgiAdminUsers} = 'craig celia';
1712 # --> administrative users are the union of group admin, plus
1715 # $Conf{CgiAdminUserGroup} = '';
1716 # $Conf{CgiAdminUsers} = 'craig celia';
1717 # --> administrative users are only craig and celia'.
1719 $Conf{CgiAdminUserGroup} = '';
1720 $Conf{CgiAdminUsers} = '';
1723 # URL of the BackupPC_Admin CGI script. Used for email messages.
1725 $Conf{CgiURL} = undef;
1728 # Language to use. See lib/BackupPC/Lang for the list of supported
1729 # languages, which include English (en), French (fr), Spanish (es),
1730 # German (de), Italian (it), Dutch (nl) and Portuguese Brazillian
1733 # Currently the Language setting applies to the CGI interface and email
1734 # messages sent to users. Log files and other text are still in English.
1736 $Conf{Language} = 'en';
1739 # User names that are rendered by the CGI interface can be turned
1740 # into links into their home page or other information about the
1741 # user. To set this up you need to create two sprintf() strings,
1742 # that each contain a single '%s' that will be replaced by the user
1743 # name. The default is a mailto: link.
1745 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1746 # is used to check (via "-f") that the user has a valid home page.
1747 # Set this to undef or an empty string to turn off this check.
1749 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1750 # user's home page. Set this to undef or an empty string to turn
1751 # off generation of URLs for user names.
1754 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1755 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
1756 # --> if /var/www/html/users/craig.html exists, then 'craig' will
1757 # be rendered as a link to http://myhost/users/craig.html.
1759 $Conf{CgiUserHomePageCheck} = '';
1760 $Conf{CgiUserUrlCreate} = 'mailto:%s';
1763 # Date display format for CGI interface. True for US-style dates (MM/DD)
1764 # and zero for international dates (DD/MM).
1766 $Conf{CgiDateFormatMMDD} = 1;
1769 # If set, the complete list of hosts appears in the left navigation
1770 # bar pull-down for administrators. Otherwise, just the hosts for which
1771 # the user is listed in the host file (as either the user or in moreUsers)
1774 $Conf{CgiNavBarAdminAllHosts} = 1;
1777 # Enable/disable the search box in the navigation bar.
1779 $Conf{CgiSearchBoxEnable} = 1;
1782 # Additional navigation bar links. These appear for both regular users
1783 # and administrators. This is a list of hashes giving the link (URL)
1784 # and the text (name) for the link. Specifying lname instead of name
1785 # uses the language specific string (ie: $Lang->{lname}) instead of
1786 # just literally displaying name.
1788 $Conf{CgiNavBarLinks} = [
1790 link => "?action=view&type=docs",
1791 lname => "Documentation", # actually displays $Lang->{Documentation}
1794 link => "http://backuppc.sourceforge.net/faq",
1795 name => "FAQ", # displays literal "FAQ"
1798 link => "http://backuppc.sourceforge.net",
1799 name => "SourceForge", # displays literal "SourceForge"
1804 # Hilight colors based on status that are used in the PC summary page.
1806 $Conf{CgiStatusHilightColor} = {
1807 Reason_backup_failed => '#ffcccc',
1808 Reason_backup_done => '#ccffcc',
1809 Reason_no_ping => '#ffff99',
1810 Reason_backup_canceled_by_user => '#ff9900',
1811 Status_backup_in_progress => '#66cc99',
1815 # Additional CGI header text.
1817 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1820 # Directory where images are stored. This directory should be below
1821 # Apache's DocumentRoot. This value isn't used by BackupPC but is
1822 # used by configure.pl when you upgrade BackupPC.
1825 # $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1827 $Conf{CgiImageDir} = '';
1830 # Additional mappings of file name extenions to Content-Type for
1831 # individual file restore. See $Ext2ContentType in BackupPC_Admin
1832 # for the default setting. You can add additional settings here,
1833 # or override any default settings. Example:
1835 # $Conf{CgiExt2ContentType} = {
1836 # 'pl' => 'text/plain',
1839 $Conf{CgiExt2ContentType} = { };
1842 # URL (without the leading http://host) for BackupPC's image directory.
1843 # The CGI script uses this value to serve up image files.
1846 # $Conf{CgiImageDirURL} = '/BackupPC';
1848 $Conf{CgiImageDirURL} = '';
1851 # CSS stylesheet for the CGI interface. It is stored in the
1852 # $Conf{CgiImageDir} directory and accessed via the
1853 # $Conf{CgiImageDirURL} URL.
1855 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
1858 # Whether the user is allowed to edit their per-PC config.
1860 $Conf{CgiUserConfigEditEnable} = 1;
1863 # Which per-host config variables a non-admin user is allowed
1864 # to edit. Admin users can edit all per-host config variables,
1865 # even if disabled in this list.
1867 # SECURITY WARNING: Do not let users edit any of the Cmd
1868 # config variables! That's because a user could set a
1869 # Cmd to a shell script of their choice and it will be
1870 # run as the BackupPC user. That script could do all
1871 # sorts of bad things.
1873 $Conf{CgiUserConfigEdit} = {
1877 FullKeepCntMin => 1,
1880 IncrKeepCntMin => 1,
1884 RestoreInfoKeepCnt => 1,
1885 ArchiveInfoKeepCnt => 1,
1886 BackupFilesOnly => 1,
1887 BackupFilesExclude => 1,
1888 BlackoutBadPingLimit => 1,
1889 BlackoutGoodCnt => 1,
1890 BlackoutPeriods => 1,
1891 BackupZeroFilesIsFatal => 1,
1896 SmbShareUserName => 1,
1897 SmbSharePasswd => 1,
1898 SmbClientFullCmd => 0,
1899 SmbClientIncrCmd => 0,
1900 SmbClientRestoreCmd => 0,
1905 TarClientRestoreCmd => 0,
1906 RsyncShareName => 1,
1907 RsyncdClientPort => 1,
1909 RsyncdAuthRequired => 1,
1910 RsyncCsumCacheVerifyProb => 1,
1912 RsyncRestoreArgs => 1,
1913 RsyncClientCmd => 0,
1914 RsyncClientRestoreCmd => 0,
1919 ArchiveClientCmd => 0,
1920 FixedIPNetBiosNameCheck => 1,
1922 NmbLookupFindHostCmd => 0,
1926 MaxOldPerPCLogFiles => 1,
1928 ClientNameAlias => 1,
1929 DumpPreUserCmd => 0,
1930 DumpPostUserCmd => 0,
1931 RestorePreUserCmd => 0,
1932 RestorePostUserCmd => 0,
1933 ArchivePreUserCmd => 0,
1934 ArchivePostUserCmd => 0,
1935 DumpPostShareCmd => 0,
1936 DumpPreShareCmd => 0,
1937 EMailNotifyMinDays => 1,
1938 EMailFromUserName => 1,
1939 EMailAdminUserName => 1,
1940 EMailUserDestDomain => 1,
1941 EMailNoBackupEverSubj => 1,
1942 EMailNoBackupEverMesg => 1,
1943 EMailNotifyOldBackupDays => 1,
1944 EMailNoBackupRecentSubj => 1,
1945 EMailNoBackupRecentMesg => 1,
1946 EMailNotifyOldOutlookDays => 1,
1947 EMailOutlookBackupSubj => 1,
1948 EMailOutlookBackupMesg => 1,