7113463f9d556bf38e9edcf32613af40a134fa2c
[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 # Prior to 3.x no charset conversion was done by BackupPC.  Backups were
873 # stored in what ever charset the XferMethod provided - typically utf8
874 # for smbclient and the client's locale settings for rsync and tar (eg:
875 # cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux).
876 # This setting tells BackupPC the charset that was used to store file
877 # names in old backups taken with BackupPC 2.x, so that non-ascii file
878 # names in old backups can be viewed and restored.
879 #
880 $Conf{ClientCharsetLegacy} = 'iso-8859-1';
881
882 #
883 # Name of the host share that is backed up when using SMB.  This can be a
884 # string or an array of strings if there are multiple shares per host.
885 # Examples:
886 #
887 #   $Conf{SmbShareName} = 'c';          # backup 'c' share
888 #   $Conf{SmbShareName} = ['c', 'd'];   # backup 'c' and 'd' shares
889 #
890 # This setting only matters if $Conf{XferMethod} = 'smb'.
891 #
892 $Conf{SmbShareName} = 'C$';
893
894 #
895 # Smbclient share user name.  This is passed to smbclient's -U argument.
896 #
897 # This setting only matters if $Conf{XferMethod} = 'smb'.
898 #
899 $Conf{SmbShareUserName} = '';
900
901 #
902 # Smbclient share password.  This is passed to smbclient via its PASSWD
903 # environment variable.  There are several ways you can tell BackupPC
904 # the smb share password.  In each case you should be very careful about
905 # security.  If you put the password here, make sure that this file is
906 # not readable by regular users!  See the "Setting up config.pl" section
907 # in the documentation for more information.
908 #
909 # This setting only matters if $Conf{XferMethod} = 'smb'.
910 #
911 $Conf{SmbSharePasswd} = '';
912
913 #
914 # Full path for smbclient. Security caution: normal users should not
915 # allowed to write to this file or directory.
916 #
917 # smbclient is from the Samba distribution. smbclient is used to
918 # actually extract the incremental or full dump of the share filesystem
919 # from the PC.
920 #
921 # This setting only matters if $Conf{XferMethod} = 'smb'.
922 #
923 $Conf{SmbClientPath} = '';
924
925 #
926 # Command to run smbclient for a full dump.
927 # This setting only matters if $Conf{XferMethod} = 'smb'.
928 #
929 # The following variables are substituted at run-time:
930 #
931 #    $smbClientPath   same as $Conf{SmbClientPath}
932 #    $host            host to backup/restore
933 #    $hostIP          host IP address
934 #    $shareName       share name
935 #    $userName        user name
936 #    $fileList        list of files to backup (based on exclude/include)
937 #    $I_option        optional -I option to smbclient
938 #    $X_option        exclude option (if $fileList is an exclude list)
939 #    $timeStampFile   start time for incremental dump
940 #
941 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
942             . ' $I_option -U $userName -E -N -d 1'
943             . ' -c tarmode\\ full -Tc$X_option - $fileList';
944
945 #
946 # Command to run smbclient for an incremental dump.
947 # This setting only matters if $Conf{XferMethod} = 'smb'.
948 #
949 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
950 #
951 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
952             . ' $I_option -U $userName -E -N -d 1'
953             . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
954
955 #
956 # Command to run smbclient for a restore.
957 # This setting only matters if $Conf{XferMethod} = 'smb'.
958 #
959 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
960 #
961 # If your smb share is read-only then direct restores will fail.
962 # You should set $Conf{SmbClientRestoreCmd} to undef and the
963 # corresponding CGI restore option will be removed.
964 #
965 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
966             . ' $I_option -U $userName -E -N -d 1'
967             . ' -c tarmode\\ full -Tx -';
968
969 #
970 # Which host directories to backup when using tar transport.  This can be a
971 # string or an array of strings if there are multiple directories to
972 # backup per host.  Examples:
973 #
974 #   $Conf{TarShareName} = '/';                  # backup everything
975 #   $Conf{TarShareName} = '/home';              # only backup /home
976 #   $Conf{TarShareName} = ['/home', '/src'];    # backup /home and /src
977 #
978 # The fact this parameter is called 'TarShareName' is for historical
979 # consistency with the Smb transport options.  You can use any valid
980 # directory on the client: there is no need for it to correspond to
981 # any Smb share or device mount point.
982 #
983 # Note also that you can also use $Conf{BackupFilesOnly} to specify
984 # a specific list of directories to backup.  It's more efficient to
985 # use this option instead of $Conf{TarShareName} since a new tar is
986 # run for each entry in $Conf{TarShareName}.
987 #
988 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
989 # you can backup each file system separately, which makes restoring one
990 # bad file system easier.  In this case you would list all of the mount
991 # points here, since you can't get the same result with
992 # $Conf{BackupFilesOnly}:
993 #
994 #     $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
995 #
996 # This setting only matters if $Conf{XferMethod} = 'tar'.
997 #
998 $Conf{TarShareName} = '/';
999
1000 #
1001 # Full command to run tar on the client.  GNU tar is required.  You will
1002 # need to fill in the correct paths for ssh2 on the local host (server)
1003 # and GNU tar on the client.  Security caution: normal users should not
1004 # allowed to write to these executable files or directories.
1005 #
1006 # See the documentation for more information about setting up ssh2 keys.
1007 #
1008 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
1009 # For example, assuming the client filesystem is mounted below /mnt/hostName,
1010 # you could use something like:
1011 #
1012 #    $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
1013 #                        . ' --totals';
1014 #
1015 # In the case of NFS or rsh you need to make sure BackupPC's privileges
1016 # are sufficient to read all the files you want to backup.  Also, you
1017 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
1018 #
1019 # The following variables are substituted at run-time:
1020 #
1021 #   $host        host name
1022 #   $hostIP      host's IP address
1023 #   $incrDate    newer-than date for incremental backups
1024 #   $shareName   share name to backup (ie: top-level directory path)
1025 #   $fileList    specific files to backup or exclude
1026 #   $tarPath     same as $Conf{TarClientPath}
1027 #   $sshPath     same as $Conf{SshPath}
1028 #
1029 # If a variable is followed by a "+" it is shell escaped.  This is
1030 # necessary for the command part of ssh or rsh, since it ends up
1031 # getting passed through the shell.
1032 #
1033 # This setting only matters if $Conf{XferMethod} = 'tar'.
1034 #
1035 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
1036                     . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
1037                     . ' --totals';
1038
1039 #
1040 # Extra tar arguments for full backups.  Several variables are substituted at
1041 # run-time.  See $Conf{TarClientCmd} for the list of variable substitutions.
1042 #
1043 # If you are running tar locally (ie: without rsh or ssh) then remove the
1044 # "+" so that the argument is no longer shell escaped.
1045 #
1046 # This setting only matters if $Conf{XferMethod} = 'tar'.
1047 #
1048 $Conf{TarFullArgs} = '$fileList+';
1049
1050 #
1051 # Extra tar arguments for incr backups.  Several variables are substituted at
1052 # run-time.  See $Conf{TarClientCmd} for the list of variable substitutions.
1053 #
1054 # Note that GNU tar has several methods for specifying incremental backups,
1055 # including:
1056 #
1057 #   --newer-mtime $incrDate+
1058 #          This causes a file to be included if the modification time is
1059 #          later than $incrDate (meaning its contents might have changed).
1060 #          But changes in the ownership or modes will not qualify the
1061 #          file to be included in an incremental.
1062 #
1063 #   --newer=$incrDate+
1064 #          This causes the file to be included if any attribute of the
1065 #          file is later than $incrDate, meaning either attributes or
1066 #          the modification time.  This is the default method.  Do
1067 #          not use --atime-preserve in $Conf{TarClientCmd} above,
1068 #          otherwise resetting the atime (access time) counts as an
1069 #          attribute change, meaning the file will always be included
1070 #          in each new incremental dump.
1071 #
1072 # If you are running tar locally (ie: without rsh or ssh) then remove the
1073 # "+" so that the argument is no longer shell escaped.
1074 #
1075 # This setting only matters if $Conf{XferMethod} = 'tar'.
1076 #
1077 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
1078
1079 #
1080 # Full command to run tar for restore on the client.  GNU tar is required.
1081 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
1082 # and ssh's -n removed.
1083 #
1084 # See $Conf{TarClientCmd} for full details.
1085 #
1086 # This setting only matters if $Conf{XferMethod} = "tar".
1087 #
1088 # If you want to disable direct restores using tar, you should set
1089 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
1090 # restore option will be removed.
1091 #
1092 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
1093                    . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
1094                    . ' -v -f - -C $shareName+';
1095
1096 #
1097 # Full path for tar on the client. Security caution: normal users should not
1098 # allowed to write to this file or directory.
1099 #
1100 # This setting only matters if $Conf{XferMethod} = 'tar'.
1101 #
1102 $Conf{TarClientPath} = '';
1103
1104 #
1105 # Path to rsync executable on the client
1106 #
1107 $Conf{RsyncClientPath} = '';
1108
1109 #
1110 # Full command to run rsync on the client machine.  The following variables
1111 # are substituted at run-time:
1112 #
1113 #        $host           host name being backed up
1114 #        $hostIP         host's IP address
1115 #        $shareName      share name to backup (ie: top-level directory path)
1116 #        $rsyncPath      same as $Conf{RsyncClientPath}
1117 #        $sshPath        same as $Conf{SshPath}
1118 #        $argList        argument list, built from $Conf{RsyncArgs},
1119 #                        $shareName, $Conf{BackupFilesExclude} and
1120 #                        $Conf{BackupFilesOnly}
1121 #
1122 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1123 #
1124 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1125
1126 #
1127 # Full command to run rsync for restore on the client.  The following
1128 # variables are substituted at run-time:
1129 #
1130 #        $host           host name being backed up
1131 #        $hostIP         host's IP address
1132 #        $shareName      share name to backup (ie: top-level directory path)
1133 #        $rsyncPath      same as $Conf{RsyncClientPath}
1134 #        $sshPath        same as $Conf{SshPath}
1135 #        $argList        argument list, built from $Conf{RsyncArgs},
1136 #                        $shareName, $Conf{BackupFilesExclude} and
1137 #                        $Conf{BackupFilesOnly}
1138 #
1139 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1140 #
1141 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1142
1143 #
1144 # Share name to backup.  For $Conf{XferMethod} = "rsync" this should
1145 # be a file system path, eg '/' or '/home'.
1146 #
1147 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
1148 # to backup (ie: the name from /etc/rsynd.conf).
1149 #
1150 # This can also be a list of multiple file system paths or modules.
1151 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
1152 # can backup each file system separately, which makes restoring one
1153 # bad file system easier.  In this case you would list all of the mount
1154 # points:
1155 #
1156 #     $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
1157 #
1158 $Conf{RsyncShareName} = '/';
1159
1160 #
1161 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
1162 #
1163 $Conf{RsyncdClientPort} = 873;
1164
1165 #
1166 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1167 # The user name and password are stored on the client in whatever file
1168 # the "secrets file" parameter in rsyncd.conf points to
1169 # (eg: /etc/rsyncd.secrets).
1170 #
1171 $Conf{RsyncdUserName} = '';
1172
1173 #
1174 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1175 # The user name and password are stored on the client in whatever file
1176 # the "secrets file" parameter in rsyncd.conf points to
1177 # (eg: /etc/rsyncd.secrets).
1178 #
1179 $Conf{RsyncdPasswd} = '';
1180
1181 #
1182 # Whether authentication is mandatory when connecting to the client's
1183 # rsyncd.  By default this is on, ensuring that BackupPC will refuse to
1184 # connect to an rsyncd on the client that is not password protected.
1185 # Turn off at your own risk.
1186 #
1187 $Conf{RsyncdAuthRequired} = 1;
1188
1189 #
1190 # When rsync checksum caching is enabled (by adding the
1191 # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
1192 # checksums can be occasionally verified to make sure the file
1193 # contents matches the cached checksums.  This is to avoid the
1194 # risk that disk problems might cause the pool file contents to
1195 # get corrupted, but the cached checksums would make BackupPC
1196 # think that the file still matches the client.
1197 #
1198 # This setting is the probability (0 means never and 1 means always)
1199 # that a file will be rechecked.  Setting it to 0 means the checksums
1200 # will not be rechecked (unless there is a phase 0 failure).  Setting
1201 # it to 1 (ie: 100%) means all files will be checked, but that is
1202 # not a desirable setting since you are better off simply turning
1203 # caching off (ie: remove the --checksum-seed option).
1204 #   
1205 # The default of 0.01 means 1% (on average) of the files during a full
1206 # backup will have their cached checksum re-checked.
1207 #   
1208 # This setting has no effect unless checksum caching is turned on.
1209 #   
1210 $Conf{RsyncCsumCacheVerifyProb} = 0.01;
1211
1212 #
1213 # Arguments to rsync for backup.  Do not edit the first set unless you
1214 # have a thorough understanding of how File::RsyncP works.
1215 #
1216 # Examples of additional arguments that should work are --exclude/--include,
1217 # eg:
1218 #
1219 #     $Conf{RsyncArgs} = [
1220 #           # original arguments here
1221 #           '-v',
1222 #           '--exclude', '/proc',
1223 #           '--exclude', '*.tmp',
1224 #     ];
1225 #
1226 $Conf{RsyncArgs} = [
1227             #
1228             # Do not edit these!
1229             #
1230             '--numeric-ids',
1231             '--perms',
1232             '--owner',
1233             '--group',
1234             '-D',
1235             '--links',
1236             '--hard-links',
1237             '--times',
1238             '--block-size=2048',
1239             '--recursive',
1240
1241             #
1242             # Rsync >= 2.6.3 supports the --checksum-seed option
1243             # which allows rsync checksum caching on the server.
1244             # Uncomment this to enable rsync checksum caching if
1245             # you have a recent client rsync version and you want
1246             # to enable checksum caching.
1247             #
1248             #'--checksum-seed=32761',
1249
1250             #
1251             # Add additional arguments here
1252             #
1253 ];
1254
1255 #
1256 # Arguments to rsync for restore.  Do not edit the first set unless you
1257 # have a thorough understanding of how File::RsyncP works.
1258 #
1259 # If you want to disable direct restores using rsync (eg: is the module
1260 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1261 # the corresponding CGI restore option will be removed.
1262 #
1263 $Conf{RsyncRestoreArgs} = [
1264             #
1265             # Do not edit these!
1266             #
1267             '--numeric-ids',
1268             '--perms',
1269             '--owner',
1270             '--group',
1271             '-D',
1272             '--links',
1273             '--hard-links',
1274             '--times',
1275             '--block-size=2048',
1276             '--relative',
1277             '--ignore-times',
1278             '--recursive',
1279
1280             #
1281             # Rsync >= 2.6.3 supports the --checksum-seed option
1282             # which allows rsync checksum caching on the server.
1283             # Uncomment this to enable rsync checksum caching if
1284             # you have a recent client rsync version and you want
1285             # to enable checksum caching.
1286             #
1287             #'--checksum-seed=32761',
1288
1289             #
1290             # Add additional arguments here
1291             #
1292 ];
1293
1294 #
1295 # Share name to backup.  For $Conf{XferMethod} = "backuppcd" this should
1296 # be a file system path, eg '/' or '/home'.
1297 #
1298 # This can also be a list of multiple file system paths or modules.
1299 # (Can it??)
1300 #
1301 #     $Conf{BackupPCdShareName} = ['/', '/var', '/data', '/boot'];
1302 #
1303 $Conf{BackupPCdShareName} = '/';
1304
1305 #
1306 # Path to backuppcd executable on the server
1307 #
1308 $Conf{BackupPCdPath} = '';
1309
1310 #
1311 # Full command to run backuppcd on the server to backup a given
1312 # client machine.  The following variables are substituted at
1313 # run-time (TODO: update this list)
1314 #
1315 #        $host           host name being backed up
1316 #        $hostIP         host's IP address
1317 #        $shareName      share name to backup (ie: top-level directory path)
1318 #        $backuppcdPath  same as $Conf{BackupPCdPath}
1319 #        $sshPath        same as $Conf{SshPath}
1320 #
1321 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1322 #
1323 # Arguments to backupcpd are:
1324 #
1325 #   - the host name to backup
1326 #   - the share name to backup
1327 #   - the directory where the pool is
1328 #   - the directory where the last run was (NOT DONE YET)
1329 #   - a boolean value indicating whether or not the pool is
1330 #      compressed or not
1331 #   - the directory where the new run should occur (currently it assumes ".")
1332 #
1333 $Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
1334
1335 #
1336 # Full command to run backuppcd on the server for restore to a
1337 # client machine.  The following variables are substituted at
1338 # run-time (TODO: update this list)
1339 #
1340 #        $host           host name being backed up
1341 #        $hostIP         host's IP address
1342 #        $shareName      share name to backup (ie: top-level directory path)
1343 #        $backuppcdPath  same as $Conf{BackupPCdPath}
1344 #        $sshPath        same as $Conf{SshPath}
1345 #
1346 # This setting only matters if $Conf{XferMethod} = 'backuppcd'.
1347 #
1348 $Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
1349
1350
1351 #
1352 # Archive Destination
1353 #
1354 # The Destination of the archive
1355 # e.g. /tmp for file archive or /dev/nst0 for device archive
1356 #
1357 $Conf{ArchiveDest} = '/tmp';
1358
1359 #
1360 # Archive Compression type
1361 #
1362 # The valid values are:
1363 #
1364 #   - 'none':  No Compression
1365 #
1366 #   - 'gzip':  Medium Compression. Recommended.
1367 #
1368 #   - 'bzip2': High Compression but takes longer.
1369 #
1370 $Conf{ArchiveComp} = 'gzip';
1371
1372 #
1373 # Archive Parity Files
1374 #
1375 # The amount of Parity data to generate, as a percentage
1376 # of the archive size.
1377 # Uses the commandline par2 (par2cmdline) available from
1378 # http://parchive.sourceforge.net
1379 #
1380 # Only useful for file dumps.
1381 #
1382 # Set to 0 to disable this feature.
1383 #
1384 $Conf{ArchivePar} = 0;
1385
1386 #
1387 # Archive Size Split
1388 #
1389 # Only for file archives. Splits the output into 
1390 # the specified size * 1,000,000.
1391 # e.g. to split into 650,000,000 bytes, specify 650 below.
1392
1393 # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
1394 # device (e.g. a streaming tape drive), this feature is disabled.
1395 #
1396 $Conf{ArchiveSplit} = 0;
1397
1398 #
1399 # Archive Command
1400 #
1401 # This is the command that is called to actually run the archive process
1402 # for each host.  The following variables are substituted at run-time:
1403 #
1404 #   $Installdir    The installation directory of BackupPC
1405 #   $tarCreatePath The path to BackupPC_tarCreate
1406 #   $splitpath     The path to the split program
1407 #   $parpath       The path to the par2 program
1408 #   $host          The host to archive
1409 #   $backupnumber  The backup number of the host to archive
1410 #   $compression   The path to the compression program
1411 #   $compext       The extension assigned to the compression type
1412 #   $splitsize     The number of bytes to split archives into
1413 #   $archiveloc    The location to put the archive
1414 #   $parfile       The amount of parity data to create (percentage)
1415 #
1416 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1417         . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1418         . ' $compression $compext $splitsize $archiveloc $parfile *';
1419
1420 #
1421 # Full path for ssh. Security caution: normal users should not
1422 # allowed to write to this file or directory.
1423 #
1424 $Conf{SshPath} = '';
1425
1426 #
1427 # Full path for nmblookup. Security caution: normal users should not
1428 # allowed to write to this file or directory.
1429 #
1430 # nmblookup is from the Samba distribution. nmblookup is used to get the
1431 # netbios name, necessary for DHCP hosts.
1432 #
1433 $Conf{NmbLookupPath} = '';
1434
1435 #
1436 # NmbLookup command.  Given an IP address, does an nmblookup on that
1437 # IP address.  The following variables are substituted at run-time:
1438 #
1439 #   $nmbLookupPath      path to nmblookup ($Conf{NmbLookupPath})
1440 #   $host               IP address
1441 #
1442 # This command is only used for DHCP hosts: given an IP address, this
1443 # command should try to find its NetBios name.
1444 #
1445 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1446
1447 #
1448 # NmbLookup command.  Given a netbios name, finds that host by doing
1449 # a NetBios lookup.  Several variables are substituted at run-time:
1450 #
1451 #   $nmbLookupPath      path to nmblookup ($Conf{NmbLookupPath})
1452 #   $host               NetBios name
1453 #
1454 # In some cases you might need to change the broadcast address, for
1455 # example if nmblookup uses 192.168.255.255 by default and you find
1456 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1457 # address) using the -B option:
1458 #
1459 #    $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1460 #
1461 # If you use a WINS server and your machines don't respond to
1462 # multicast NetBios requests you can use this (replace 1.2.3.4
1463 # with the IP address of your WINS server):
1464 #
1465 #    $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1466 #
1467 # This is preferred over multicast since it minimizes network traffic.
1468 #
1469 # Experiment manually for your site to see what form of nmblookup command
1470 # works.
1471 #
1472 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1473
1474 #
1475 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1476 # name to ensure it matches the host name.  An error is generated if
1477 # they do not match.  Typically this flag is off.  But if you are going
1478 # to transition a bunch of machines from fixed host addresses to DHCP,
1479 # setting this flag is a great way to verify that the machines have
1480 # their netbios name set correctly before turning on DCHP.
1481 #
1482 $Conf{FixedIPNetBiosNameCheck} = 0;
1483
1484 #
1485 # Full path to the ping command.  Security caution: normal users
1486 # should not be allowed to write to this file or directory.
1487 #
1488 # If you want to disable ping checking, set this to some program
1489 # that exits with 0 status, eg:
1490 #
1491 #     $Conf{PingPath} = '/bin/echo';
1492 #
1493 $Conf{PingPath} = '';
1494
1495 #
1496 # Ping command.  The following variables are substituted at run-time:
1497 #
1498 #   $pingPath      path to ping ($Conf{PingPath})
1499 #   $host          host name
1500 #
1501 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1502 # exit status (0 even on failure).  Replace with "ping $host 1", which
1503 # gets the correct exit status but we don't get the round-trip time.
1504 #
1505 $Conf{PingCmd} = '$pingPath -c 1 $host';
1506
1507 #
1508 # Maximum round-trip ping time in milliseconds.  This threshold is set
1509 # to avoid backing up PCs that are remotely connected through WAN or
1510 # dialup connections.  The output from ping -s (assuming it is supported
1511 # on your system) is used to check the round-trip packet time.  On your
1512 # local LAN round-trip times should be much less than 20msec.  On most
1513 # WAN or dialup connections the round-trip time will be typically more
1514 # than 20msec.  Tune if necessary.
1515 #
1516 $Conf{PingMaxMsec} = 20;
1517
1518 #
1519 # Compression level to use on files.  0 means no compression.  Compression
1520 # levels can be from 1 (least cpu time, slightly worse compression) to
1521 # 9 (most cpu time, slightly better compression).  The recommended value
1522 # is 3.  Changing to 5, for example, will take maybe 20% more cpu time
1523 # and will get another 2-3% additional compression. See the zlib
1524 # documentation for more information about compression levels.
1525 #
1526 # Changing compression on or off after backups have already been done
1527 # will require both compressed and uncompressed pool files to be stored.
1528 # This will increase the pool storage requirements, at least until all
1529 # the old backups expire and are deleted.
1530 #
1531 # It is ok to change the compression value (from one non-zero value to
1532 # another non-zero value) after dumps are already done.  Since BackupPC
1533 # matches pool files by comparing the uncompressed versions, it will still
1534 # correctly match new incoming files against existing pool files.  The
1535 # new compression level will take effect only for new files that are
1536 # newly compressed and added to the pool.
1537 #
1538 # If compression was off and you are enabling compression for the first
1539 # time you can use the BackupPC_compressPool utility to compress the
1540 # pool.  This avoids having the pool grow to accommodate both compressed
1541 # and uncompressed backups.  See the documentation for more information.
1542 #
1543 # Note: compression needs the Compress::Zlib perl library.  If the
1544 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1545 # forced to 0 (compression off).
1546 #
1547 $Conf{CompressLevel} = 0;
1548
1549 #
1550 # Timeout in seconds when listening for the transport program's
1551 # (smbclient, tar etc) stdout. If no output is received during this
1552 # time, then it is assumed that something has wedged during a backup,
1553 # and the backup is terminated.
1554 #
1555 # Note that stdout buffering combined with huge files being backed up
1556 # could cause longish delays in the output from smbclient that
1557 # BackupPC_dump sees, so in rare cases you might want to increase
1558 # this value.
1559 #
1560 # Despite the name, this parameter sets the timeout for all transport
1561 # methods (tar, smb etc).
1562 #
1563 $Conf{ClientTimeout} = 72000;
1564
1565 #
1566 # Maximum number of log files we keep around in each PC's directory
1567 # (ie: pc/$host).  These files are aged monthly.  A setting of 12
1568 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1569 # in the pc/$host directory (ie: about a years worth).  (Except this
1570 # month's LOG, these files will have a .z extension if compression
1571 # is on).
1572 #
1573 # If you decrease this number after BackupPC has been running for a
1574 # while you will have to manually remove the older log files.
1575 #
1576 $Conf{MaxOldPerPCLogFiles} = 12;
1577
1578 #
1579 # Optional commands to run before and after dumps and restores,
1580 # and also before and after each share of a dump.
1581 #
1582 # Stdout from these commands will be written to the Xfer (or Restore)
1583 # log file.  One example of using these commands would be to
1584 # shut down and restart a database server, dump a database
1585 # to files for backup, or doing a snapshot of a share prior
1586 # to a backup.  Example:
1587 #
1588 #    $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1589 #
1590 # The following variable substitutions are made at run time for
1591 # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
1592 # and $Conf{DumpPostShareCmd}:
1593 #
1594 #        $type         type of dump (incr or full)
1595 #        $xferOK       1 if the dump succeeded, 0 if it didn't
1596 #        $client       client name being backed up
1597 #        $host         host name (could be different from client name if
1598 #                                 $Conf{ClientNameAlias} is set)
1599 #        $hostIP       IP address of host
1600 #        $user         user name from the hosts file
1601 #        $moreUsers    list of additional users from the hosts file
1602 #        $share        the first share name (or current share for
1603 #                        $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
1604 #        $shares       list of all the share names
1605 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1606 #        $sshPath      value of $Conf{SshPath},
1607 #        $cmdType      set to DumpPreUserCmd or DumpPostUserCmd
1608 #
1609 # The following variable substitutions are made at run time for
1610 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1611 #
1612 #        $client       client name being backed up
1613 #        $xferOK       1 if the restore succeeded, 0 if it didn't
1614 #        $host         host name (could be different from client name if
1615 #                                 $Conf{ClientNameAlias} is set)
1616 #        $hostIP       IP address of host
1617 #        $user         user name from the hosts file
1618 #        $moreUsers    list of additional users from the hosts file
1619 #        $share        the first share name
1620 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1621 #        $sshPath      value of $Conf{SshPath},
1622 #        $type         set to "restore"
1623 #        $bkupSrcHost  host name of the restore source
1624 #        $bkupSrcShare share name of the restore source
1625 #        $bkupSrcNum   backup number of the restore source
1626 #        $pathHdrSrc   common starting path of restore source
1627 #        $pathHdrDest  common starting path of destination
1628 #        $fileList     list of files being restored
1629 #        $cmdType      set to RestorePreUserCmd or RestorePostUserCmd
1630 #
1631 # The following variable substitutions are made at run time for
1632 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1633 #
1634 #        $client       client name being backed up
1635 #        $xferOK       1 if the archive succeeded, 0 if it didn't
1636 #        $host         Name of the archive host
1637 #        $user         user name from the hosts file
1638 #        $share        the first share name
1639 #        $XferMethod   value of $Conf{XferMethod} (eg: tar, rsync, smb)
1640 #        $HostList     list of hosts being archived
1641 #        $BackupList   list of backup numbers for the hosts being archived
1642 #        $archiveloc   location where the archive is sent to
1643 #        $parfile      amount of parity data being generated (percentage)
1644 #        $compression  compression program being used (eg: cat, gzip, bzip2)
1645 #        $compext      extension used for compression type (eg: raw, gz, bz2)
1646 #        $splitsize    size of the files that the archive creates
1647 #        $sshPath      value of $Conf{SshPath},
1648 #        $type         set to "archive"
1649 #        $cmdType      set to ArchivePreUserCmd or ArchivePostUserCmd
1650 #
1651 $Conf{DumpPreUserCmd}     = undef;
1652 $Conf{DumpPostUserCmd}    = undef;
1653 $Conf{DumpPreShareCmd}    = undef;
1654 $Conf{DumpPostShareCmd}   = undef;
1655 $Conf{RestorePreUserCmd}  = undef;
1656 $Conf{RestorePostUserCmd} = undef;
1657 $Conf{ArchivePreUserCmd}  = undef;
1658 $Conf{ArchivePostUserCmd} = undef;
1659
1660 #
1661 # Whether the exit status of each PreUserCmd and
1662 # PostUserCmd is checked.
1663 #
1664 # If set and the Dump/Restore/Archive Pre/Post UserCmd
1665 # returns a non-zero exit status then the dump/restore/archive
1666 # is aborted.  To maintain backward compatibility (where
1667 # the exit status in early versions was always ignored),
1668 # this flag defaults to 0.
1669 #
1670 # If this flag is set and the Dump/Restore/Archive PreUserCmd
1671 # fails then the matching Dump/Restore/Archive PostUserCmd is
1672 # not executed.  If DumpPreShareCmd returns a non-exit status,
1673 # then DumpPostShareCmd is not executed, but the DumpPostUserCmd
1674 # is still run (since DumpPreUserCmd must have previously
1675 # succeeded).
1676 #
1677 # An example of a DumpPreUserCmd that might fail is a script
1678 # that snapshots or dumps a database which fails because
1679 # of some database error.
1680 #
1681 $Conf{UserCmdCheckStatus} = 0;
1682
1683 #
1684 # Override the client's host name.  This allows multiple clients
1685 # to all refer to the same physical host.  This should only be
1686 # set in the per-PC config file and is only used by BackupPC at
1687 # the last moment prior to generating the command used to backup
1688 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1689 # everywhere else in BackupPC).  The setting can be a host name or
1690 # IP address, eg:
1691 #
1692 #         $Conf{ClientNameAlias} = 'realHostName';
1693 #         $Conf{ClientNameAlias} = '192.1.1.15';
1694 #
1695 # will cause the relevant smb/tar/rsync backup/restore commands to be
1696 # directed to realHostName, not the client name.
1697 #
1698 # Note: this setting doesn't work for hosts with DHCP set to 1.
1699 #
1700 $Conf{ClientNameAlias} = undef;
1701
1702 ###########################################################################
1703 # Email reminders, status and messages
1704 # (can be overridden in the per-PC config.pl)
1705 ###########################################################################
1706 #
1707 # Full path to the sendmail command.  Security caution: normal users
1708 # should not allowed to write to this file or directory.
1709 #
1710 $Conf{SendmailPath} = '';
1711
1712 #
1713 # Minimum period between consecutive emails to a single user.
1714 # This tries to keep annoying email to users to a reasonable
1715 # level.  Email checks are done nightly, so this number is effectively
1716 # rounded up (ie: 2.5 means a user will never receive email more
1717 # than once every 3 days).
1718 #
1719 $Conf{EMailNotifyMinDays} = 2.5;
1720
1721 #
1722 # Name to use as the "from" name for email.  Depending upon your mail
1723 # handler this is either a plain name (eg: "admin") or a fully-qualified
1724 # name (eg: "admin@mydomain.com").
1725 #
1726 $Conf{EMailFromUserName} = '';
1727
1728 #
1729 # Destination address to an administrative user who will receive a
1730 # nightly email with warnings and errors.  If there are no warnings
1731 # or errors then no email will be sent.  Depending upon your mail
1732 # handler this is either a plain name (eg: "admin") or a fully-qualified
1733 # name (eg: "admin@mydomain.com").
1734 #
1735 $Conf{EMailAdminUserName} = '';
1736
1737 #
1738 # Destination domain name for email sent to users.  By default
1739 # this is empty, meaning email is sent to plain, unqualified
1740 # addresses.  Otherwise, set it to the destintation domain, eg:
1741 #
1742 #    $Cong{EMailUserDestDomain} = '@mydomain.com';
1743 #
1744 # With this setting user email will be set to 'user@mydomain.com'.
1745 #
1746 $Conf{EMailUserDestDomain} = '';
1747
1748 #
1749 # This subject and message is sent to a user if their PC has never been
1750 # backed up.
1751 #
1752 # These values are language-dependent.  The default versions can be
1753 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1754 # need to change the message, copy it here and edit it, eg:
1755 #
1756 #   $Conf{EMailNoBackupEverMesg} = <<'EOF';
1757 #   To: $user$domain
1758 #   cc:
1759 #   Subject: $subj
1760 #   
1761 #   Dear $userName,
1762 #   
1763 #   This is a site-specific email message.
1764 #   EOF
1765 #
1766 $Conf{EMailNoBackupEverSubj} = undef;
1767 $Conf{EMailNoBackupEverMesg} = undef;
1768
1769 #
1770 # How old the most recent backup has to be before notifying user.
1771 # When there have been no backups in this number of days the user
1772 # is sent an email.
1773 #
1774 $Conf{EMailNotifyOldBackupDays} = 7.0;
1775
1776 #
1777 # This subject and message is sent to a user if their PC has not recently
1778 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1779 #
1780 # These values are language-dependent.  The default versions can be
1781 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1782 # need to change the message, copy it here and edit it, eg:
1783 #
1784 #   $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1785 #   To: $user$domain
1786 #   cc:
1787 #   Subject: $subj
1788 #   
1789 #   Dear $userName,
1790 #   
1791 #   This is a site-specific email message.
1792 #   EOF
1793 #
1794 $Conf{EMailNoBackupRecentSubj} = undef;
1795 $Conf{EMailNoBackupRecentMesg} = undef;
1796
1797 #
1798 # How old the most recent backup of Outlook files has to be before
1799 # notifying user.
1800 #
1801 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1802
1803 #
1804 # This subject and message is sent to a user if their Outlook files have
1805 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1806 # days ago).
1807 #
1808 # These values are language-dependent.  The default versions can be
1809 # found in the language file (eg: lib/BackupPC/Lang/en.pm).  If you
1810 # need to change the message, copy it here and edit it, eg:
1811 #
1812 #   $Conf{EMailOutlookBackupMesg} = <<'EOF';
1813 #   To: $user$domain
1814 #   cc:
1815 #   Subject: $subj
1816 #   
1817 #   Dear $userName,
1818 #   
1819 #   This is a site-specific email message.
1820 #   EOF
1821 #
1822 $Conf{EMailOutlookBackupSubj} = undef;
1823 $Conf{EMailOutlookBackupMesg} = undef;
1824
1825 #
1826 # Additional email headers.  If you change the charset
1827 # to utf8 then BackupPC_sendEmail will use utf8 for
1828 # the email body.
1829 #
1830 $Conf{EMailHeaders} = <<EOF;
1831 MIME-Version: 1.0
1832 Content-Type: text/plain; charset="iso-8859-1"
1833 EOF
1834
1835 ###########################################################################
1836 # CGI user interface configuration settings
1837 # (can be overridden in the per-PC config.pl)
1838 ###########################################################################
1839 #
1840 # Normal users can only access information specific to their host.
1841 # They can start/stop/browse/restore backups.
1842 #
1843 # Administrative users have full access to all hosts, plus overall
1844 # status and log information.
1845 #
1846 # The administrative users are the union of the unix/linux group
1847 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
1848 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
1849 # manual list of users set the corresponding configuration setting
1850 # to undef or an empty string.
1851 #
1852 # If you want every user to have admin privileges (careful!), set
1853 # $Conf{CgiAdminUsers} = '*'.
1854 #
1855 # Examples:
1856 #    $Conf{CgiAdminUserGroup} = 'admin';
1857 #    $Conf{CgiAdminUsers}     = 'craig celia';
1858 #    --> administrative users are the union of group admin, plus
1859 #      craig and celia.
1860 #
1861 #    $Conf{CgiAdminUserGroup} = '';
1862 #    $Conf{CgiAdminUsers}     = 'craig celia';
1863 #    --> administrative users are only craig and celia'.
1864 #
1865 $Conf{CgiAdminUserGroup} = '';
1866 $Conf{CgiAdminUsers}     = '';
1867
1868 #
1869 # URL of the BackupPC_Admin CGI script.  Used for email messages.
1870 #
1871 $Conf{CgiURL} = undef;
1872
1873 #   
1874 # Language to use.  See lib/BackupPC/Lang for the list of supported
1875 # languages, which include English (en), French (fr), Spanish (es),
1876 # German (de), Italian (it), Dutch (nl), Polish (pl), Portuguese
1877 # Brazillian (pt_br) and Chinese (zh_CH).
1878 #
1879 # Currently the Language setting applies to the CGI interface and email
1880 # messages sent to users.  Log files and other text are still in English.
1881 #
1882 $Conf{Language} = 'en';
1883
1884 #
1885 # User names that are rendered by the CGI interface can be turned
1886 # into links into their home page or other information about the
1887 # user.  To set this up you need to create two sprintf() strings,
1888 # that each contain a single '%s' that will be replaced by the user
1889 # name.  The default is a mailto: link.
1890 #
1891 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
1892 # is used to check (via "-f") that the user has a valid home page.
1893 # Set this to undef or an empty string to turn off this check.
1894 #
1895 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
1896 # user's home page.  Set this to undef or an empty string to turn
1897 # off generation of URLs for user names.
1898 #
1899 # Example:
1900 #    $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
1901 #    $Conf{CgiUserUrlCreate}     = 'http://myhost/users/%s.html';
1902 #    --> if /var/www/html/users/craig.html exists, then 'craig' will
1903 #      be rendered as a link to http://myhost/users/craig.html.
1904 #
1905 $Conf{CgiUserHomePageCheck} = '';
1906 $Conf{CgiUserUrlCreate}     = 'mailto:%s';
1907
1908 #
1909 # Date display format for CGI interface.  A value of 1 uses US-style
1910 # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
1911 # for international dates (DD/MM).
1912 #
1913 $Conf{CgiDateFormatMMDD} = 1;
1914
1915 #
1916 # If set, the complete list of hosts appears in the left navigation
1917 # bar pull-down for administrators.  Otherwise, just the hosts for which
1918 # the user is listed in the host file (as either the user or in moreUsers)
1919 # are displayed.
1920 #
1921 $Conf{CgiNavBarAdminAllHosts} = 1;
1922
1923 #
1924 # Enable/disable the search box in the navigation bar.
1925 #
1926 $Conf{CgiSearchBoxEnable} = 1;
1927
1928 #
1929 # Additional navigation bar links.  These appear for both regular users
1930 # and administrators.  This is a list of hashes giving the link (URL)
1931 # and the text (name) for the link.  Specifying lname instead of name
1932 # uses the language specific string (ie: $Lang->{lname}) instead of
1933 # just literally displaying name.
1934 #
1935 $Conf{CgiNavBarLinks} = [
1936     {
1937         link  => "?action=view&type=docs",
1938         lname => "Documentation",    # actually displays $Lang->{Documentation}
1939     },
1940     {
1941         link  => "http://backuppc.sourceforge.net/faq",
1942         name  => "FAQ",              # displays literal "FAQ"
1943     },
1944     {
1945         link  => "http://backuppc.sourceforge.net",
1946         name  => "SourceForge",      # displays literal "SourceForge"
1947     },
1948 ];
1949
1950 #
1951 # Hilight colors based on status that are used in the PC summary page.
1952 #
1953 $Conf{CgiStatusHilightColor} = {
1954     Reason_backup_failed           => '#ffcccc',
1955     Reason_backup_done             => '#ccffcc',
1956     Reason_no_ping                 => '#ffff99',
1957     Reason_backup_canceled_by_user => '#ff9900',
1958     Status_backup_in_progress      => '#66cc99',
1959     Disabled_OnlyManualBackups     => '#d1d1d1',   
1960     Disabled_AllBackupsDisabled    => '#d1d1d1',          
1961 };
1962
1963 #
1964 # Additional CGI header text.
1965 #
1966 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
1967
1968 #
1969 # Directory where images are stored.  This directory should be below
1970 # Apache's DocumentRoot.  This value isn't used by BackupPC but is
1971 # used by configure.pl when you upgrade BackupPC.
1972 #
1973 # Example:
1974 #     $Conf{CgiImageDir} = '/usr/local/apache/htdocs/BackupPC';
1975 #
1976 $Conf{CgiImageDir} = '';
1977
1978 #
1979 # Additional mappings of file name extenions to Content-Type for
1980 # individual file restore.  See $Ext2ContentType in BackupPC_Admin
1981 # for the default setting.  You can add additional settings here,
1982 # or override any default settings.  Example:
1983 #
1984 #     $Conf{CgiExt2ContentType} = {
1985 #                 'pl'  => 'text/plain',
1986 #          };
1987 #
1988 $Conf{CgiExt2ContentType} = { };
1989
1990 #
1991 # URL (without the leading http://host) for BackupPC's image directory.
1992 # The CGI script uses this value to serve up image files.
1993 #
1994 # Example:
1995 #     $Conf{CgiImageDirURL} = '/BackupPC';
1996 #
1997 $Conf{CgiImageDirURL} = '';
1998
1999 #
2000 # CSS stylesheet "skin" for the CGI interface.  It is stored
2001 # in the $Conf{CgiImageDir} directory and accessed via the
2002 # $Conf{CgiImageDirURL} URL.
2003 #
2004 # For BackupPC v3.x several color, layout and font changes were made.
2005 # The previous v2.x version is available as BackupPC_stnd_orig.css, so
2006 # if you prefer the old skin, change this to BackupPC_stnd_orig.css.
2007 #
2008 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
2009
2010 #
2011 # Whether the user is allowed to edit their per-PC config.
2012 #
2013 $Conf{CgiUserConfigEditEnable} = 1;
2014
2015 #
2016 # Which per-host config variables a non-admin user is allowed
2017 # to edit.  Admin users can edit all per-host config variables,
2018 # even if disabled in this list.
2019 #
2020 # SECURITY WARNING: Do not let users edit any of the Cmd
2021 # config variables!  That's because a user could set a
2022 # Cmd to a shell script of their choice and it will be
2023 # run as the BackupPC user.  That script could do all
2024 # sorts of bad things.
2025 #
2026 $Conf{CgiUserConfigEdit} = {
2027         FullPeriod                => 1,
2028         IncrPeriod                => 1,
2029         FullKeepCnt               => 1,
2030         FullKeepCntMin            => 1,
2031         FullAgeMax                => 1,
2032         IncrKeepCnt               => 1,
2033         IncrKeepCntMin            => 1,
2034         IncrAgeMax                => 1,
2035         IncrLevels                => 1,
2036         IncrFill                  => 1,
2037         PartialAgeMax             => 1,
2038         RestoreInfoKeepCnt        => 1,
2039         ArchiveInfoKeepCnt        => 1,
2040         BackupFilesOnly           => 1,
2041         BackupFilesExclude        => 1,
2042         BackupsDisable            => 1,
2043         BlackoutBadPingLimit      => 1,
2044         BlackoutGoodCnt           => 1,
2045         BlackoutPeriods           => 1,
2046         BackupZeroFilesIsFatal    => 1,
2047         ClientCharset             => 1,
2048         ClientCharsetLegacy       => 1,
2049         XferMethod                => 1,
2050         XferLogLevel              => 1,
2051         SmbShareName              => 1,
2052         SmbShareUserName          => 1,
2053         SmbSharePasswd            => 1,
2054         SmbClientFullCmd          => 0,
2055         SmbClientIncrCmd          => 0,
2056         SmbClientRestoreCmd       => 0,
2057         TarShareName              => 1,
2058         TarFullArgs               => 1,
2059         TarIncrArgs               => 1,
2060         TarClientCmd              => 0,
2061         TarClientRestoreCmd       => 0,
2062         TarClientPath             => 0,
2063         RsyncShareName            => 1,
2064         RsyncdClientPort          => 1,
2065         RsyncdPasswd              => 1,
2066         RsyncdUserName            => 1,
2067         RsyncdAuthRequired        => 1,
2068         RsyncCsumCacheVerifyProb  => 1,
2069         RsyncArgs                 => 1,
2070         RsyncRestoreArgs          => 1,
2071         RsyncClientCmd            => 0,
2072         RsyncClientRestoreCmd     => 0,
2073         RsyncClientPath           => 0,
2074         ArchiveDest               => 1,
2075         ArchiveComp               => 1,
2076         ArchivePar                => 1,
2077         ArchiveSplit              => 1,
2078         ArchiveClientCmd          => 0,
2079         FixedIPNetBiosNameCheck   => 1,
2080         NmbLookupCmd              => 0,
2081         NmbLookupFindHostCmd      => 0,
2082         PingMaxMsec               => 1,
2083         PingCmd                   => 0,
2084         ClientTimeout             => 1,
2085         MaxOldPerPCLogFiles       => 1,
2086         CompressLevel             => 1,
2087         ClientNameAlias           => 1,
2088         DumpPreUserCmd            => 0,
2089         DumpPostUserCmd           => 0,
2090         RestorePreUserCmd         => 0,
2091         RestorePostUserCmd        => 0,
2092         ArchivePreUserCmd         => 0,
2093         ArchivePostUserCmd        => 0,
2094         DumpPostShareCmd          => 0,
2095         DumpPreShareCmd           => 0,
2096         UserCmdCheckStatus        => 0,
2097         EMailNotifyMinDays        => 1,
2098         EMailFromUserName         => 1,
2099         EMailAdminUserName        => 1,
2100         EMailUserDestDomain       => 1,
2101         EMailNoBackupEverSubj     => 1,
2102         EMailNoBackupEverMesg     => 1,
2103         EMailNotifyOldBackupDays  => 1,
2104         EMailNoBackupRecentSubj   => 1,
2105         EMailNoBackupRecentMesg   => 1,
2106         EMailNotifyOldOutlookDays => 1,
2107         EMailOutlookBackupSubj    => 1,
2108         EMailOutlookBackupMesg    => 1,
2109         EMailHeaders              => 1,
2110 };