58991e158df65a3d7fcc112ba093d1f447532dde
[BackupPC.git] / conf / config.pl
1 #============================================================= -*-perl-*-
2 #
3 # Configuration file for BackupPC.
4 #
5 # DESCRIPTION
6 #
7 #   This is the main configuration file for BackupPC.
8 #
9 #   This file must be valid perl source, so make sure the punctuation,
10 #   quotes, and other syntax are valid.
11 #
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.
15 #
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.
21 #
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.
27 #
28 # AUTHOR
29 #   Craig Barratt  <cbarratt@users.sourceforge.net>
30 #
31 # COPYRIGHT
32 #   Copyright (C) 2001-2003  Craig Barratt
33 #
34 #   See http://backuppc.sourceforge.net.
35 #
36 #========================================================================
37
38 ###########################################################################
39 # General server configuration
40 ###########################################################################
41 #
42 # Host name on which the BackupPC server is running.
43 #
44 $Conf{ServerHost} = '';
45
46 #
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}
52 # too!
53 #
54 $Conf{ServerPort} = -1;
55
56 #
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).
59 #
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
62 # items:
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.
67 #
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
73 # per-message basis.
74 #
75 $Conf{ServerMesgSecret} = '';
76
77 #
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.
82 #
83 $Conf{MyPath} = '/bin';
84
85 #
86 # Permission mask for directories and files created by BackupPC.
87 # Default value prevents any access from group other, and prevents
88 # group write.
89 #
90 $Conf{UmaskMode} = 027;
91
92 #
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).
96 #
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.
103 #
104 # Examples:
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
108 #
109 # The default value is every hour except midnight.
110 #
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).
117 #
118 $Conf{WakeupSchedule} = [1..23];
119
120 #
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.
124 #
125 $Conf{MaxBackups} = 4;
126
127 #
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.
131 #
132 $Conf{MaxUserBackups} = 4;
133
134 #
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.
140 #
141 $Conf{MaxPendingCmds} = 10;
142
143 #
144 # Maximum number of log files we keep around in log directory.
145 # These files are aged nightly.  A setting of 14 means the log
146 # directory will contain about 2 weeks of old log files, in
147 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
148 # (except today's LOG, these files will have a .z extension if
149 # compression is on).
150 #
151 # If you decrease this number after BackupPC has been running for a
152 # while you will have to manually remove the older log files.
153 #
154 $Conf{MaxOldLogFiles} = 14;
155
156 #
157 # Full path to the df command.  Security caution: normal users
158 # should not allowed to write to this file or directory.
159 #
160 $Conf{DfPath} = '/bin/df';
161
162 #
163 # Command to run df.  The following variables are substituted at run-time:
164 #
165 #   $dfPath      path to df ($Conf{DfPath})
166 #   $topDir      top-level BackupPC data directory
167 #
168 $Conf{DfCmd} = '$dfPath $topDir';
169
170 #
171 # Full path to various commands for archiving
172 #
173
174 $Conf{SplitPath} = '/usr/bin/split';
175 $Conf{ParPath}   = '/usr/bin/par';
176 $Conf{CatPath}   = '/bin/cat';
177 $Conf{GzipPath}  = '/bin/gzip';
178 $Conf{Bzip2Path} = '/usr/bin/bzip2';
179
180 #
181 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
182 # If the output from $Conf{DfPath} reports a percentage larger than
183 # this number then no new regularly scheduled backups will be run.
184 # However, user requested backups (which are usually incremental and
185 # tend to be small) are still performed, independent of disk usage.
186 # Also, currently running backups will not be terminated when the disk
187 # usage exceeds this number.
188 #
189 $Conf{DfMaxUsagePct} = 95;
190
191 #
192 # How long BackupPC_trashClean sleeps in seconds between each check
193 # of the trash directory.  Once every 5 minutes should be reasonable.
194 #
195 $Conf{TrashCleanSleepSec} = 300;
196
197 #
198 # List of DHCP address ranges we search looking for PCs to backup.
199 # This is an array of hashes for each class C address range.
200 # This is only needed if hosts in the conf/hosts file have the
201 # dhcp flag set.
202 #
203 # Examples:
204 #    # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
205 #    $Conf{DHCPAddressRanges} = [
206 #        {
207 #            ipAddrBase => '192.10.10',
208 #            first => 20,
209 #            last  => 250,
210 #        },
211 #    ];
212 #    # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
213 #    $Conf{DHCPAddressRanges} = [
214 #        {
215 #            ipAddrBase => '192.10.10',
216 #            first => 20,
217 #            last  => 250,
218 #        },
219 #        {
220 #            ipAddrBase => '192.10.11',
221 #            first => 10,
222 #            last  => 50,
223 #        },
224 #    ];
225 #
226 $Conf{DHCPAddressRanges} = [];
227
228 #
229 # These configuration settings aren't used by BackupPC, but simply
230 # remember a few settings used by configure.pl during installation.
231 # These are used by configure.pl when upgrading to new versions of
232 # BackupPC.
233 #
234 $Conf{BackupPCUser} = '';
235 $Conf{CgiDir}       = '';
236 $Conf{InstallDir}   = '';
237
238 #
239 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
240 # are really running as user $Conf{BackupPCUser}.  If this flag is set
241 # and the effective user id (euid) differs from $Conf{BackupPCUser}
242 # then both scripts exit with an error.  This catches cases where
243 # BackupPC might be accidently started as root or the wrong user,
244 # or if the CGI script is not installed correctly.
245 #
246 $Conf{BackupPCUserVerify} = 1;
247
248 #
249 # Maximum number of hardlinks supported by the $TopDir file system
250 # that BackupPC uses.  Most linux or unix file systems should support
251 # at least 32000 hardlinks per file, or 64000 in other cases.  If a pool
252 # file already has this number of hardlinks, a new pool file is created
253 # so that new hardlinks can be accommodated.  This limit will only
254 # be hit if an identical file appears at least this number of times
255 # across all the backups.
256 #
257 $Conf{HardLinkMax} = 31999;
258
259 ###########################################################################
260 # What to backup and when to do it
261 # (can be overridden in the per-PC config.pl)
262 ###########################################################################
263 #
264 # Name of the host share that is backed up when using SMB.  This can be a
265 # string or an array of strings if there are multiple shares per host.
266 # Examples:
267 #
268 #   $Conf{SmbShareName} = 'c';          # backup 'c' share
269 #   $Conf{SmbShareName} = ['c', 'd'];   # backup 'c' and 'd' shares
270 #
271 # This setting only matters if $Conf{XferMethod} = 'smb'.
272 #
273 $Conf{SmbShareName} = 'C$';
274
275 #
276 # Smbclient share user name.  This is passed to smbclient's -U argument.
277 #
278 # This setting only matters if $Conf{XferMethod} = 'smb'.
279 #
280 $Conf{SmbShareUserName} = '';
281
282 #
283 # Smbclient share password.  This is passed to smbclient via its PASSWD
284 # environment variable.  There are several ways you can tell BackupPC
285 # the smb share password.  In each case you should be very careful about
286 # security.  If you put the password here, make sure that this file is
287 # not readable by regular users!  See the "Setting up config.pl" section
288 # in the documentation for more information.
289 #
290 # This setting only matters if $Conf{XferMethod} = 'smb'.
291 #
292 $Conf{SmbSharePasswd} = '';
293
294 #
295 # Which host directories to backup when using tar transport.  This can be a
296 # string or an array of strings if there are multiple directories to
297 # backup per host.  Examples:
298 #
299 #   $Conf{TarShareName} = '/';                  # backup everything
300 #   $Conf{TarShareName} = '/home';              # only backup /home
301 #   $Conf{TarShareName} = ['/home', '/src'];    # backup /home and /src
302 #
303 # The fact this parameter is called 'TarShareName' is for historical
304 # consistency with the Smb transport options.  You can use any valid
305 # directory on the client: there is no need for it to correspond to
306 # any Smb share or device mount point.
307 #
308 # Note also that you can also use $Conf{BackupFilesOnly} to specify
309 # a specific list of directories to backup.  It's more efficient to
310 # use this option instead of $Conf{TarShareName} since a new tar is
311 # run for each entry in $Conf{TarShareName}.
312 #
313 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
314 # you can backup each file system separately, which makes restoring one
315 # bad file system easier.  In this case you would list all of the mount
316 # points here, since you can't get the same result with
317 # $Conf{BackupFilesOnly}:
318 #
319 #     $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
320 #
321 # This setting only matters if $Conf{XferMethod} = 'tar'.
322 #
323 $Conf{TarShareName} = '/';
324
325 #
326 # Minimum period in days between full backups. A full dump will only be
327 # done if at least this much time has elapsed since the last full dump,
328 # and at least $Conf{IncrPeriod} days has elapsed since the last
329 # successful dump.
330 #
331 # Typically this is set slightly less than an integer number of days. The
332 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
333 # will make the actual backup interval a bit longer.
334 #
335 # There are two special values for $Conf{FullPeriod}:
336 #
337 #   -1   Don't do any regular backups on this machine.  Manually
338 #        requested backups (via the CGI interface) will still occur.
339 #
340 #   -2   Don't do any backups on this machine.  Manually requested
341 #        backups (via the CGI interface) will be ignored.
342 #
343 # These special settings are useful for a client that is no longer
344 # being backed up (eg: a retired machine), but you wish to keep the
345 # last backups available for browsing or restoring to other machines.
346 #
347 $Conf{FullPeriod} = 6.97;
348
349 #
350 # Minimum period in days between incremental backups (a user requested
351 # incremental backup will be done anytime on demand).
352 #
353 # Typically this is set slightly less than an integer number of days. The
354 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
355 # will make the actual backup interval a bit longer.
356 #
357 $Conf{IncrPeriod} = 0.97;
358
359 #
360 # Number of full backups to keep.  Must be >= 1.
361 #
362 # In the steady state, each time a full backup completes successfully
363 # the oldest one is removed.  If this number is decreased, the
364 # extra old backups will be removed.
365 #
366 # If filling of incremental dumps is off the oldest backup always
367 # has to be a full (ie: filled) dump.  This might mean one or two
368 # extra full dumps are kept until the oldest incremental backups expire.
369 #
370 # Exponential backup expiry is also supported.  This allows you to specify:
371 #
372 #   - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
373 #   - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
374 #   - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
375 #   - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
376 #   - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
377 #
378 # and so on.  This works by deleting every other full as each expiry
379 # boundary is crossed.
380 #
381 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
382 #
383 #   $Conf{FullKeepCnt} = [4, 2, 3];
384 #
385 # Entry #n specifies how many fulls to keep at an interval of
386 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
387 #
388 # The example above specifies keeping 4 of the most recent full backups
389 # (1 week interval) two full backups at 2 week intervals, and 3 full
390 # backups at 4 week intervals, eg:
391 #
392 #    full 0 19 weeks old   \
393 #    full 1 15 weeks old    >---  3 backups at 4 * $Conf{FullPeriod}
394 #    full 2 11 weeks old   / 
395 #    full 3  7 weeks old   \____  2 backups at 2 * $Conf{FullPeriod}
396 #    full 4  5 weeks old   /
397 #    full 5  3 weeks old   \
398 #    full 6  2 weeks old    \___  4 backups at 1 * $Conf{FullPeriod}
399 #    full 7  1 week old     /
400 #    full 8  current       /
401 #
402 # On a given week the spacing might be less than shown as each backup
403 # ages through each expiry period.  For example, one week later, a
404 # new full is completed and the oldest is deleted, giving:
405 #
406 #    full 0 16 weeks old   \
407 #    full 1 12 weeks old    >---  3 backups at 4 * $Conf{FullPeriod}
408 #    full 2  8 weeks old   / 
409 #    full 3  6 weeks old   \____  2 backups at 2 * $Conf{FullPeriod}
410 #    full 4  4 weeks old   /
411 #    full 5  3 weeks old   \
412 #    full 6  2 weeks old    \___  4 backups at 1 * $Conf{FullPeriod}
413 #    full 7  1 week old     /
414 #    full 8  current       /
415 #
416 # You can specify 0 as a count (except in the first entry), and the
417 # array can be as long as you wish.  For example:
418 #
419 #   $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
420 #
421 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
422 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
423 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
424 # 7-8 months apart).
425 #
426 # Note that you will have to increase $Conf{FullAgeMax} if you want
427 # very old full backups to be kept.  Full backups are removed according
428 # to both $Conf{FullKeepCnt} and $Conf{FullAgeMax}.
429 #
430 # Note also that these two settings are equivalent and both keep just
431 # the four most recent full dumps:
432 #
433 #    $Conf{FullKeepCnt} = 4;
434 #    $Conf{FullKeepCnt} = [4];
435 #
436 $Conf{FullKeepCnt} = 1;
437
438 #
439 # Very old full backups are removed after $Conf{FullAgeMax} days.  However,
440 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
441 # they are.
442 #
443 $Conf{FullKeepCntMin} = 1;
444 $Conf{FullAgeMax}     = 90;
445
446 #
447 # Number of incremental backups to keep.  Must be >= 1.
448 #
449 # In the steady state, each time an incr backup completes successfully
450 # the oldest one is removed.  If this number is decreased, the
451 # extra old backups will be removed.
452 #
453 $Conf{IncrKeepCnt} = 6;
454
455 #
456 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
457 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
458 # matter how old they are.
459 #
460 $Conf{IncrKeepCntMin} = 1;
461 $Conf{IncrAgeMax}     = 30;
462
463 #
464 # Whether incremental backups are filled.  "Filling" means that the
465 # most recent full (or filled) dump is merged into the new incremental
466 # dump using hardlinks.  This makes an incremental dump look like a
467 # full dump.  Prior to v1.03 all incremental backups were filled.
468 # In v1.4.0 and later the default is off.
469 #
470 # BackupPC, and the cgi interface in particular, do the right thing on
471 # un-filled incremental backups.  It will correctly display the merged
472 # incremental backup with the most recent filled backup, giving the
473 # un-filled incremental backups a filled appearance.  That means it
474 # invisible to the user whether incremental dumps are filled or not.
475 #
476 # Filling backups takes a little extra disk space, and it does cost
477 # some extra disk activity for filling, and later removal.  Filling
478 # is no longer useful, since file mangling and compression doesn't
479 # make a filled backup very useful. It's likely the filling option
480 # will be removed from future versions: filling will be delegated to
481 # the display and extraction of backup data.
482 #
483 # If filling is off, BackupPC makes sure that the oldest backup is
484 # a full, otherwise the following incremental backups will be
485 # incomplete.  This might mean an extra full backup has to be
486 # kept until the following incremental backups expire.
487 #
488 # The default is off.  You can turn this on or off at any
489 # time without affecting existing backups.
490 #
491 $Conf{IncrFill} = 0;
492
493 #
494 # Number of restore logs to keep.  BackupPC remembers information about
495 # each restore request.  This number per client will be kept around before
496 # the oldest ones are pruned.
497 #
498 # Note: files/dirs delivered via Zip or Tar downloads don't count as
499 # restores.  Only the first restore option (where the files and dirs
500 # are written to the host) count as restores that are logged.
501 #
502 $Conf{RestoreInfoKeepCnt} = 10;
503
504 #
505 # Number of archive logs to keep.  BackupPC remembers information
506 # about each archive request.  This number per archive client will
507 # be kept around before the oldest ones are pruned.
508 #
509 $Conf{ArchiveInfoKeepCnt} = 10;
510
511 #
512 # List of directories or files to backup.  If this is defined, only these
513 # directories or files will be backed up.
514 #
515 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
516 # can be specified per share. If both are set for a particular share, then
517 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
518 # is ignored.
519 #
520 # This can be set to a string, an array of strings, or, in the case
521 # of multiple shares, a hash of strings or arrays.  A hash is used
522 # to give a list of directories or files to backup for each share
523 # (the share name is the key).  If this is set to just a string or
524 # array, and $Conf{SmbShareName} contains multiple share names, then
525 # the setting is assumed to apply to only the first share name.
526 #
527 # Examples:
528 #    $Conf{BackupFilesOnly} = '/myFiles';
529 #    $Conf{BackupFilesOnly} = ['/myFiles'];     # same as first example
530 #    $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
531 #    $Conf{BackupFilesOnly} = {
532 #       'c' => ['/myFiles', '/important'],      # these are for 'c' share
533 #       'd' => ['/moreFiles', '/archive'],      # these are for 'd' share
534 #    };
535 #
536 $Conf{BackupFilesOnly} = undef;
537
538 #
539 # List of directories or files to exclude from the backup.  For Smb,
540 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
541 # can be specified per share.  If both are set for a particular share,
542 # then $Conf{BackupFilesOnly} takes precedence and
543 # $Conf{BackupFilesExclude} is ignored.
544 #
545 # This can be set to a string, an array of strings, or, in the case
546 # of multiple shares, a hash of strings or arrays.  A hash is used
547 # to give a list of directories or files to exclude for each share
548 # (the share name is the key).  If this is set to just a string or
549 # array, and $Conf{SmbShareName} contains multiple share names, then
550 # the setting is assumed to apply to only the first share name.
551 #
552 # The exact behavior is determined by the underlying transport program,
553 # smbclient or tar.  For smbclient the exlclude file list is passed into
554 # the X option.  Simple shell wild-cards using "*" or "?" are allowed.
555 #
556 # For tar, if the exclude file contains a "/" it is assumed to be anchored
557 # at the start of the string.  Since all the tar paths start with "./",
558 # BackupPC prepends a "." if the exclude file starts with a "/".  Note
559 # that GNU tar version >= 1.13.7 is required for the exclude option to
560 # work correctly.  For linux or unix machines you should add
561 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
562 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
563 # $Conf{RsyncArgs}.  Also, for tar, do not use a trailing "/" in
564 # the directory name: a trailing "/" causes the name to not match
565 # and the directory will not be excluded.
566 #
567 # Users report that for smbclient you should specify a directory
568 # followed by "/*", eg: "/proc/*", instead of just "/proc".
569 #
570 # Examples:
571 #    $Conf{BackupFilesExclude} = '/temp';
572 #    $Conf{BackupFilesExclude} = ['/temp'];     # same as first example
573 #    $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
574 #    $Conf{BackupFilesExclude} = {
575 #       'c' => ['/temp', '/winnt/tmp'],         # these are for 'c' share
576 #       'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
577 #    };
578 #
579 $Conf{BackupFilesExclude} = undef;
580
581 #
582 # PCs that are always or often on the network can be backed up after
583 # hours, to reduce PC, network and server load during working hours. For
584 # each PC a count of consecutive good pings is maintained. Once a PC has
585 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
586 # to "blackout" and not backed up during hours and days specified by
587 # $Conf{BlackoutPeriods}.
588 #
589 # To allow for periodic rebooting of a PC or other brief periods when a
590 # PC is not on the network, a number of consecutive bad pings is allowed
591 # before the good ping count is reset. This parameter is
592 # $Conf{BlackoutBadPingLimit}.
593 #
594 # Note that bad and good pings don't occur with the same interval. If a
595 # machine is always on the network, it will only be pinged roughly once
596 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
597 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
598 # machine to be subject to blackout. On the other hand, if a ping is
599 # failed, it will be retried roughly every time BackupPC wakes up, eg,
600 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
601 # 3 means that the PC will lose its blackout status after 3-6 hours of
602 # unavailability.
603 #
604 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
605 # value.  A value of 0 will make all machines subject to blackout.  But
606 # if you don't want to do any backups during the day it would be easier
607 # to just set $Conf{WakeupSchedule} to a restricted schedule.
608 #
609 $Conf{BlackoutBadPingLimit} = 3;
610 $Conf{BlackoutGoodCnt}      = 7;
611
612 #
613 # One or more blackout periods can be specified.  If a client is
614 # subject to blackout then no regular (non-manual) backups will
615 # be started during any of these periods.  hourBegin and hourEnd
616 # specify hours fro midnight and weekDays is a list of days of
617 # the week where 0 is Sunday, 1 is Monday etc.
618 #
619 # For example:
620 #
621 #    $Conf{BlackoutPeriods} = [
622 #       {
623 #           hourBegin =>  7.0,
624 #           hourEnd   => 19.5,
625 #           weekDays  => [1, 2, 3, 4, 5],
626 #       },
627 #    ];
628 #
629 # specifies one blackout period from 7:00am to 7:30pm local time
630 # on Mon-Fri.
631 #
632 # The blackout period can also span midnight by setting
633 # hourBegin > hourEnd, eg:
634 #
635 #    $Conf{BlackoutPeriods} = [
636 #       {
637 #           hourBegin =>  7.0,
638 #           hourEnd   => 19.5,
639 #           weekDays  => [1, 2, 3, 4, 5],
640 #       },
641 #       {
642 #           hourBegin => 23,
643 #           hourEnd   =>  5,
644 #           weekDays  => [5, 6],
645 #       },
646 #    ];
647 #
648 # This specifies one blackout period from 7:00am to 7:30pm local time
649 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
650 # Saturday night.
651 #
652 $Conf{BlackoutPeriods} = [
653     {
654         hourBegin =>  7.0,
655         hourEnd   => 19.5,
656         weekDays  => [1, 2, 3, 4, 5],
657     },
658 ];
659
660 #
661 # A backup of a share that has zero files is considered fatal. This is
662 # used to catch miscellaneous Xfer errors that result in no files being
663 # backed up.  If you have shares that might be empty (and therefore an
664 # empty backup is valid) you should set this flag to 0.
665 #
666 $Conf{BackupZeroFilesIsFatal} = 1;
667
668 ###########################################################################
669 # General per-PC configuration settings
670 # (can be overridden in the per-PC config.pl)
671 ###########################################################################
672 #
673 # What transport method to use to backup each host.  If you have
674 # a mixed set of WinXX and linux/unix hosts you will need to override
675 # this in the per-PC config.pl.
676 #
677 # The valid values are:
678 #
679 #   - 'smb':     backup and restore via smbclient and the SMB protocol.
680 #                Easiest choice for WinXX.
681 #
682 #   - 'rsync':   backup and restore via rsync (via rsh or ssh).
683 #                Best choice for linux/unix.  Good choice also for WinXX.
684 #
685 #   - 'rsyncd':  backup and restre via rsync daemon on the client.
686 #                Best choice for linux/unix if you have rsyncd running on
687 #                the client.  Good choice also for WinXX.
688 #
689 #   - 'tar':    backup and restore via tar, tar over ssh, rsh or nfs.
690 #               Good choice for linux/unix.
691 #
692 #   - 'archive': host is a special archive host.  Backups are not done.
693 #                An archive host is used to archive other host's backups
694 #                to permanent media, such as tape, CDR or DVD.
695 #               
696 #
697 $Conf{XferMethod} = 'smb';
698
699 #
700 # Level of verbosity in Xfer log files.  0 means be quiet, 1 will give
701 # will give one line per file, 2 will also show skipped files on
702 # incrementals, higher values give more output.
703 #
704 $Conf{XferLogLevel} = 1;
705
706 #
707 # Full path for smbclient. Security caution: normal users should not
708 # allowed to write to this file or directory.
709 #
710 # smbclient is from the Samba distribution. smbclient is used to
711 # actually extract the incremental or full dump of the share filesystem
712 # from the PC.
713 #
714 # This setting only matters if $Conf{XferMethod} = 'smb'.
715 #
716 $Conf{SmbClientPath} = '/usr/bin/smbclient';
717
718 #
719 # Commands to run smbclient for a full dump, incremental dump or a restore.
720 # This setting only matters if $Conf{XferMethod} = 'smb'.
721 #
722 # The following variables are substituted at run-time:
723 #
724 #    $smbClientPath   same as $Conf{SmbClientPath}
725 #    $host            host to backup/restore
726 #    $hostIP          host IP address
727 #    $shareName       share name
728 #    $userName        user name
729 #    $fileList        list of files to backup (based on exclude/include)
730 #    $I_option        optional -I option to smbclient
731 #    $X_option        exclude option (if $fileList is an exclude list)
732 #    $timeStampFile   start time for incremental dump
733 #
734 # If your smb share is read-only then direct restores will fail.
735 # You should set $Conf{SmbClientRestoreCmd} to undef and the
736 # corresponding CGI restore option will be removed.
737 #
738 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
739             . ' $I_option -U $userName -E -N -d 1'
740             . ' -c tarmode\\ full -Tc$X_option - $fileList';
741
742 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
743             . ' $I_option -U $userName -E -N -d 1'
744             . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
745
746 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
747             . ' $I_option -U $userName -E -N -d 1'
748             . ' -c tarmode\\ full -Tx -';
749
750 #
751 # Full command to run tar on the client.  GNU tar is required.  You will
752 # need to fill in the correct paths for ssh2 on the local host (server)
753 # and GNU tar on the client.  Security caution: normal users should not
754 # allowed to write to these executable files or directories.
755 #
756 # See the documentation for more information about setting up ssh2 keys.
757 #
758 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
759 # For example, assuming the client filesystem is mounted below /mnt/hostName,
760 # you could use something like:
761 #
762 #    $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
763 #                        . ' --totals';
764 #
765 # In the case of NFS or rsh you need to make sure BackupPC's privileges
766 # are sufficient to read all the files you want to backup.  Also, you
767 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
768 #
769 # The following variables are substituted at run-time:
770 #
771 #   $host        host name
772 #   $hostIP      host's IP address
773 #   $incrDate    newer-than date for incremental backups
774 #   $shareName   share name to backup (ie: top-level directory path)
775 #   $fileList    specific files to backup or exclude
776 #   $tarPath     same as $Conf{TarClientPath}
777 #   $sshPath     same as $Conf{SshPath}
778 #
779 # If a variable is followed by a "+" it is shell escaped.  This is
780 # necessary for the command part of ssh or rsh, since it ends up
781 # getting passed through the shell.
782 #
783 # This setting only matters if $Conf{XferMethod} = 'tar'.
784 #
785 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
786                     . ' $tarPath -c -v -f - -C $shareName+'
787                     . ' --totals';
788
789 #
790 # Extra tar arguments for full backups.  Several variables are substituted at
791 # run-time.  See $Conf{TarClientCmd} for the list of variable substitutions.
792 #
793 # If you are running tar locally (ie: without rsh or ssh) then remove the
794 # "+" so that the argument is no longer shell escaped.
795 #
796 # This setting only matters if $Conf{XferMethod} = 'tar'.
797 #
798 $Conf{TarFullArgs} = '$fileList+';
799
800 #
801 # Extra tar arguments for incr backups.  Several variables are substituted at
802 # run-time.  See $Conf{TarClientCmd} for the list of variable substitutions.
803 #
804 # Note that GNU tar has several methods for specifying incremental backups,
805 # including:
806 #
807 #   --newer-mtime $incrDate+
808 #          This causes a file to be included if the modification time is
809 #          later than $incrDate (meaning its contents might have changed).
810 #          But changes in the ownership or modes will not qualify the
811 #          file to be included in an incremental.
812 #
813 #   --newer=$incrDate+
814 #          This causes the file to be included if any attribute of the
815 #          file is later than $incrDate, meaning either attributes or
816 #          the modification time.  This is the default method.  Do
817 #          not use --atime-preserve in $Conf{TarClientCmd} above,
818 #          otherwise resetting the atime (access time) counts as an
819 #          attribute change, meaning the file will always be included
820 #          in each new incremental dump.
821 #
822 # If you are running tar locally (ie: without rsh or ssh) then remove the
823 # "+" so that the argument is no longer shell escaped.
824 #
825 # This setting only matters if $Conf{XferMethod} = 'tar'.
826 #
827 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
828
829 #
830 # Full command to run tar for restore on the client.  GNU tar is required.
831 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
832 # and ssh's -n removed.
833 #
834 # See $Conf{TarClientCmd} for full details.
835 #
836 # This setting only matters if $Conf{XferMethod} = "tar".
837 #
838 # If you want to disable direct restores using tar, you should set
839 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
840 # restore option will be removed.
841 #
842 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
843                    . ' $tarPath -x -p --numeric-owner --same-owner'
844                    . ' -v -f - -C $shareName+';
845
846 #
847 # Full path for tar on the client. Security caution: normal users should not
848 # allowed to write to this file or directory.
849 #
850 # This setting only matters if $Conf{XferMethod} = 'tar'.
851 #
852 $Conf{TarClientPath} = '/bin/tar';
853
854 #
855 # Path to rsync executable on the client
856 #
857 $Conf{RsyncClientPath} = '/bin/rsync';
858
859 #
860 # Full command to run rsync on the client machine.  The following variables
861 # are substituted at run-time:
862 #
863 #        $host           host name being backed up
864 #        $hostIP         host's IP address
865 #        $shareName      share name to backup (ie: top-level directory path)
866 #        $rsyncPath      same as $Conf{RsyncClientPath}
867 #        $sshPath        same as $Conf{SshPath}
868 #        $argList        argument list, built from $Conf{RsyncArgs},
869 #                        $shareName, $Conf{BackupFilesExclude} and
870 #                        $Conf{BackupFilesOnly}
871 #
872 # This setting only matters if $Conf{XferMethod} = 'rsync'.
873 #
874 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
875
876 #
877 # Full command to run rsync for restore on the client.  The following
878 # variables are substituted at run-time:
879 #
880 #        $host           host name being backed up
881 #        $hostIP         host's IP address
882 #        $shareName      share name to backup (ie: top-level directory path)
883 #        $rsyncPath      same as $Conf{RsyncClientPath}
884 #        $sshPath        same as $Conf{SshPath}
885 #        $argList        argument list, built from $Conf{RsyncArgs},
886 #                        $shareName, $Conf{BackupFilesExclude} and
887 #                        $Conf{BackupFilesOnly}
888 #
889 # This setting only matters if $Conf{XferMethod} = 'rsync'.
890 #
891 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
892
893 #
894 # Share name to backup.  For $Conf{XferMethod} = "rsync" this should
895 # be a file system path, eg '/' or '/home'.
896 #
897 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
898 # to backup (ie: the name from /etc/rsynd.conf).
899 #
900 # This can also be a list of multiple file system paths or modules.
901 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
902 # can backup each file system separately, which makes restoring one
903 # bad file system easier.  In this case you would list all of the mount
904 # points:
905 #
906 #     $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
907 #
908 $Conf{RsyncShareName} = '/';
909
910 #
911 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
912 #
913 $Conf{RsyncdClientPort} = 873;
914
915 #
916 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
917 # The user name and password are stored on the client in whatever file
918 # the "secrets file" parameter in rsyncd.conf points to
919 # (eg: /etc/rsyncd.secrets).
920 #
921 $Conf{RsyncdUserName} = '';
922
923 #
924 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
925 # The user name and password are stored on the client in whatever file
926 # the "secrets file" parameter in rsyncd.conf points to
927 # (eg: /etc/rsyncd.secrets).
928 #
929 $Conf{RsyncdPasswd} = '';
930
931 #
932 # Whether authentication is mandatory when connecting to the client's
933 # rsyncd.  By default this is on, ensuring that BackupPC will refuse to
934 # connect to an rsyncd on the client that is not password protected.
935 # Turn off at your own risk.
936 #
937 $Conf{RsyncdAuthRequired} = 1;
938
939 #
940 # Arguments to rsync for backup.  Do not edit the first set unless you
941 # have a thorough understanding of how File::RsyncP works.
942 #
943 # Examples of additional arguments that should work are --exclude/--include,
944 # eg:
945 #
946 #     $Conf{RsyncArgs} = [
947 #           # original arguments here
948 #           '-v',
949 #           '--exclude', '/proc',
950 #           '--exclude', '*.tmp',
951 #     ];
952 #
953 $Conf{RsyncArgs} = [
954             #
955             # Do not edit these!
956             #
957             '--numeric-ids',
958             '--perms',
959             '--owner',
960             '--group',
961             '--devices',
962             '--links',
963             '--times',
964             '--block-size=2048',
965             '--recursive',
966
967             #
968             # If you are using a patched client rsync that supports the
969             # --fixed-csumseed option (see http://backuppc.sourceforge.net),
970             # then uncomment this to enabled rsync checksum cachcing
971             #
972             #'--fixed-csumseed',
973
974             #
975             # Add additional arguments here
976             #
977 ];
978
979 #
980 # Arguments to rsync for restore.  Do not edit the first set unless you
981 # have a thorough understanding of how File::RsyncP works.
982 #
983 # If you want to disable direct restores using rsync (eg: is the module
984 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
985 # the corresponding CGI restore option will be removed.
986 #
987 $Conf{RsyncRestoreArgs} = [
988             #
989             # Do not edit these!
990             #
991             '--numeric-ids',
992             '--perms',
993             '--owner',
994             '--group',
995             '--devices',
996             '--links',
997             '--times',
998             '--block-size=2048',
999             '--relative',
1000             '--ignore-times',
1001             '--recursive',
1002
1003             #
1004             # If you are using a patched client rsync that supports the
1005             # --fixed-csumseed option (see http://backuppc.sourceforge.net),
1006             # then uncomment this to enabled rsync checksum cachcing
1007             #
1008             #'--fixed-csumseed',
1009
1010             #
1011             # Add additional arguments here
1012             #
1013 ];
1014
1015 #
1016 # Archive Destination
1017 #
1018 # The Destination of the archive
1019 # e.g. /tmp for file archive or /dev/nst0 for device archive
1020 #
1021 $Conf{ArchiveDest} = '/tmp';
1022
1023 #
1024 # Archive Compression type
1025 #
1026 # The valid values are:
1027 #
1028 #   - 'none':  No Compression
1029 #
1030 #   - 'gzip':  Medium Compression. Recommended.
1031 #
1032 #   - 'bzip2': High Compression but takes longer.
1033 #
1034 $Conf{ArchiveComp} = 'gzip';
1035
1036 #
1037 # Archive Parity Files
1038 #
1039 # The number of Parity Files to generate.
1040 # Uses the commandline par available from
1041 # http://parchive.sourceforge.net
1042 #
1043 # Only useful for file dumps.
1044 #
1045 # Set to 0 to disable this feature.
1046 #
1047 $Conf{ArchivePar} = 0;
1048
1049 #
1050 # Archive Size Split
1051 #
1052 # Only for file archives. Splits the output into 
1053 # the specified size * 1,000,000.
1054 # e.g. to split into 650,000,000 bytes, specify 650 below.
1055 #
1056 $Conf{ArchiveSplit} = 650;
1057
1058 #
1059 # Archive Command
1060 #
1061 # This is the command that is called to actually run the archive process
1062 # for each host.  The following variables are substituted at run-time:
1063 #
1064 #   $Installdir    The installation directory of BackupPC
1065 #   $tarCreatePath The path to BackupPC_tarCreate
1066 #   $splitpath     The path to the split program
1067 #   $parpath       The path to the par program
1068 #   $host          The host to archive
1069 #   $backupnumber  The backup number of the host to archive
1070 #   $compression   The path to the compression program
1071 #   $compext       The extension assigned to the compression type
1072 #   $splitsize     The number of bytes to split archives into
1073 #   $archiveloc    The location to put the archive
1074 #   $parfile       The number of par files to create
1075 #
1076 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1077         . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1078         . ' $compression $compext $splitsize $archiveloc $parfile *';
1079
1080 #
1081 # Full path for ssh. Security caution: normal users should not
1082 # allowed to write to this file or directory.
1083 #
1084 $Conf{SshPath} = '/usr/bin/ssh';
1085
1086 #
1087 # Full path for nmblookup. Security caution: normal users should not
1088 # allowed to write to this file or directory.
1089 #
1090 # nmblookup is from the Samba distribution. nmblookup is used to get the
1091 # netbios name, necessary for DHCP hosts.
1092 #
1093 $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
1094
1095 #
1096 # NmbLookup command.  Given an IP address, does an nmblookup on that
1097 # IP address.  The following variables are substituted at run-time:
1098 #
1099 #   $nmbLookupPath      path to nmblookup ($Conf{NmbLookupPath})
1100 #   $host               IP address
1101 #
1102 # This command is only used for DHCP hosts: given an IP address, this
1103 # command should try to find its NetBios name.
1104 #
1105 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1106
1107 #
1108 # NmbLookup command.  Given a netbios name, finds that host by doing
1109 # a NetBios lookup.  Several variables are substituted at run-time:
1110 #
1111 #   $nmbLookupPath      path to nmblookup ($Conf{NmbLookupPath})
1112 #   $host               NetBios name
1113 #
1114 # In some cases you might need to change the broadcast address, for
1115 # example if nmblookup uses 192.168.255.255 by default and you find
1116 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1117 # address) using the -B option:
1118 #
1119 #    $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1120 #
1121 # If you use a WINS server and your machines don't respond to
1122 # multicast NetBios requests you can use this (replace 1.2.3.4
1123 # with the IP address of your WINS server):
1124 #
1125 #    $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1126 #
1127 # This is preferred over multicast since it minimizes network traffic.
1128 #
1129 # Experiment manually for your site to see what form of nmblookup command
1130 # works.
1131 #
1132 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1133
1134 #
1135 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1136 # name to ensure it matches the host name.  An error is generated if
1137 # they do not match.  Typically this flag is off.  But if you are going
1138 # to transition a bunch of machines from fixed host addresses to DHCP,
1139 # setting this flag is a great way to verify that the machines have
1140 # their netbios name set correctly before turning on DCHP.
1141 #
1142 $Conf{FixedIPNetBiosNameCheck} = 0;
1143
1144 #
1145 # Full path to the ping command.  Security caution: normal users
1146 # should not be allowed to write to this file or directory.
1147 #
1148 # If you want to disable ping checking, set this to some program
1149 # that exits with 0 status, eg:
1150 #
1151 #     $Conf{PingPath} = '/bin/echo';
1152 #
1153 $Conf{PingPath} = '/bin/ping';
1154
1155 #
1156 # Ping command.  The following variables are substituted at run-time:
1157 #
1158 #   $pingPath      path to ping ($Conf{PingPath})
1159 #   $host          host name
1160 #
1161 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1162 # exit status (0 even on failure).  Replace with "ping $host 1", which
1163 # gets the correct exit status but we don't get the round-trip time.
1164 #
1165 $Conf{PingCmd} = '$pingPath -c 1 $host';
1166
1167 #
1168 # Path to init.d script and command to use that script to start the
1169 # server from the CGI interface.  The following variables are substituted
1170 # at run-time:
1171 #
1172 #   $sshPath           path to ssh ($Conf{SshPath})
1173 #   $serverHost        same as $Conf{ServerHost}
1174 #   $serverInitdPath   path to init.d script ($Conf{ServerInitdPath})
1175 #
1176 # Example:
1177 #
1178 # $Conf{ServerInitdPath}     = '/etc/init.d/backuppc';
1179 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
1180 #                            . ' $serverInitdPath start'
1181 #                            . ' < /dev/null >& /dev/null';
1182 #
1183 $Conf{ServerInitdPath} = '';
1184 $Conf{ServerInitdStartCmd} = '';
1185
1186 #
1187 # Compression level to use on files.  0 means no compression.  Compression
1188 # levels can be from 1 (least cpu time, slightly worse compression) to
1189 # 9 (most cpu time, slightly better compression).  The recommended value
1190 # is 3.  Changing to 5, for example, will take maybe 20% more cpu time
1191 # and will get another 2-3% additional compression. See the zlib
1192 # documentation for more information about compression levels.
1193 #
1194 # Changing compression on or off after backups have already been done
1195 # will require both compressed and uncompressed pool files to be stored.
1196 # This will increase the pool storage requirements, at least until all
1197 # the old backups expire and are deleted.
1198 #
1199 # It is ok to change the compression value (from one non-zero value to
1200 # another non-zero value) after dumps are already done.  Since BackupPC
1201 # matches pool files by comparing the uncompressed versions, it will still
1202 # correctly match new incoming files against existing pool files.  The
1203 # new compression level will take effect only for new files that are
1204 # newly compressed and added to the pool.
1205 #
1206 # If compression was off and you are enabling compression for the first
1207 # time you can use the BackupPC_compressPool utility to compress the
1208 # pool.  This avoids having the pool grow to accommodate both compressed
1209 # and uncompressed backups.  See the documentation for more information.
1210 #
1211 # Note: compression needs the Compress::Zlib perl library.  If the
1212 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1213 # forced to 0 (compression off).
1214 #
1215 $Conf{CompressLevel} = 0;
1216
1217 #
1218 # Maximum round-trip ping time in milliseconds.  This threshold is set
1219 # to avoid backing up PCs that are remotely connected through WAN or
1220 # dialup connections.  The output from ping -s (assuming it is supported
1221 # on your system) is used to check the round-trip packet time.  On your
1222 # local LAN round-trip times should be much less than 20msec.  On most
1223 # WAN or dialup connections the round-trip time will be typically more
1224 # than 20msec.  Tune if necessary.
1225 #
1226 $Conf{PingMaxMsec} = 20;
1227
1228 #
1229 # Timeout in seconds when listening for the transport program's
1230 # (smbclient, tar etc) stdout. If no output is received during this
1231 # time, then it is assumed that something has wedged during a backup,
1232 # and the backup is terminated.
1233 #
1234 # Note that stdout buffering combined with huge files being backed up
1235 # could cause longish delays in the output from smbclient that
1236 # BackupPC_dump sees, so in rare cases you might want to increase
1237 # this value.
1238 #
1239 # Despite the name, this parameter sets the timeout for all transport
1240 # methods (tar, smb etc).
1241 #
1242 $Conf{ClientTimeout} = 7200;
1243
1244 #
1245 # Maximum number of log files we keep around in each PC's directory
1246 # (ie: pc/$host).  These files are aged monthly.  A setting of 12
1247 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1248 # in the pc/$host directory (ie: about a years worth).  (Except this
1249 # month's LOG, these files will have a .z extension if compression
1250 # is on).
1251 #
1252 # If you decrease this number after BackupPC has been running for a
1253 # while you will have to manually remove the older log files.
1254 #
1255 $Conf{MaxOldPerPCLogFiles} = 12;
1256
1257 #
1258 # Optional commands to run before and after dumps and restores.
1259 # Stdout from these commands will be written to the Xfer (or Restore)
1260 # log file.  One example of using these commands would be to
1261 # shut down and restart a database server, or to dump a database
1262 # to files for backup.  Example:
1263 #
1264 #    $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1265 #
1266 # The following variable substitutions are made at run time for
1267 # $Conf{DumpPreUserCmd} and $Conf{DumpPostUserCmd}:
1268 #
1269 #        $type         type of dump (incr or full)
1270 #        $xferOK       1 if the dump succeeded, 0 if it didn't
1271 #        $client       client name being backed up
1272 #        $host         host name (could be different from client name if
1273 #                                 $Conf{ClientNameAlias} is set)
1274 #        $hostIP       IP address of host
1275 #        $user         user name from the hosts file
1276 #        $moreUsers    list of additional users from the hosts file
1277 #        $share        the first share name
1278 #        $shares       list of all the share names
1279 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1280 #        $sshPath      value of $Conf{SshPath},
1281 #
1282 # The following variable substitutions are made at run time for
1283 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1284 #
1285 #        $client       client name being backed up
1286 #        $xferOK       1 if the restore succeeded, 0 if it didn't
1287 #        $host         host name (could be different from client name if
1288 #                                 $Conf{ClientNameAlias} is set)
1289 #        $hostIP       IP address of host
1290 #        $user         user name from the hosts file
1291 #        $moreUsers    list of additional users from the hosts file
1292 #        $share        the first share name
1293 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1294 #        $sshPath      value of $Conf{SshPath},
1295 #        $type         set to "restore"
1296 #        $bkupSrcHost  host name of the restore source
1297 #        $bkupSrcShare share name of the restore source
1298 #        $bkupSrcNum   backup number of the restore source
1299 #        $pathHdrSrc   common starting path of restore source
1300 #        $pathHdrDest  common starting path of destination
1301 #        $fileList     list of files being restored
1302 #
1303 # The following variable substitutions are made at run time for
1304 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1305 #
1306 #        $client       client name being backed up
1307 #        $xferOK       1 if the archive succeeded, 0 if it didn't
1308 #        $host         Name of the archive host
1309 #        $user         user name from the hosts file
1310 #        $share        the first share name
1311 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1312 #        $HostList     list of hosts being archived
1313 #        $BackupList   list of backup numbers for the hosts being archived
1314 #        $archiveloc   location where the archive is sent to
1315 #        $parfile      number of par files being generated
1316 #        $compression  compression program being used (eg: cat, gzip, bzip2)
1317 #        $compext      extension used for compression type (eg: raw, gz, bz2)
1318 #        $splitsize    size of the files that the archive creates
1319 #        $sshPath      value of $Conf{SshPath},
1320 #        $type         set to "archive"
1321 #
1322 $Conf{DumpPreUserCmd}     = undef;
1323 $Conf{DumpPostUserCmd}    = undef;
1324 $Conf{RestorePreUserCmd}  = undef;
1325 $Conf{RestorePostUserCmd} = undef;
1326 $Conf{ArchivePreUserCmd}  = undef;
1327 $Conf{ArchivePostUserCmd} = undef;
1328
1329 #
1330 # Override the client's host name.  This allows multiple clients
1331 # to all refer to the same physical host.  This should only be
1332 # set in the per-PC config file and is only used by BackupPC at
1333 # the last moment prior to generating the command used to backup
1334 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1335 # everywhere else in BackupPC).  The setting can be a host name or
1336 # IP address, eg:
1337 #
1338 #         $Conf{ClientNameAlias} = 'realHostName';
1339 #         $Conf{ClientNameAlias} = '192.1.1.15';
1340 #
1341 # will cause the relevant smb/tar/rsync backup/restore commands to be
1342 # directed to realHostName, not the client name.
1343 #
1344 # Note: this setting doesn't work for hosts with DHCP set to 1.
1345 #
1346 $Conf{ClientNameAlias} = undef;
1347
1348 #
1349 # Advanced option for asking BackupPC to load additional perl modules.
1350 # Can be a list (array ref) of module names to load at startup.
1351 #
1352 $Conf{PerlModuleLoad}     = undef;
1353
1354 ###########################################################################
1355 # Email reminders, status and messages
1356 # (can be overridden in the per-PC config.pl)
1357 ###########################################################################
1358 #
1359 # Full path to the sendmail command.  Security caution: normal users
1360 # should not allowed to write to this file or directory.
1361 #
1362 $Conf{SendmailPath} = '/usr/sbin/sendmail';
1363
1364 #
1365 # Minimum period between consecutive emails to a single user.
1366 # This tries to keep annoying email to users to a reasonable
1367 # level.  Email checks are done nightly, so this number is effectively
1368 # rounded up (ie: 2.5 means a user will never receive email more
1369 # than once every 3 days).
1370 #
1371 $Conf{EMailNotifyMinDays} = 2.5;
1372
1373 #
1374 # Name to use as the "from" name for email.  Depending upon your mail
1375 # handler this is either a plain name (eg: "admin") or a fully-qualified
1376 # name (eg: "admin@mydomain.com").
1377 #
1378 $Conf{EMailFromUserName} = '';
1379
1380 #
1381 # Destination address to an administrative user who will receive a
1382 # nightly email with warnings and errors.  If there are no warnings
1383 # or errors then no email will be sent.  Depending upon your mail
1384 # handler this is either a plain name (eg: "admin") or a fully-qualified
1385 # name (eg: "admin@mydomain.com").
1386 #
1387 $Conf{EMailAdminUserName} = '';
1388
1389 #
1390 # Destination domain name for email sent to users.  By default
1391 # this is empty, meaning email is sent to plain, unqualified
1392 # addresses.  Otherwise, set it to the destintation domain, eg:
1393 #
1394 #    $Cong{EMailUserDestDomain} = '@mydomain.com';
1395 #
1396 # With this setting user email will be set to 'user@mydomain.com'.
1397 #
1398 $Conf{EMailUserDestDomain} = '';
1399
1400 #
1401 # This subject and message is sent to a user if their PC has never been
1402 # backed up.
1403 #
1404 # These values are language-dependent.  The default versions can be
1405 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1406 # need to change the message, copy it here and edit it, eg:
1407 #
1408 #   $Conf{EMailNoBackupEverMesg} = <<'EOF';
1409 #   To: $user$domain
1410 #   cc:
1411 #   Subject: $subj
1412 #   
1413 #   Dear $userName,
1414 #   
1415 #   This is a site-specific email message.
1416 #   EOF
1417 #
1418 $Conf{EMailNoBackupEverSubj} = undef;
1419 $Conf{EMailNoBackupEverMesg} = undef;
1420
1421 #
1422 # How old the most recent backup has to be before notifying user.
1423 # When there have been no backups in this number of days the user
1424 # is sent an email.
1425 #
1426 $Conf{EMailNotifyOldBackupDays} = 7.0;
1427
1428 #
1429 # This subject and message is sent to a user if their PC has not recently
1430 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1431 #
1432 # These values are language-dependent.  The default versions can be
1433 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1434 # need to change the message, copy it here and edit it, eg:
1435 #
1436 #   $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1437 #   To: $user$domain
1438 #   cc:
1439 #   Subject: $subj
1440 #   
1441 #   Dear $userName,
1442 #   
1443 #   This is a site-specific email message.
1444 #   EOF
1445 #
1446 $Conf{EMailNoBackupRecentSubj} = undef;
1447 $Conf{EMailNoBackupRecentMesg} = undef;
1448
1449 #
1450 # How old the most recent backup of Outlook files has to be before
1451 # notifying user.
1452 #
1453 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1454
1455 #
1456 # This subject and message is sent to a user if their Outlook files have
1457 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1458 # days ago).
1459 #
1460 # These values are language-dependent.  The default versions can be
1461 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1462 # need to change the message, copy it here and edit it, eg:
1463 #
1464 #   $Conf{EMailOutlookBackupMesg} = <<'EOF';
1465 #   To: $user$domain
1466 #   cc:
1467 #   Subject: $subj
1468 #   
1469 #   Dear $userName,
1470 #   
1471 #   This is a site-specific email message.
1472 #   EOF
1473 #
1474 $Conf{EMailOutlookBackupSubj} = undef;
1475 $Conf{EMailOutlookBackupMesg} = undef;
1476
1477 ###########################################################################
1478 # CGI user interface configuration settings
1479 # (can be overridden in the per-PC config.pl)
1480 ###########################################################################
1481 #
1482 # Normal users can only access information specific to their host.
1483 # They can start/stop/browse/restore backups.
1484 #
1485 # Administrative users have full access to all hosts, plus overall
1486 # status and log information.
1487 #
1488 # The administrative users are the union of the unix/linux group
1489 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1490 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1491 # manual list of users set the corresponding configuration setting
1492 # to undef or an empty string.
1493 #
1494 # If you want every user to have admin privileges (careful!), set
1495 # $Conf{CgiAdminUsers} = '*'.
1496 #
1497 # Examples:
1498 #    $Conf{CgiAdminUserGroup} = 'admin';
1499 #    $Conf{CgiAdminUsers}     = 'craig celia';
1500 #    --> administrative users are the union of group admin, plus
1501 #      craig and celia.
1502 #
1503 #    $Conf{CgiAdminUserGroup} = '';
1504 #    $Conf{CgiAdminUsers}     = 'craig celia';
1505 #    --> administrative users are only craig and celia'.
1506 #
1507 $Conf{CgiAdminUserGroup} = '';
1508 $Conf{CgiAdminUsers}     = '';
1509
1510 #
1511 # URL of the BackupPC_Admin CGI script.  Used for email messages.
1512 #
1513 $Conf{CgiURL} = undef;
1514
1515 #   
1516 # Language to use.  See lib/BackupPC/Lang for the list of supported
1517 # languages, which include English (en), French (fr), Spanish (es),
1518 # German (de), and Italian (it).
1519 #
1520 # Currently the Language setting applies to the CGI interface and email
1521 # messages sent to users.  Log files and other text are still in English.
1522 #
1523 $Conf{Language} = 'en';
1524
1525 #
1526 # User names that are rendered by the CGI interface can be turned
1527 # into links into their home page or other information about the
1528 # user.  To set this up you need to create two sprintf() strings,
1529 # that each contain a single '%s' that will be replaced by the user
1530 # name.  The default is a mailto: link.
1531 #
1532 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1533 # is used to check (via "-f") that the user has a valid home page.
1534 # Set this to undef or an empty string to turn off this check.
1535 #
1536 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1537 # user's home page.  Set this to undef or an empty string to turn
1538 # off generation of URLs for user names.
1539 #
1540 # Example:
1541 #    $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1542 #    $Conf{CgiUserUrlCreate}     = 'http://myhost/users/%s.html';
1543 #    --> if /var/www/html/users/craig.html exists, then 'craig' will
1544 #      be rendered as a link to http://myhost/users/craig.html.
1545 #
1546 $Conf{CgiUserHomePageCheck} = '';
1547 $Conf{CgiUserUrlCreate}     = 'mailto:%s';
1548
1549 #
1550 # Date display format for CGI interface.  True for US-style dates (MM/DD)
1551 # and zero for international dates (DD/MM).
1552 #
1553 $Conf{CgiDateFormatMMDD} = 1;
1554
1555 #
1556 # If set, the complete list of hosts appears in the left navigation
1557 # bar pull-down for administrators.  Otherwise, just the hosts for which
1558 # the user is listed in the host file (as either the user or in moreUsers)
1559 # are displayed.
1560 #
1561 $Conf{CgiNavBarAdminAllHosts} = 1;
1562
1563 #
1564 # Hilight colors based on status that are used in the PC summary page.
1565 #
1566 $Conf{CgiStatusHilightColor} = {
1567     Reason_backup_failed           => '#ffcccc',
1568     Reason_backup_done             => '#ccffcc',
1569     Reason_no_ping                 => '#ffff99',
1570     Reason_backup_canceled_by_user => '#ff9900',
1571     Status_backup_in_progress      => '#66cc99',
1572 };
1573
1574 #
1575 # Additional CGI header text.
1576 #
1577 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1578
1579 #
1580 # Directory where images are stored.  This directory should be below
1581 # Apache's DocumentRoot.  This value isn't used by BackupPC but is
1582 # used by configure.pl when you upgrade BackupPC.
1583 #
1584 # Example:
1585 #     $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1586 #
1587 $Conf{CgiImageDir} = '';
1588
1589 #
1590 # Additional mappings of file name extenions to Content-Type for
1591 # individual file restore.  See $Ext2ContentType in BackupPC_Admin
1592 # for the default setting.  You can add additional settings here,
1593 # or override any default settings.  Example:
1594 #
1595 #     $Conf{CgiExt2ContentType} = {
1596 #                 'pl'  => 'text/plain',
1597 #          };
1598 #
1599 $Conf{CgiExt2ContentType} = { };
1600
1601 #
1602 # URL (without the leading http://host) for BackupPC's image directory.
1603 # The CGI script uses this value to serve up image files.
1604 #
1605 # Example:
1606 #     $Conf{CgiImageDirURL} = '/BackupPC';
1607 #
1608 $Conf{CgiImageDirURL} = '';
1609
1610 #
1611 # CSS stylesheet for the CGI interface.  It is stored in the
1612 # $Conf{CgiImageDir} directory and accessed via the
1613 # $Conf{CgiImageDirURL} URL.
1614 #
1615 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';