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