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