/[BackupPC]/upstream/2.1.0/conf/config.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/2.1.0/conf/config.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Wed Jun 22 19:12:04 2005 UTC (16 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 63983 byte(s)
import of version 2.1.0

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

  ViewVC Help
Powered by ViewVC 1.1.26