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