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