1 #============================================================= -*-perl-*-
3 # Configuration file for BackupPC.
7 # This is the main configuration file for BackupPC.
9 # This file must be valid perl source, so make sure the punctuation,
10 # quotes, and other syntax are valid.
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.
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.
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.
29 # Craig Barratt <cbarratt@users.sourceforge.net>
32 # Copyright (C) 2001-2009 Craig Barratt
34 # See http://backuppc.sourceforge.net.
36 #========================================================================
38 ###########################################################################
39 # General server configuration
40 ###########################################################################
42 # Host name on which the BackupPC server is running.
44 $Conf{ServerHost} = '';
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}
54 $Conf{ServerPort} = -1;
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).
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
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.
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
75 $Conf{ServerMesgSecret} = '';
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.
83 $Conf{MyPath} = '/bin';
86 # Permission mask for directories and files created by BackupPC.
87 # Default value prevents any access from group other, and prevents
90 $Conf{UmaskMode} = 027;
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).
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.
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
108 # The default value is every hour except midnight.
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).
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];
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.
123 $Conf{MaxBackups} = 4;
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.
130 $Conf{MaxUserBackups} = 4;
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.
139 $Conf{MaxPendingCmds} = 15;
142 # Nice level at which CmdQueue commands (eg: BackupPC_link and
143 # BackupPC_nightly) are run at.
145 $Conf{CmdQueueNice} = 10;
148 # How many BackupPC_nightly processes to run in parallel.
150 # Each night, at the first wakeup listed in $Conf{WakeupSchedule},
151 # BackupPC_nightly is run. Its job is to remove unneeded files
152 # in the pool, ie: files that only have one link. To avoid race
153 # conditions, BackupPC_nightly and BackupPC_link cannot run at
154 # the same time. Starting in v3.0.0, BackupPC_nightly can run
155 # concurrently with backups (BackupPC_dump).
157 # So to reduce the elapsed time, you might want to increase this
158 # setting to run several BackupPC_nightly processes in parallel
159 # (eg: 4, or even 8).
161 $Conf{MaxBackupPCNightlyJobs} = 2;
164 # How many days (runs) it takes BackupPC_nightly to traverse the
165 # entire pool. Normally this is 1, which means every night it runs,
166 # it does traverse the entire pool removing unused pool files.
168 # Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
169 # traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
170 # takes 2, 4, 8 or 16 days to completely traverse the pool. The
171 # advantage is that each night the running time of BackupPC_nightly
172 # is reduced roughly in proportion, since the total job is split
173 # over multiple days. The disadvantage is that unused pool files
174 # take longer to get deleted, which will slightly increase disk
177 # Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly
178 # still runs every night. It just does less work each time it runs.
182 # $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night
184 # $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check
185 # # (different half each night)
187 # $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check
188 # # (different quarter each night)
190 $Conf{BackupPCNightlyPeriod} = 1;
193 # Maximum number of log files we keep around in log directory.
194 # These files are aged nightly. A setting of 14 means the log
195 # directory will contain about 2 weeks of old log files, in
196 # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
197 # (except today's LOG, these files will have a .z extension if
198 # compression is on).
200 # If you decrease this number after BackupPC has been running for a
201 # while you will have to manually remove the older log files.
203 $Conf{MaxOldLogFiles} = 14;
206 # Full path to the df command. Security caution: normal users
207 # should not allowed to write to this file or directory.
212 # Command to run df. The following variables are substituted at run-time:
214 # $dfPath path to df ($Conf{DfPath})
215 # $topDir top-level BackupPC data directory
217 # Note: all Cmds are executed directly without a shell, so the prog name
218 # needs to be a full path and you can't include shell syntax like
219 # redirection and pipes; put that in a script if you need it.
221 $Conf{DfCmd} = '$dfPath $topDir';
224 # Full path to various commands for archiving
226 $Conf{SplitPath} = '';
229 $Conf{GzipPath} = '';
230 $Conf{Bzip2Path} = '';
233 # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
234 # If the output from $Conf{DfPath} reports a percentage larger than
235 # this number then no new regularly scheduled backups will be run.
236 # However, user requested backups (which are usually incremental and
237 # tend to be small) are still performed, independent of disk usage.
238 # Also, currently running backups will not be terminated when the disk
239 # usage exceeds this number.
241 $Conf{DfMaxUsagePct} = 95;
244 # How long BackupPC_trashClean sleeps in seconds between each check
245 # of the trash directory. Once every 5 minutes should be reasonable.
247 $Conf{TrashCleanSleepSec} = 300;
250 # List of DHCP address ranges we search looking for PCs to backup.
251 # This is an array of hashes for each class C address range.
252 # This is only needed if hosts in the conf/hosts file have the
256 # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
257 # $Conf{DHCPAddressRanges} = [
259 # ipAddrBase => '192.10.10',
264 # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
265 # $Conf{DHCPAddressRanges} = [
267 # ipAddrBase => '192.10.10',
272 # ipAddrBase => '192.10.11',
278 $Conf{DHCPAddressRanges} = [];
283 $Conf{BackupPCUser} = '';
286 # Important installation directories:
288 # TopDir - where all the backup data is stored
289 # ConfDir - where the main config and hosts files resides
290 # LogDir - where log files and other transient information
291 # InstallDir - where the bin, lib and doc installation dirs reside.
292 # Note: you cannot change this value since all the
293 # perl scripts include this path. You must reinstall
294 # with configure.pl to change InstallDir.
295 # CgiDir - Apache CGI directory for BackupPC_Admin
297 # Note: it is STRONGLY recommended that you don't change the
298 # values here. These are set at installation time and are here
299 # for reference and are used during upgrades.
301 # Instead of changing TopDir here it is recommended that you use
302 # a symbolic link to the new location, or mount the new BackupPC
303 # store at the existing $Conf{TopDir} setting.
308 $Conf{InstallDir} = '';
312 # Whether BackupPC and the CGI script BackupPC_Admin verify that they
313 # are really running as user $Conf{BackupPCUser}. If this flag is set
314 # and the effective user id (euid) differs from $Conf{BackupPCUser}
315 # then both scripts exit with an error. This catches cases where
316 # BackupPC might be accidently started as root or the wrong user,
317 # or if the CGI script is not installed correctly.
319 $Conf{BackupPCUserVerify} = 1;
322 # Maximum number of hardlinks supported by the $TopDir file system
323 # that BackupPC uses. Most linux or unix file systems should support
324 # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
325 # file already has this number of hardlinks, a new pool file is created
326 # so that new hardlinks can be accommodated. This limit will only
327 # be hit if an identical file appears at least this number of times
328 # across all the backups.
330 $Conf{HardLinkMax} = 31999;
333 # Advanced option for asking BackupPC to load additional perl modules.
334 # Can be a list (array ref) of module names to load at startup.
336 $Conf{PerlModuleLoad} = undef;
339 # Path to init.d script and command to use that script to start the
340 # server from the CGI interface. The following variables are substituted
343 # $sshPath path to ssh ($Conf{SshPath})
344 # $serverHost same as $Conf{ServerHost}
345 # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
349 # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
350 # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
351 # . ' $serverInitdPath start'
352 # . ' < /dev/null >& /dev/null';
354 # Note: all Cmds are executed directly without a shell, so the prog name
355 # needs to be a full path and you can't include shell syntax like
356 # redirection and pipes; put that in a script if you need it.
358 $Conf{ServerInitdPath} = '';
359 $Conf{ServerInitdStartCmd} = '';
362 ###########################################################################
363 # What to backup and when to do it
364 # (can be overridden in the per-PC config.pl)
365 ###########################################################################
367 # Minimum period in days between full backups. A full dump will only be
368 # done if at least this much time has elapsed since the last full dump,
369 # and at least $Conf{IncrPeriod} days has elapsed since the last
372 # Typically this is set slightly less than an integer number of days. The
373 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
374 # will make the actual backup interval a bit longer.
376 $Conf{FullPeriod} = 6.97;
379 # Minimum period in days between incremental backups (a user requested
380 # incremental backup will be done anytime on demand).
382 # Typically this is set slightly less than an integer number of days. The
383 # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
384 # will make the actual backup interval a bit longer.
386 $Conf{IncrPeriod} = 0.97;
389 # Number of full backups to keep. Must be >= 1.
391 # In the steady state, each time a full backup completes successfully
392 # the oldest one is removed. If this number is decreased, the
393 # extra old backups will be removed.
395 # If filling of incremental dumps is off the oldest backup always
396 # has to be a full (ie: filled) dump. This might mean one or two
397 # extra full dumps are kept until the oldest incremental backups expire.
399 # Exponential backup expiry is also supported. This allows you to specify:
401 # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
402 # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
403 # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
404 # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
405 # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
407 # and so on. This works by deleting every other full as each expiry
408 # boundary is crossed.
410 # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
412 # $Conf{FullKeepCnt} = [4, 2, 3];
414 # Entry #n specifies how many fulls to keep at an interval of
415 # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
417 # The example above specifies keeping 4 of the most recent full backups
418 # (1 week interval) two full backups at 2 week intervals, and 3 full
419 # backups at 4 week intervals, eg:
421 # full 0 19 weeks old \
422 # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
423 # full 2 11 weeks old /
424 # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
425 # full 4 5 weeks old /
426 # full 5 3 weeks old \
427 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
428 # full 7 1 week old /
431 # On a given week the spacing might be less than shown as each backup
432 # ages through each expiry period. For example, one week later, a
433 # new full is completed and the oldest is deleted, giving:
435 # full 0 16 weeks old \
436 # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
437 # full 2 8 weeks old /
438 # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
439 # full 4 4 weeks old /
440 # full 5 3 weeks old \
441 # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
442 # full 7 1 week old /
445 # You can specify 0 as a count (except in the first entry), and the
446 # array can be as long as you wish. For example:
448 # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
450 # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
451 # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
452 # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
455 # Example: these two settings are equivalent and both keep just
456 # the four most recent full dumps:
458 # $Conf{FullKeepCnt} = 4;
459 # $Conf{FullKeepCnt} = [4];
461 $Conf{FullKeepCnt} = 1;
464 # Very old full backups are removed after $Conf{FullAgeMax} days. However,
465 # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
468 # Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
469 # times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
470 # full backups to exceed $Conf{FullAgeMax}.
472 $Conf{FullKeepCntMin} = 1;
473 $Conf{FullAgeMax} = 90;
476 # Number of incremental backups to keep. Must be >= 1.
478 # In the steady state, each time an incr backup completes successfully
479 # the oldest one is removed. If this number is decreased, the
480 # extra old backups will be removed.
482 $Conf{IncrKeepCnt} = 6;
485 # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
486 # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
487 # matter how old they are.
489 $Conf{IncrKeepCntMin} = 1;
490 $Conf{IncrAgeMax} = 30;
493 # Level of each incremental. "Level" follows the terminology
494 # of dump(1). A full backup has level 0. A new incremental
495 # of level N will backup all files that have changed since
496 # the most recent backup of a lower level.
498 # The entries of $Conf{IncrLevels} apply in order to each
499 # incremental after each full backup. It wraps around until
500 # the next full backup. For example, these two settings
501 # have the same effect:
503 # $Conf{IncrLevels} = [1, 2, 3];
504 # $Conf{IncrLevels} = [1, 2, 3, 1, 2, 3];
506 # This means the 1st and 4th incrementals (level 1) go all
507 # the way back to the full. The 2nd and 3rd (and 5th and
508 # 6th) backups just go back to the immediate preceeding
511 # Specifying a sequence of multi-level incrementals will
512 # usually mean more than $Conf{IncrKeepCnt} incrementals will
513 # need to be kept, since lower level incrementals are needed
514 # to merge a complete view of a backup. For example, with
516 # $Conf{FullPeriod} = 7;
517 # $Conf{IncrPeriod} = 1;
518 # $Conf{IncrKeepCnt} = 6;
519 # $Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
521 # there will be up to 11 incrementals in this case:
523 # backup #0 (full, level 0, oldest)
524 # backup #1 (incr, level 1)
525 # backup #2 (incr, level 2)
526 # backup #3 (incr, level 3)
527 # backup #4 (incr, level 4)
528 # backup #5 (incr, level 5)
529 # backup #6 (incr, level 6)
530 # backup #7 (full, level 0)
531 # backup #8 (incr, level 1)
532 # backup #9 (incr, level 2)
533 # backup #10 (incr, level 3)
534 # backup #11 (incr, level 4)
535 # backup #12 (incr, level 5, newest)
537 # Backup #1 (the oldest level 1 incremental) can't be deleted
538 # since backups 2..6 depend on it. Those 6 incrementals can't
539 # all be deleted since that would only leave 5 (#8..12).
540 # When the next incremental happens (level 6), the complete
541 # set of 6 older incrementals (#1..6) will be deleted, since
542 # that maintains the required number ($Conf{IncrKeepCnt})
543 # of incrementals. This situation is reduced if you set
544 # shorter chains of multi-level incrementals, eg:
546 # $Conf{IncrLevels} = [1, 2, 3];
548 # would only have up to 2 extra incremenals before all 3
551 # BackupPC as usual merges the full and the sequence
552 # of incrementals together so each incremental can be
553 # browsed and restored as though it is a complete backup.
554 # If you specify a long chain of incrementals then more
555 # backups need to be merged when browsing, restoring,
556 # or getting the starting point for rsync backups.
557 # In the example above (levels 1..6), browing backup
558 # #6 requires 7 different backups (#0..6) to be merged.
560 # Because of this merging and the additional incrementals
561 # that need to be kept, it is recommended that some
562 # level 1 incrementals be included in $Conf{IncrLevels}.
564 # Prior to version 3.0 incrementals were always level 1,
565 # meaning each incremental backed up all the files that
566 # changed since the last full.
568 $Conf{IncrLevels} = [1];
571 # Disable all full and incremental backups. These settings are
572 # useful for a client that is no longer being backed up
573 # (eg: a retired machine), but you wish to keep the last
574 # backups available for browsing or restoring to other machines.
576 # There are three values for $Conf{BackupsDisable}:
578 # 0 Backups are enabled.
580 # 1 Don't do any regular backups on this client. Manually
581 # requested backups (via the CGI interface) will still occur.
583 # 2 Don't do any backups on this client. Manually requested
584 # backups (via the CGI interface) will be ignored.
586 # In versions prior to 3.0 Backups were disabled by setting
587 # $Conf{FullPeriod} to -1 or -2.
589 $Conf{BackupsDisable} = 0;
592 # A failed full backup is saved as a partial backup. The rsync
593 # XferMethod can take advantage of the partial full when the next
594 # backup is run. This parameter sets the age of the partial full
595 # in days: if the partial backup is older than this number of
596 # days, then rsync will ignore (not use) the partial full when
597 # the next backup is run. If you set this to a negative value
598 # then no partials will be saved. If you set this to 0, partials
599 # will be saved, but will not be used by the next backup.
601 # The default setting of 3 days means that a partial older than
602 # 3 days is ignored when the next full backup is done.
604 $Conf{PartialAgeMax} = 3;
607 # Whether incremental backups are filled. "Filling" means that the
608 # most recent full (or filled) dump is merged into the new incremental
609 # dump using hardlinks. This makes an incremental dump look like a
610 # full dump. Prior to v1.03 all incremental backups were filled.
611 # In v1.4.0 and later the default is off.
613 # BackupPC, and the cgi interface in particular, do the right thing on
614 # un-filled incremental backups. It will correctly display the merged
615 # incremental backup with the most recent filled backup, giving the
616 # un-filled incremental backups a filled appearance. That means it
617 # invisible to the user whether incremental dumps are filled or not.
619 # Filling backups takes a little extra disk space, and it does cost
620 # some extra disk activity for filling, and later removal. Filling
621 # is no longer useful, since file mangling and compression doesn't
622 # make a filled backup very useful. It's likely the filling option
623 # will be removed from future versions: filling will be delegated to
624 # the display and extraction of backup data.
626 # If filling is off, BackupPC makes sure that the oldest backup is
627 # a full, otherwise the following incremental backups will be
628 # incomplete. This might mean an extra full backup has to be
629 # kept until the following incremental backups expire.
631 # The default is off. You can turn this on or off at any
632 # time without affecting existing backups.
637 # Number of restore logs to keep. BackupPC remembers information about
638 # each restore request. This number per client will be kept around before
639 # the oldest ones are pruned.
641 # Note: files/dirs delivered via Zip or Tar downloads don't count as
642 # restores. Only the first restore option (where the files and dirs
643 # are written to the host) count as restores that are logged.
645 $Conf{RestoreInfoKeepCnt} = 10;
648 # Number of archive logs to keep. BackupPC remembers information
649 # about each archive request. This number per archive client will
650 # be kept around before the oldest ones are pruned.
652 $Conf{ArchiveInfoKeepCnt} = 10;
655 # List of directories or files to backup. If this is defined, only these
656 # directories or files will be backed up.
658 # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
659 # can be specified per share. If both are set for a particular share, then
660 # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
663 # This can be set to a string, an array of strings, or, in the case
664 # of multiple shares, a hash of strings or arrays. A hash is used
665 # to give a list of directories or files to backup for each share
666 # (the share name is the key). If this is set to just a string or
667 # array, and $Conf{SmbShareName} contains multiple share names, then
668 # the setting is assumed to apply all shares.
670 # If a hash is used, a special key "*" means it applies to all
671 # shares that don't have a specific entry.
674 # $Conf{BackupFilesOnly} = '/myFiles';
675 # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
676 # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
677 # $Conf{BackupFilesOnly} = {
678 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
679 # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
681 # $Conf{BackupFilesOnly} = {
682 # 'c' => ['/myFiles', '/important'], # these are for 'c' share
683 # '*' => ['/myFiles', '/important'], # these are other shares
686 $Conf{BackupFilesOnly} = undef;
689 # List of directories or files to exclude from the backup. For Smb,
690 # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
691 # can be specified per share. If both are set for a particular share,
692 # then $Conf{BackupFilesOnly} takes precedence and
693 # $Conf{BackupFilesExclude} is ignored.
695 # This can be set to a string, an array of strings, or, in the case
696 # of multiple shares, a hash of strings or arrays. A hash is used
697 # to give a list of directories or files to exclude for each share
698 # (the share name is the key). If this is set to just a string or
699 # array, and $Conf{SmbShareName} contains multiple share names, then
700 # the setting is assumed to apply to all shares.
702 # The exact behavior is determined by the underlying transport program,
703 # smbclient or tar. For smbclient the exlclude file list is passed into
704 # the X option. Simple shell wild-cards using "*" or "?" are allowed.
706 # For tar, if the exclude file contains a "/" it is assumed to be anchored
707 # at the start of the string. Since all the tar paths start with "./",
708 # BackupPC prepends a "." if the exclude file starts with a "/". Note
709 # that GNU tar version >= 1.13.7 is required for the exclude option to
710 # work correctly. For linux or unix machines you should add
711 # "/proc" to $Conf{BackupFilesExclude} unless you have specified
712 # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
713 # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
714 # the directory name: a trailing "/" causes the name to not match
715 # and the directory will not be excluded.
717 # Users report that for smbclient you should specify a directory
718 # followed by "/*", eg: "/proc/*", instead of just "/proc".
720 # FTP servers are traversed recursively so excluding directories will
721 # also exclude its contents. You can use the wildcard characters "*"
722 # and "?" to define files for inclusion and exclusion. Both
723 # attributes $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude} can
724 # be defined for the same share.
726 # If a hash is used, a special key "*" means it applies to all
727 # shares that don't have a specific entry.
730 # $Conf{BackupFilesExclude} = '/temp';
731 # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
732 # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
733 # $Conf{BackupFilesExclude} = {
734 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
735 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
737 # $Conf{BackupFilesExclude} = {
738 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
739 # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
742 $Conf{BackupFilesExclude} = undef;
745 # PCs that are always or often on the network can be backed up after
746 # hours, to reduce PC, network and server load during working hours. For
747 # each PC a count of consecutive good pings is maintained. Once a PC has
748 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
749 # to "blackout" and not backed up during hours and days specified by
750 # $Conf{BlackoutPeriods}.
752 # To allow for periodic rebooting of a PC or other brief periods when a
753 # PC is not on the network, a number of consecutive bad pings is allowed
754 # before the good ping count is reset. This parameter is
755 # $Conf{BlackoutBadPingLimit}.
757 # Note that bad and good pings don't occur with the same interval. If a
758 # machine is always on the network, it will only be pinged roughly once
759 # every $Conf{IncrPeriod} (eg: once per day). So a setting for
760 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
761 # machine to be subject to blackout. On the other hand, if a ping is
762 # failed, it will be retried roughly every time BackupPC wakes up, eg,
763 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
764 # 3 means that the PC will lose its blackout status after 3-6 hours of
767 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
768 # value. A value of 0 will make all machines subject to blackout. But
769 # if you don't want to do any backups during the day it would be easier
770 # to just set $Conf{WakeupSchedule} to a restricted schedule.
772 $Conf{BlackoutBadPingLimit} = 3;
773 $Conf{BlackoutGoodCnt} = 7;
776 # One or more blackout periods can be specified. If a client is
777 # subject to blackout then no regular (non-manual) backups will
778 # be started during any of these periods. hourBegin and hourEnd
779 # specify hours fro midnight and weekDays is a list of days of
780 # the week where 0 is Sunday, 1 is Monday etc.
784 # $Conf{BlackoutPeriods} = [
788 # weekDays => [1, 2, 3, 4, 5],
792 # specifies one blackout period from 7:00am to 7:30pm local time
795 # The blackout period can also span midnight by setting
796 # hourBegin > hourEnd, eg:
798 # $Conf{BlackoutPeriods} = [
802 # weekDays => [1, 2, 3, 4, 5],
807 # weekDays => [5, 6],
811 # This specifies one blackout period from 7:00am to 7:30pm local time
812 # on Mon-Fri, and a second period from 11pm to 5am on Friday and
815 $Conf{BlackoutPeriods} = [
819 weekDays => [1, 2, 3, 4, 5],
824 # A backup of a share that has zero files is considered fatal. This is
825 # used to catch miscellaneous Xfer errors that result in no files being
826 # backed up. If you have shares that might be empty (and therefore an
827 # empty backup is valid) you should set this flag to 0.
829 $Conf{BackupZeroFilesIsFatal} = 1;
831 ###########################################################################
832 # How to backup a client
833 # (can be overridden in the per-PC config.pl)
834 ###########################################################################
836 # What transport method to use to backup each host. If you have
837 # a mixed set of WinXX and linux/unix hosts you will need to override
838 # this in the per-PC config.pl.
840 # The valid values are:
842 # - 'smb': backup and restore via smbclient and the SMB protocol.
843 # Easiest choice for WinXX.
845 # - 'rsync': backup and restore via rsync (via rsh or ssh).
846 # Best choice for linux/unix. Good choice also for WinXX.
848 # - 'rsyncd': backup and restore via rsync daemon on the client.
849 # Best choice for linux/unix if you have rsyncd running on
850 # the client. Good choice also for WinXX.
852 # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
853 # Good choice for linux/unix.
855 # - 'archive': host is a special archive host. Backups are not done.
856 # An archive host is used to archive other host's backups
857 # to permanent media, such as tape, CDR or DVD.
860 $Conf{XferMethod} = 'smb';
863 # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
864 # will give one line per file, 2 will also show skipped files on
865 # incrementals, higher values give more output.
867 $Conf{XferLogLevel} = 1;
870 # Filename charset encoding on the client. BackupPC uses utf8
871 # on the server for filename encoding. If this is empty, then
872 # utf8 is assumed and client filenames will not be modified.
873 # If set to a different encoding then filenames will converted
874 # to/from utf8 automatically during backup and restore.
876 # If the file names displayed in the browser (eg: accents or special
877 # characters) don't look right then it is likely you haven't set
878 # $Conf{ClientCharset} correctly.
880 # If you are using smbclient on a WinXX machine, smbclient will convert
881 # to the "unix charset" setting in smb.conf. The default is utf8,
882 # in which case leave $Conf{ClientCharset} empty since smbclient does
883 # the right conversion.
885 # If you are using rsync on a WinXX machine then it does no conversion.
886 # A typical WinXX encoding for latin1/western europe is 'cp1252',
887 # so in this case set $Conf{ClientCharset} to 'cp1252'.
889 # On a linux or unix client, run "locale charmap" to see the client's
890 # charset. Set $Conf{ClientCharset} to this value. A typical value
891 # for english/US is 'ISO-8859-1'.
893 # Do "perldoc Encode::Supported" to see the list of possible charset
894 # values. The FAQ at http://www.cl.cam.ac.uk/~mgk25/unicode.html
895 # is excellent, and http://czyborra.com/charsets/iso8859.html
896 # provides more information on the iso-8859 charsets.
898 $Conf{ClientCharset} = '';
901 # Prior to 3.x no charset conversion was done by BackupPC. Backups were
902 # stored in what ever charset the XferMethod provided - typically utf8
903 # for smbclient and the client's locale settings for rsync and tar (eg:
904 # cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux).
905 # This setting tells BackupPC the charset that was used to store file
906 # names in old backups taken with BackupPC 2.x, so that non-ascii file
907 # names in old backups can be viewed and restored.
909 $Conf{ClientCharsetLegacy} = 'iso-8859-1';
911 ###########################################################################
912 # Samba Configuration
913 # (can be overwritten in the per-PC log file)
914 ###########################################################################
916 # Name of the host share that is backed up when using SMB. This can be a
917 # string or an array of strings if there are multiple shares per host.
920 # $Conf{SmbShareName} = 'c'; # backup 'c' share
921 # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
923 # This setting only matters if $Conf{XferMethod} = 'smb'.
925 $Conf{SmbShareName} = 'C$';
928 # Smbclient share user name. This is passed to smbclient's -U argument.
930 # This setting only matters if $Conf{XferMethod} = 'smb'.
932 $Conf{SmbShareUserName} = '';
935 # Smbclient share password. This is passed to smbclient via its PASSWD
936 # environment variable. There are several ways you can tell BackupPC
937 # the smb share password. In each case you should be very careful about
938 # security. If you put the password here, make sure that this file is
939 # not readable by regular users! See the "Setting up config.pl" section
940 # in the documentation for more information.
942 # This setting only matters if $Conf{XferMethod} = 'smb'.
944 $Conf{SmbSharePasswd} = '';
947 # Full path for smbclient. Security caution: normal users should not
948 # allowed to write to this file or directory.
950 # smbclient is from the Samba distribution. smbclient is used to
951 # actually extract the incremental or full dump of the share filesystem
954 # This setting only matters if $Conf{XferMethod} = 'smb'.
956 $Conf{SmbClientPath} = '';
959 # Command to run smbclient for a full dump.
960 # This setting only matters if $Conf{XferMethod} = 'smb'.
962 # The following variables are substituted at run-time:
964 # $smbClientPath same as $Conf{SmbClientPath}
965 # $host host to backup/restore
966 # $hostIP host IP address
967 # $shareName share name
968 # $userName user name
969 # $fileList list of files to backup (based on exclude/include)
970 # $I_option optional -I option to smbclient
971 # $X_option exclude option (if $fileList is an exclude list)
972 # $timeStampFile start time for incremental dump
974 # Note: all Cmds are executed directly without a shell, so the prog name
975 # needs to be a full path and you can't include shell syntax like
976 # redirection and pipes; put that in a script if you need it.
978 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
979 . ' $I_option -U $userName -E -N -d 1'
980 . ' -c tarmode\\ full -Tc$X_option - $fileList';
983 # Command to run smbclient for an incremental dump.
984 # This setting only matters if $Conf{XferMethod} = 'smb'.
986 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
988 # Note: all Cmds are executed directly without a shell, so the prog name
989 # needs to be a full path and you can't include shell syntax like
990 # redirection and pipes; put that in a script if you need it.
992 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
993 . ' $I_option -U $userName -E -N -d 1'
994 . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
997 # Command to run smbclient for a restore.
998 # This setting only matters if $Conf{XferMethod} = 'smb'.
1000 # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
1002 # If your smb share is read-only then direct restores will fail.
1003 # You should set $Conf{SmbClientRestoreCmd} to undef and the
1004 # corresponding CGI restore option will be removed.
1006 # Note: all Cmds are executed directly without a shell, so the prog name
1007 # needs to be a full path and you can't include shell syntax like
1008 # redirection and pipes; put that in a script if you need it.
1010 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
1011 . ' $I_option -U $userName -E -N -d 1'
1012 . ' -c tarmode\\ full -Tx -';
1014 ###########################################################################
1016 # (can be overwritten in the per-PC log file)
1017 ###########################################################################
1019 # Which host directories to backup when using tar transport. This can be a
1020 # string or an array of strings if there are multiple directories to
1021 # backup per host. Examples:
1023 # $Conf{TarShareName} = '/'; # backup everything
1024 # $Conf{TarShareName} = '/home'; # only backup /home
1025 # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
1027 # The fact this parameter is called 'TarShareName' is for historical
1028 # consistency with the Smb transport options. You can use any valid
1029 # directory on the client: there is no need for it to correspond to
1030 # any Smb share or device mount point.
1032 # Note also that you can also use $Conf{BackupFilesOnly} to specify
1033 # a specific list of directories to backup. It's more efficient to
1034 # use this option instead of $Conf{TarShareName} since a new tar is
1035 # run for each entry in $Conf{TarShareName}.
1037 # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
1038 # you can backup each file system separately, which makes restoring one
1039 # bad file system easier. In this case you would list all of the mount
1040 # points here, since you can't get the same result with
1041 # $Conf{BackupFilesOnly}:
1043 # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
1045 # This setting only matters if $Conf{XferMethod} = 'tar'.
1047 $Conf{TarShareName} = '/';
1050 # Full command to run tar on the client. GNU tar is required. You will
1051 # need to fill in the correct paths for ssh2 on the local host (server)
1052 # and GNU tar on the client. Security caution: normal users should not
1053 # allowed to write to these executable files or directories.
1055 # See the documentation for more information about setting up ssh2 keys.
1057 # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
1058 # For example, assuming the client filesystem is mounted below /mnt/hostName,
1059 # you could use something like:
1061 # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
1064 # In the case of NFS or rsh you need to make sure BackupPC's privileges
1065 # are sufficient to read all the files you want to backup. Also, you
1066 # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
1068 # The following variables are substituted at run-time:
1071 # $hostIP host's IP address
1072 # $incrDate newer-than date for incremental backups
1073 # $shareName share name to backup (ie: top-level directory path)
1074 # $fileList specific files to backup or exclude
1075 # $tarPath same as $Conf{TarClientPath}
1076 # $sshPath same as $Conf{SshPath}
1078 # If a variable is followed by a "+" it is shell escaped. This is
1079 # necessary for the command part of ssh or rsh, since it ends up
1080 # getting passed through the shell.
1082 # This setting only matters if $Conf{XferMethod} = 'tar'.
1084 # Note: all Cmds are executed directly without a shell, so the prog name
1085 # needs to be a full path and you can't include shell syntax like
1086 # redirection and pipes; put that in a script if you need it.
1088 $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
1089 . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
1093 # Extra tar arguments for full backups. Several variables are substituted at
1094 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1096 # If you are running tar locally (ie: without rsh or ssh) then remove the
1097 # "+" so that the argument is no longer shell escaped.
1099 # This setting only matters if $Conf{XferMethod} = 'tar'.
1101 $Conf{TarFullArgs} = '$fileList+';
1104 # Extra tar arguments for incr backups. Several variables are substituted at
1105 # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
1107 # Note that GNU tar has several methods for specifying incremental backups,
1110 # --newer-mtime $incrDate+
1111 # This causes a file to be included if the modification time is
1112 # later than $incrDate (meaning its contents might have changed).
1113 # But changes in the ownership or modes will not qualify the
1114 # file to be included in an incremental.
1116 # --newer=$incrDate+
1117 # This causes the file to be included if any attribute of the
1118 # file is later than $incrDate, meaning either attributes or
1119 # the modification time. This is the default method. Do
1120 # not use --atime-preserve in $Conf{TarClientCmd} above,
1121 # otherwise resetting the atime (access time) counts as an
1122 # attribute change, meaning the file will always be included
1123 # in each new incremental dump.
1125 # If you are running tar locally (ie: without rsh or ssh) then remove the
1126 # "+" so that the argument is no longer shell escaped.
1128 # This setting only matters if $Conf{XferMethod} = 'tar'.
1130 $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
1133 # Full command to run tar for restore on the client. GNU tar is required.
1134 # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
1135 # and ssh's -n removed.
1137 # See $Conf{TarClientCmd} for full details.
1139 # This setting only matters if $Conf{XferMethod} = "tar".
1141 # If you want to disable direct restores using tar, you should set
1142 # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
1143 # restore option will be removed.
1145 # Note: all Cmds are executed directly without a shell, so the prog name
1146 # needs to be a full path and you can't include shell syntax like
1147 # redirection and pipes; put that in a script if you need it.
1149 $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
1150 . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
1151 . ' -v -f - -C $shareName+';
1154 # Full path for tar on the client. Security caution: normal users should not
1155 # allowed to write to this file or directory.
1157 # This setting only matters if $Conf{XferMethod} = 'tar'.
1159 $Conf{TarClientPath} = '';
1161 ###########################################################################
1162 # Rsync/Rsyncd Configuration
1163 # (can be overwritten in the per-PC log file)
1164 ###########################################################################
1166 # Path to rsync executable on the client
1168 $Conf{RsyncClientPath} = '';
1171 # Full command to run rsync on the client machine. The following variables
1172 # are substituted at run-time:
1174 # $host host name being backed up
1175 # $hostIP host's IP address
1176 # $shareName share name to backup (ie: top-level directory path)
1177 # $rsyncPath same as $Conf{RsyncClientPath}
1178 # $sshPath same as $Conf{SshPath}
1179 # $argList argument list, built from $Conf{RsyncArgs},
1180 # $shareName, $Conf{BackupFilesExclude} and
1181 # $Conf{BackupFilesOnly}
1183 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1185 $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1188 # Full command to run rsync for restore on the client. The following
1189 # variables are substituted at run-time:
1191 # $host host name being backed up
1192 # $hostIP host's IP address
1193 # $shareName share name to backup (ie: top-level directory path)
1194 # $rsyncPath same as $Conf{RsyncClientPath}
1195 # $sshPath same as $Conf{SshPath}
1196 # $argList argument list, built from $Conf{RsyncArgs},
1197 # $shareName, $Conf{BackupFilesExclude} and
1198 # $Conf{BackupFilesOnly}
1200 # This setting only matters if $Conf{XferMethod} = 'rsync'.
1202 # Note: all Cmds are executed directly without a shell, so the prog name
1203 # needs to be a full path and you can't include shell syntax like
1204 # redirection and pipes; put that in a script if you need it.
1206 $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
1209 # Share name to backup. For $Conf{XferMethod} = "rsync" this should
1210 # be a file system path, eg '/' or '/home'.
1212 # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
1213 # to backup (ie: the name from /etc/rsynd.conf).
1215 # This can also be a list of multiple file system paths or modules.
1216 # For example, by adding --one-file-system to $Conf{RsyncArgs} you
1217 # can backup each file system separately, which makes restoring one
1218 # bad file system easier. In this case you would list all of the mount
1221 # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
1223 $Conf{RsyncShareName} = '/';
1226 # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
1228 $Conf{RsyncdClientPort} = 873;
1231 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1232 # The user name and password are stored on the client in whatever file
1233 # the "secrets file" parameter in rsyncd.conf points to
1234 # (eg: /etc/rsyncd.secrets).
1236 $Conf{RsyncdUserName} = '';
1239 # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
1240 # The user name and password are stored on the client in whatever file
1241 # the "secrets file" parameter in rsyncd.conf points to
1242 # (eg: /etc/rsyncd.secrets).
1244 $Conf{RsyncdPasswd} = '';
1247 # Whether authentication is mandatory when connecting to the client's
1248 # rsyncd. By default this is on, ensuring that BackupPC will refuse to
1249 # connect to an rsyncd on the client that is not password protected.
1250 # Turn off at your own risk.
1252 $Conf{RsyncdAuthRequired} = 1;
1255 # When rsync checksum caching is enabled (by adding the
1256 # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
1257 # checksums can be occasionally verified to make sure the file
1258 # contents matches the cached checksums. This is to avoid the
1259 # risk that disk problems might cause the pool file contents to
1260 # get corrupted, but the cached checksums would make BackupPC
1261 # think that the file still matches the client.
1263 # This setting is the probability (0 means never and 1 means always)
1264 # that a file will be rechecked. Setting it to 0 means the checksums
1265 # will not be rechecked (unless there is a phase 0 failure). Setting
1266 # it to 1 (ie: 100%) means all files will be checked, but that is
1267 # not a desirable setting since you are better off simply turning
1268 # caching off (ie: remove the --checksum-seed option).
1270 # The default of 0.01 means 1% (on average) of the files during a full
1271 # backup will have their cached checksum re-checked.
1273 # This setting has no effect unless checksum caching is turned on.
1275 $Conf{RsyncCsumCacheVerifyProb} = 0.01;
1278 # Arguments to rsync for backup. Do not edit the first set unless you
1279 # have a thorough understanding of how File::RsyncP works.
1281 $Conf{RsyncArgs} = [
1283 # Do not edit these!
1293 '--block-size=2048',
1297 # Rsync >= 2.6.3 supports the --checksum-seed option
1298 # which allows rsync checksum caching on the server.
1299 # Uncomment this to enable rsync checksum caching if
1300 # you have a recent client rsync version and you want
1301 # to enable checksum caching.
1303 #'--checksum-seed=32761',
1307 # Additional arguments added to RsyncArgs. This can be used in
1308 # conbination with $Conf{RsyncArgs} to allow customization of
1309 # the rsync arguments on a part-client basis. The standard
1310 # arguments go in $Conf{RsyncArgs} and $Conf{RsyncArgsExtra}
1311 # can be set on a per-client basis.
1313 # Examples of additional arguments that should work are --exclude/--include,
1316 # $Conf{RsyncArgsExtra} = [
1317 # '--exclude', '/proc',
1318 # '--exclude', '*.tmp',
1321 # Both $Conf{RsyncArgs} and $Conf{RsyncArgsExtra} are subject
1322 # to the following variable substitutions:
1324 # $client client name being backed up
1325 # $host host name (could be different from client name if
1326 # $Conf{ClientNameAlias} is set)
1327 # $hostIP IP address of host
1328 # $confDir configuration directory path
1330 # This allows settings of the form:
1332 # $Conf{RsyncArgsExtra} = [
1333 # '--exclude-from=$confDir/pc/$host.exclude',
1336 $Conf{RsyncArgsExtra} = [];
1339 # Arguments to rsync for restore. Do not edit the first set unless you
1340 # have a thorough understanding of how File::RsyncP works.
1342 # If you want to disable direct restores using rsync (eg: is the module
1343 # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
1344 # the corresponding CGI restore option will be removed.
1346 # $Conf{RsyncRestoreArgs} is subject to the following variable
1349 # $client client name being backed up
1350 # $host host name (could be different from client name if
1351 # $Conf{ClientNameAlias} is set)
1352 # $hostIP IP address of host
1353 # $confDir configuration directory path
1355 # Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}.
1357 $Conf{RsyncRestoreArgs} = [
1359 # Do not edit these!
1369 '--block-size=2048',
1375 # Rsync >= 2.6.3 supports the --checksum-seed option
1376 # which allows rsync checksum caching on the server.
1377 # Uncomment this to enable rsync checksum caching if
1378 # you have a recent client rsync version and you want
1379 # to enable checksum caching.
1381 #'--checksum-seed=32761',
1384 # Add additional arguments here
1388 ###########################################################################
1390 # (can be overwritten in the per-PC log file)
1391 ##########################################################################
1393 # Which host directories to backup when using FTP. This can be a
1394 # string or an array of strings if there are multiple shares per host.
1396 # This value must be specified in one of two ways: either as a
1397 # subdirectory of the 'share root' on the server, or as the absolute
1398 # path of the directory.
1400 # In the following example, if the directory /home/username is the
1401 # root share of the ftp server with the given username, the following
1402 # two values will back up the same directory:
1404 # $Conf{FtpShareName} = 'www'; # www directory
1405 # $Conf{FtpShareName} = '/home/username/www'; # same directory
1407 # Path resolution is not supported; i.e.; you may not have an ftp
1408 # share path defined as '../otheruser' or '~/games'.
1410 # Multiple shares may also be specified, as with other protocols:
1412 # $Conf{FtpShareName} = [ 'www',
1416 # Note also that you can also use $Conf{BackupFilesOnly} to specify
1417 # a specific list of directories to backup. It's more efficient to
1418 # use this option instead of $Conf{FtpShareName} since a new tar is
1419 # run for each entry in $Conf{FtpShareName}.
1421 # This setting only matters if $Conf{XferMethod} = 'ftp'.
1423 $Conf{FtpShareName} = '';
1426 # FTP user name. This is used to log into the server.
1428 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1430 $Conf{FtpUserName} = '';
1433 # FTP user password. This is used to log into the server.
1435 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1437 $Conf{FtpPasswd} = '';
1440 # Whether passive mode is used. The correct setting depends upon
1441 # whether local or remote ports are accessible from the other machine,
1442 # which is affected by any firewall or routers between the FTP server
1443 # on the client and the BackupPC server.
1445 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1447 $Conf{FtpPassive} = 1;
1450 # Transfer block size. This sets the size of the amounts of data in
1451 # each frame. While undefined, this value takes the default value.
1453 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1455 $Conf{FtpBlockSize} = 10240;
1458 # The port of the ftp server. If undefined, 21 is used.
1460 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1462 $Conf{FtpPort} = 21;
1465 # Connection timeout for FTP. When undefined, the default is 120 seconds.
1467 # This setting is used only if $Conf{XferMethod} = 'ftp'.
1469 $Conf{FtpTimeout} = 120;
1472 # Behaviour when BackupPC encounters symlinks on the FTP share.
1474 # Symlinks cannot be restored via FTP, so the desired behaviour will
1475 # be different depending on the setup of the share. The default for
1476 # this behavor is 1. Directory shares with more complicated directory
1477 # structures should consider other protocols.
1479 $Conf{FtpFollowSymlinks} = 0;
1481 ###########################################################################
1482 # Archive Configuration
1483 # (can be overwritten in the per-PC log file)
1484 ###########################################################################
1486 # Archive Destination
1488 # The Destination of the archive
1489 # e.g. /tmp for file archive or /dev/nst0 for device archive
1491 $Conf{ArchiveDest} = '/tmp';
1494 # Archive Compression type
1496 # The valid values are:
1498 # - 'none': No Compression
1500 # - 'gzip': Medium Compression. Recommended.
1502 # - 'bzip2': High Compression but takes longer.
1504 $Conf{ArchiveComp} = 'gzip';
1507 # Archive Parity Files
1509 # The amount of Parity data to generate, as a percentage
1510 # of the archive size.
1511 # Uses the commandline par2 (par2cmdline) available from
1512 # http://parchive.sourceforge.net
1514 # Only useful for file dumps.
1516 # Set to 0 to disable this feature.
1518 $Conf{ArchivePar} = 0;
1521 # Archive Size Split
1523 # Only for file archives. Splits the output into
1524 # the specified size * 1,000,000.
1525 # e.g. to split into 650,000,000 bytes, specify 650 below.
1527 # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
1528 # device (e.g. a streaming tape drive), this feature is disabled.
1530 $Conf{ArchiveSplit} = 0;
1535 # This is the command that is called to actually run the archive process
1536 # for each host. The following variables are substituted at run-time:
1538 # $Installdir The installation directory of BackupPC
1539 # $tarCreatePath The path to BackupPC_tarCreate
1540 # $splitpath The path to the split program
1541 # $parpath The path to the par2 program
1542 # $host The host to archive
1543 # $backupnumber The backup number of the host to archive
1544 # $compression The path to the compression program
1545 # $compext The extension assigned to the compression type
1546 # $splitsize The number of bytes to split archives into
1547 # $archiveloc The location to put the archive
1548 # $parfile The amount of parity data to create (percentage)
1550 # Note: all Cmds are executed directly without a shell, so the prog name
1551 # needs to be a full path and you can't include shell syntax like
1552 # redirection and pipes; put that in a script if you need it.
1554 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
1555 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
1556 . ' $compression $compext $splitsize $archiveloc $parfile *';
1559 # Full path for ssh. Security caution: normal users should not
1560 # allowed to write to this file or directory.
1562 $Conf{SshPath} = '';
1565 # Full path for nmblookup. Security caution: normal users should not
1566 # allowed to write to this file or directory.
1568 # nmblookup is from the Samba distribution. nmblookup is used to get the
1569 # netbios name, necessary for DHCP hosts.
1571 $Conf{NmbLookupPath} = '';
1574 # NmbLookup command. Given an IP address, does an nmblookup on that
1575 # IP address. The following variables are substituted at run-time:
1577 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1580 # This command is only used for DHCP hosts: given an IP address, this
1581 # command should try to find its NetBios name.
1583 # Note: all Cmds are executed directly without a shell, so the prog name
1584 # needs to be a full path and you can't include shell syntax like
1585 # redirection and pipes; put that in a script if you need it.
1587 $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
1590 # NmbLookup command. Given a netbios name, finds that host by doing
1591 # a NetBios lookup. Several variables are substituted at run-time:
1593 # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
1594 # $host NetBios name
1596 # In some cases you might need to change the broadcast address, for
1597 # example if nmblookup uses 192.168.255.255 by default and you find
1598 # that doesn't work, try 192.168.1.255 (or your equivalent class C
1599 # address) using the -B option:
1601 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
1603 # If you use a WINS server and your machines don't respond to
1604 # multicast NetBios requests you can use this (replace 1.2.3.4
1605 # with the IP address of your WINS server):
1607 # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
1609 # This is preferred over multicast since it minimizes network traffic.
1611 # Experiment manually for your site to see what form of nmblookup command
1614 # Note: all Cmds are executed directly without a shell, so the prog name
1615 # needs to be a full path and you can't include shell syntax like
1616 # redirection and pipes; put that in a script if you need it.
1618 $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
1621 # For fixed IP address hosts, BackupPC_dump can also verify the netbios
1622 # name to ensure it matches the host name. An error is generated if
1623 # they do not match. Typically this flag is off. But if you are going
1624 # to transition a bunch of machines from fixed host addresses to DHCP,
1625 # setting this flag is a great way to verify that the machines have
1626 # their netbios name set correctly before turning on DCHP.
1628 $Conf{FixedIPNetBiosNameCheck} = 0;
1631 # Full path to the ping command. Security caution: normal users
1632 # should not be allowed to write to this file or directory.
1634 # If you want to disable ping checking, set this to some program
1635 # that exits with 0 status, eg:
1637 # $Conf{PingPath} = '/bin/echo';
1639 $Conf{PingPath} = '';
1642 # Ping command. The following variables are substituted at run-time:
1644 # $pingPath path to ping ($Conf{PingPath})
1647 # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
1648 # exit status (0 even on failure). Replace with "ping $host 1", which
1649 # gets the correct exit status but we don't get the round-trip time.
1651 # Note: all Cmds are executed directly without a shell, so the prog name
1652 # needs to be a full path and you can't include shell syntax like
1653 # redirection and pipes; put that in a script if you need it.
1655 $Conf{PingCmd} = '$pingPath -c 1 $host';
1658 # Maximum round-trip ping time in milliseconds. This threshold is set
1659 # to avoid backing up PCs that are remotely connected through WAN or
1660 # dialup connections. The output from ping -s (assuming it is supported
1661 # on your system) is used to check the round-trip packet time. On your
1662 # local LAN round-trip times should be much less than 20msec. On most
1663 # WAN or dialup connections the round-trip time will be typically more
1664 # than 20msec. Tune if necessary.
1666 $Conf{PingMaxMsec} = 20;
1669 # Compression level to use on files. 0 means no compression. Compression
1670 # levels can be from 1 (least cpu time, slightly worse compression) to
1671 # 9 (most cpu time, slightly better compression). The recommended value
1672 # is 3. Changing to 5, for example, will take maybe 20% more cpu time
1673 # and will get another 2-3% additional compression. See the zlib
1674 # documentation for more information about compression levels.
1676 # Changing compression on or off after backups have already been done
1677 # will require both compressed and uncompressed pool files to be stored.
1678 # This will increase the pool storage requirements, at least until all
1679 # the old backups expire and are deleted.
1681 # It is ok to change the compression value (from one non-zero value to
1682 # another non-zero value) after dumps are already done. Since BackupPC
1683 # matches pool files by comparing the uncompressed versions, it will still
1684 # correctly match new incoming files against existing pool files. The
1685 # new compression level will take effect only for new files that are
1686 # newly compressed and added to the pool.
1688 # If compression was off and you are enabling compression for the first
1689 # time you can use the BackupPC_compressPool utility to compress the
1690 # pool. This avoids having the pool grow to accommodate both compressed
1691 # and uncompressed backups. See the documentation for more information.
1693 # Note: compression needs the Compress::Zlib perl library. If the
1694 # Compress::Zlib library can't be found then $Conf{CompressLevel} is
1695 # forced to 0 (compression off).
1697 $Conf{CompressLevel} = 0;
1700 # Timeout in seconds when listening for the transport program's
1701 # (smbclient, tar etc) stdout. If no output is received during this
1702 # time, then it is assumed that something has wedged during a backup,
1703 # and the backup is terminated.
1705 # Note that stdout buffering combined with huge files being backed up
1706 # could cause longish delays in the output from smbclient that
1707 # BackupPC_dump sees, so in rare cases you might want to increase
1710 # Despite the name, this parameter sets the timeout for all transport
1711 # methods (tar, smb etc).
1713 $Conf{ClientTimeout} = 72000;
1716 # Maximum number of log files we keep around in each PC's directory
1717 # (ie: pc/$host). These files are aged monthly. A setting of 12
1718 # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
1719 # in the pc/$host directory (ie: about a years worth). (Except this
1720 # month's LOG, these files will have a .z extension if compression
1723 # If you decrease this number after BackupPC has been running for a
1724 # while you will have to manually remove the older log files.
1726 $Conf{MaxOldPerPCLogFiles} = 12;
1729 # Optional commands to run before and after dumps and restores,
1730 # and also before and after each share of a dump.
1732 # Stdout from these commands will be written to the Xfer (or Restore)
1733 # log file. One example of using these commands would be to
1734 # shut down and restart a database server, dump a database
1735 # to files for backup, or doing a snapshot of a share prior
1736 # to a backup. Example:
1738 # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
1740 # The following variable substitutions are made at run time for
1741 # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
1742 # and $Conf{DumpPostShareCmd}:
1744 # $type type of dump (incr or full)
1745 # $xferOK 1 if the dump succeeded, 0 if it didn't
1746 # $client client name being backed up
1747 # $host host name (could be different from client name if
1748 # $Conf{ClientNameAlias} is set)
1749 # $hostIP IP address of host
1750 # $user user name from the hosts file
1751 # $moreUsers list of additional users from the hosts file
1752 # $share the first share name (or current share for
1753 # $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
1754 # $shares list of all the share names
1755 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1756 # $sshPath value of $Conf{SshPath},
1757 # $cmdType set to DumpPreUserCmd or DumpPostUserCmd
1759 # The following variable substitutions are made at run time for
1760 # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
1762 # $client client name being backed up
1763 # $xferOK 1 if the restore succeeded, 0 if it didn't
1764 # $host host name (could be different from client name if
1765 # $Conf{ClientNameAlias} is set)
1766 # $hostIP IP address of host
1767 # $user user name from the hosts file
1768 # $moreUsers list of additional users from the hosts file
1769 # $share the first share name
1770 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1771 # $sshPath value of $Conf{SshPath},
1772 # $type set to "restore"
1773 # $bkupSrcHost host name of the restore source
1774 # $bkupSrcShare share name of the restore source
1775 # $bkupSrcNum backup number of the restore source
1776 # $pathHdrSrc common starting path of restore source
1777 # $pathHdrDest common starting path of destination
1778 # $fileList list of files being restored
1779 # $cmdType set to RestorePreUserCmd or RestorePostUserCmd
1781 # The following variable substitutions are made at run time for
1782 # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
1784 # $client client name being backed up
1785 # $xferOK 1 if the archive succeeded, 0 if it didn't
1786 # $host Name of the archive host
1787 # $user user name from the hosts file
1788 # $share the first share name
1789 # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
1790 # $HostList list of hosts being archived
1791 # $BackupList list of backup numbers for the hosts being archived
1792 # $archiveloc location where the archive is sent to
1793 # $parfile amount of parity data being generated (percentage)
1794 # $compression compression program being used (eg: cat, gzip, bzip2)
1795 # $compext extension used for compression type (eg: raw, gz, bz2)
1796 # $splitsize size of the files that the archive creates
1797 # $sshPath value of $Conf{SshPath},
1798 # $type set to "archive"
1799 # $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd
1801 # Note: all Cmds are executed directly without a shell, so the prog name
1802 # needs to be a full path and you can't include shell syntax like
1803 # redirection and pipes; put that in a script if you need it.
1805 $Conf{DumpPreUserCmd} = undef;
1806 $Conf{DumpPostUserCmd} = undef;
1807 $Conf{DumpPreShareCmd} = undef;
1808 $Conf{DumpPostShareCmd} = undef;
1809 $Conf{RestorePreUserCmd} = undef;
1810 $Conf{RestorePostUserCmd} = undef;
1811 $Conf{ArchivePreUserCmd} = undef;
1812 $Conf{ArchivePostUserCmd} = undef;
1815 # Whether the exit status of each PreUserCmd and
1816 # PostUserCmd is checked.
1818 # If set and the Dump/Restore/Archive Pre/Post UserCmd
1819 # returns a non-zero exit status then the dump/restore/archive
1820 # is aborted. To maintain backward compatibility (where
1821 # the exit status in early versions was always ignored),
1822 # this flag defaults to 0.
1824 # If this flag is set and the Dump/Restore/Archive PreUserCmd
1825 # fails then the matching Dump/Restore/Archive PostUserCmd is
1826 # not executed. If DumpPreShareCmd returns a non-exit status,
1827 # then DumpPostShareCmd is not executed, but the DumpPostUserCmd
1828 # is still run (since DumpPreUserCmd must have previously
1831 # An example of a DumpPreUserCmd that might fail is a script
1832 # that snapshots or dumps a database which fails because
1833 # of some database error.
1835 $Conf{UserCmdCheckStatus} = 0;
1838 # Override the client's host name. This allows multiple clients
1839 # to all refer to the same physical host. This should only be
1840 # set in the per-PC config file and is only used by BackupPC at
1841 # the last moment prior to generating the command used to backup
1842 # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
1843 # everywhere else in BackupPC). The setting can be a host name or
1846 # $Conf{ClientNameAlias} = 'realHostName';
1847 # $Conf{ClientNameAlias} = '192.1.1.15';
1849 # will cause the relevant smb/tar/rsync backup/restore commands to be
1850 # directed to realHostName, not the client name.
1852 # Note: this setting doesn't work for hosts with DHCP set to 1.
1854 $Conf{ClientNameAlias} = undef;
1856 ###########################################################################
1857 # Email reminders, status and messages
1858 # (can be overridden in the per-PC config.pl)
1859 ###########################################################################
1861 # Full path to the sendmail command. Security caution: normal users
1862 # should not allowed to write to this file or directory.
1864 $Conf{SendmailPath} = '';
1867 # Minimum period between consecutive emails to a single user.
1868 # This tries to keep annoying email to users to a reasonable
1869 # level. Email checks are done nightly, so this number is effectively
1870 # rounded up (ie: 2.5 means a user will never receive email more
1871 # than once every 3 days).
1873 $Conf{EMailNotifyMinDays} = 2.5;
1876 # Name to use as the "from" name for email. Depending upon your mail
1877 # handler this is either a plain name (eg: "admin") or a fully-qualified
1878 # name (eg: "admin@mydomain.com").
1880 $Conf{EMailFromUserName} = '';
1883 # Destination address to an administrative user who will receive a
1884 # nightly email with warnings and errors. If there are no warnings
1885 # or errors then no email will be sent. Depending upon your mail
1886 # handler this is either a plain name (eg: "admin") or a fully-qualified
1887 # name (eg: "admin@mydomain.com").
1889 $Conf{EMailAdminUserName} = '';
1892 # Destination domain name for email sent to users. By default
1893 # this is empty, meaning email is sent to plain, unqualified
1894 # addresses. Otherwise, set it to the destintation domain, eg:
1896 # $Cong{EMailUserDestDomain} = '@mydomain.com';
1898 # With this setting user email will be set to 'user@mydomain.com'.
1900 $Conf{EMailUserDestDomain} = '';
1903 # This subject and message is sent to a user if their PC has never been
1906 # These values are language-dependent. The default versions can be
1907 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1908 # need to change the message, copy it here and edit it, eg:
1910 # $Conf{EMailNoBackupEverMesg} = <<'EOF';
1917 # This is a site-specific email message.
1920 $Conf{EMailNoBackupEverSubj} = undef;
1921 $Conf{EMailNoBackupEverMesg} = undef;
1924 # How old the most recent backup has to be before notifying user.
1925 # When there have been no backups in this number of days the user
1928 $Conf{EMailNotifyOldBackupDays} = 7.0;
1931 # This subject and message is sent to a user if their PC has not recently
1932 # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
1934 # These values are language-dependent. The default versions can be
1935 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1936 # need to change the message, copy it here and edit it, eg:
1938 # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
1945 # This is a site-specific email message.
1948 $Conf{EMailNoBackupRecentSubj} = undef;
1949 $Conf{EMailNoBackupRecentMesg} = undef;
1952 # How old the most recent backup of Outlook files has to be before
1955 $Conf{EMailNotifyOldOutlookDays} = 5.0;
1958 # This subject and message is sent to a user if their Outlook files have
1959 # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
1962 # These values are language-dependent. The default versions can be
1963 # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
1964 # need to change the message, copy it here and edit it, eg:
1966 # $Conf{EMailOutlookBackupMesg} = <<'EOF';
1973 # This is a site-specific email message.
1976 $Conf{EMailOutlookBackupSubj} = undef;
1977 $Conf{EMailOutlookBackupMesg} = undef;
1980 # Additional email headers. This sets to charset to
1983 $Conf{EMailHeaders} = <<EOF;
1985 Content-Type: text/plain; charset="utf-8"
1988 ###########################################################################
1989 # CGI user interface configuration settings
1990 # (can be overridden in the per-PC config.pl)
1991 ###########################################################################
1993 # Normal users can only access information specific to their host.
1994 # They can start/stop/browse/restore backups.
1996 # Administrative users have full access to all hosts, plus overall
1997 # status and log information.
1999 # The administrative users are the union of the unix/linux group
2000 # $Conf{CgiAdminUserGroup} and the manual list of users, separated
2001 # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
2002 # manual list of users set the corresponding configuration setting
2003 # to undef or an empty string.
2005 # If you want every user to have admin privileges (careful!), set
2006 # $Conf{CgiAdminUsers} = '*'.
2009 # $Conf{CgiAdminUserGroup} = 'admin';
2010 # $Conf{CgiAdminUsers} = 'craig celia';
2011 # --> administrative users are the union of group admin, plus
2014 # $Conf{CgiAdminUserGroup} = '';
2015 # $Conf{CgiAdminUsers} = 'craig celia';
2016 # --> administrative users are only craig and celia'.
2018 $Conf{CgiAdminUserGroup} = '';
2019 $Conf{CgiAdminUsers} = '';
2022 # URL of the BackupPC_Admin CGI script. Used for email messages.
2024 $Conf{CgiURL} = undef;
2027 # Language to use. See lib/BackupPC/Lang for the list of supported
2028 # languages, which include English (en), French (fr), Spanish (es),
2029 # German (de), Italian (it), Dutch (nl), Polish (pl), Portuguese
2030 # Brazillian (pt_br) and Chinese (zh_CH).
2032 # Currently the Language setting applies to the CGI interface and email
2033 # messages sent to users. Log files and other text are still in English.
2035 $Conf{Language} = 'en';
2038 # User names that are rendered by the CGI interface can be turned
2039 # into links into their home page or other information about the
2040 # user. To set this up you need to create two sprintf() strings,
2041 # that each contain a single '%s' that will be replaced by the user
2042 # name. The default is a mailto: link.
2044 # $Conf{CgiUserHomePageCheck} should be an absolute file path that
2045 # is used to check (via "-f") that the user has a valid home page.
2046 # Set this to undef or an empty string to turn off this check.
2048 # $Conf{CgiUserUrlCreate} should be a full URL that points to the
2049 # user's home page. Set this to undef or an empty string to turn
2050 # off generation of URLs for user names.
2053 # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
2054 # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
2055 # --> if /var/www/html/users/craig.html exists, then 'craig' will
2056 # be rendered as a link to http://myhost/users/craig.html.
2058 $Conf{CgiUserHomePageCheck} = '';
2059 $Conf{CgiUserUrlCreate} = 'mailto:%s';
2062 # Date display format for CGI interface. A value of 1 uses US-style
2063 # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
2064 # for international dates (DD/MM).
2066 $Conf{CgiDateFormatMMDD} = 1;
2069 # If set, the complete list of hosts appears in the left navigation
2070 # bar pull-down for administrators. Otherwise, just the hosts for which
2071 # the user is listed in the host file (as either the user or in moreUsers)
2074 $Conf{CgiNavBarAdminAllHosts} = 1;
2077 # Enable/disable the search box in the navigation bar.
2079 $Conf{CgiSearchBoxEnable} = 1;
2082 # Additional navigation bar links. These appear for both regular users
2083 # and administrators. This is a list of hashes giving the link (URL)
2084 # and the text (name) for the link. Specifying lname instead of name
2085 # uses the language specific string (ie: $Lang->{lname}) instead of
2086 # just literally displaying name.
2088 $Conf{CgiNavBarLinks} = [
2090 link => "?action=view&type=docs",
2091 lname => "Documentation", # actually displays $Lang->{Documentation}
2094 link => "http://backuppc.wiki.sourceforge.net",
2095 name => "Wiki", # displays literal "Wiki"
2098 link => "http://backuppc.sourceforge.net",
2099 name => "SourceForge", # displays literal "SourceForge"
2104 # Hilight colors based on status that are used in the PC summary page.
2106 $Conf{CgiStatusHilightColor} = {
2107 Reason_backup_failed => '#ffcccc',
2108 Reason_backup_done => '#ccffcc',
2109 Reason_no_ping => '#ffff99',
2110 Reason_backup_canceled_by_user => '#ff9900',
2111 Status_backup_in_progress => '#66cc99',
2112 Disabled_OnlyManualBackups => '#d1d1d1',
2113 Disabled_AllBackupsDisabled => '#d1d1d1',
2117 # Additional CGI header text.
2119 $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
2122 # Directory where images are stored. This directory should be below
2123 # Apache's DocumentRoot. This value isn't used by BackupPC but is
2124 # used by configure.pl when you upgrade BackupPC.
2127 # $Conf{CgiImageDir} = '/var/www/htdocs/BackupPC';
2129 $Conf{CgiImageDir} = '';
2132 # Additional mappings of file name extenions to Content-Type for
2133 # individual file restore. See $Ext2ContentType in BackupPC_Admin
2134 # for the default setting. You can add additional settings here,
2135 # or override any default settings. Example:
2137 # $Conf{CgiExt2ContentType} = {
2138 # 'pl' => 'text/plain',
2141 $Conf{CgiExt2ContentType} = { };
2144 # URL (without the leading http://host) for BackupPC's image directory.
2145 # The CGI script uses this value to serve up image files.
2148 # $Conf{CgiImageDirURL} = '/BackupPC';
2150 $Conf{CgiImageDirURL} = '';
2153 # CSS stylesheet "skin" for the CGI interface. It is stored
2154 # in the $Conf{CgiImageDir} directory and accessed via the
2155 # $Conf{CgiImageDirURL} URL.
2157 # For BackupPC v3.x several color, layout and font changes were made.
2158 # The previous v2.x version is available as BackupPC_stnd_orig.css, so
2159 # if you prefer the old skin, change this to BackupPC_stnd_orig.css.
2161 $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
2164 # Whether the user is allowed to edit their per-PC config.
2166 $Conf{CgiUserConfigEditEnable} = 1;
2169 # Which per-host config variables a non-admin user is allowed
2170 # to edit. Admin users can edit all per-host config variables,
2171 # even if disabled in this list.
2173 # SECURITY WARNING: Do not let users edit any of the Cmd
2174 # config variables! That's because a user could set a
2175 # Cmd to a shell script of their choice and it will be
2176 # run as the BackupPC user. That script could do all
2177 # sorts of bad things.
2179 $Conf{CgiUserConfigEdit} = {
2183 FullKeepCntMin => 1,
2186 IncrKeepCntMin => 1,
2191 RestoreInfoKeepCnt => 1,
2192 ArchiveInfoKeepCnt => 1,
2193 BackupFilesOnly => 1,
2194 BackupFilesExclude => 1,
2195 BackupsDisable => 1,
2196 BlackoutBadPingLimit => 1,
2197 BlackoutGoodCnt => 1,
2198 BlackoutPeriods => 1,
2199 BackupZeroFilesIsFatal => 1,
2201 ClientCharsetLegacy => 1,
2205 SmbShareUserName => 1,
2206 SmbSharePasswd => 1,
2207 SmbClientFullCmd => 0,
2208 SmbClientIncrCmd => 0,
2209 SmbClientRestoreCmd => 0,
2214 TarClientRestoreCmd => 0,
2216 RsyncShareName => 1,
2217 RsyncdClientPort => 1,
2219 RsyncdUserName => 1,
2220 RsyncdAuthRequired => 1,
2221 RsyncCsumCacheVerifyProb => 1,
2223 RsyncArgsExtra => 1,
2224 RsyncRestoreArgs => 1,
2225 RsyncClientCmd => 0,
2226 RsyncClientRestoreCmd => 0,
2227 RsyncClientPath => 0,
2234 FtpFollowSymlinks => 1,
2235 FtpRestoreEnabled => 1,
2240 ArchiveClientCmd => 0,
2241 FixedIPNetBiosNameCheck => 1,
2243 NmbLookupFindHostCmd => 0,
2247 MaxOldPerPCLogFiles => 1,
2249 ClientNameAlias => 1,
2250 DumpPreUserCmd => 0,
2251 DumpPostUserCmd => 0,
2252 RestorePreUserCmd => 0,
2253 RestorePostUserCmd => 0,
2254 ArchivePreUserCmd => 0,
2255 ArchivePostUserCmd => 0,
2256 DumpPostShareCmd => 0,
2257 DumpPreShareCmd => 0,
2258 UserCmdCheckStatus => 0,
2259 EMailNotifyMinDays => 1,
2260 EMailFromUserName => 1,
2261 EMailAdminUserName => 1,
2262 EMailUserDestDomain => 1,
2263 EMailNoBackupEverSubj => 1,
2264 EMailNoBackupEverMesg => 1,
2265 EMailNotifyOldBackupDays => 1,
2266 EMailNoBackupRecentSubj => 1,
2267 EMailNoBackupRecentMesg => 1,
2268 EMailNotifyOldOutlookDays => 1,
2269 EMailOutlookBackupSubj => 1,
2270 EMailOutlookBackupMesg => 1,
2275 # XXX XXX XXX XXX XXX XXX XXX
2276 # XXX support for search
2279 # add search database dsn
2281 #$Conf{SearchDSN} = 'dbi:SQLite:dbname=$TopDir/search.db';
2282 $Conf{SearchDSN} = 'dbi:Pg:dbname=backuppc';
2283 $Conf{SearchUser} = 'dpavlin';
2286 # if you want to use experimental Hyper Estraier support (which require
2287 # installation of Search::Estraier perl module from CPAN) select
2288 # path to index (relative to $TopDir) or node URI
2289 # use following line to disable Hyper Estraier and prevent upgrades
2290 # from overwriting it
2291 #$Conf{SearchModule} = 'BackupPC::Search::Estraier';
2292 #$Conf{HyperEstraierIndex} = 'http://localhost:1978/node/backuppc';
2294 # which search engine to use
2295 $Conf{SearchModule} = 'BackupPC::Search::KinoSearch';
2296 $Conf{KinoPath} = '/tmp/kinosearch';
2299 # temp directory for storing gzip and iso files when createing iso images
2301 $Conf{GzipTempDir} = "$Conf{TopDir}/temp";
2304 # nameing schema for snapshots (.tar.gz will be added)
2307 # \n - increment numer
2309 $Conf{GzipSchema} = '\\h_\\s_\\n';
2313 # archive media size (in bytes)
2314 # default: 4.2Gb for DVD
2316 #$Conf{ArchiveMediaSize} = 4200 * 1024 * 1024;
2319 # maximum size of one (uncompressed) file on archive medium (in bytes)
2320 # default: 2Gb - 2k for DVD
2321 #$Conf{ArchiveChunkSize} = (2048 - 2) * 1024 * 1024;
2324 # Temporary directory for ISO images (relative to install dir)
2326 $Conf{ISOTempDir} = 'temp/iso';
2329 # configuration data for burning
2331 #$Conf{CDRecordBin} = 'cdrecord';
2332 #$Conf{CDRecordOpts} = 'dev=/dev/hdc blank=fast -dao -v -eject -dummy';
2334 #$Conf{CDRecordBin} = 'dvdrecord';
2335 #$Conf{CDRecordOpts} = 'dev=0,0,0 -dao -v -eject -dummy';
2337 # gzip level for creating tar.gz increments
2338 # default is -6, -1 is fast, -9 is slow
2339 #$Conf{GzipLevel} = '-6';
2340 $Conf{GzipLevel} = '-1';
2342 # number of archive copies to burn
2343 $Conf{BurnMultipleCopies} = 2;
2345 # Other command-line utilities used
2346 #$Conf{ejectBin} = 'eject';
2347 #$Conf{ejectOpts} = '/dev/cdrom';
2348 $Conf{ejectBin} = 'true';
2349 $Conf{ejectOpts} = ' ';
2352 # FIXME disable burning
2353 $Conf{ejectBin} = 'true';
2354 $Conf{ejectOpts} = ' ';
2355 $Conf{CDRecordBin} = 'cat';
2356 $Conf{CDRecordOpts} = '>/dev/null <';
2359 $Conf{mkisofsBin} = 'mkisofs';
2361 # temporary path used when recovering of increments
2362 # (you might put this into tmpfs if you have enough RAM)
2363 $Conf{IncrementTempDir} = '/tmp/increment-restore/';