/[BackupPC]/trunk/doc/BackupPC.html
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 /trunk/doc/BackupPC.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 316 - (show annotations)
Mon Jan 30 13:37:17 2006 UTC (18 years, 3 months ago) by dpavlin
File MIME type: text/html
File size: 211951 byte(s)
 r9152@llin:  dpavlin | 2006-01-30 14:11:45 +0100
 update to upstream 2.1.2

1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>BackupPC</title>
5 <link rev="made" href="mailto:root@localhost" />
6 </head>
7
8 <body style="background-color: white">
9 <table border="0" width="100%" cellspacing="0" cellpadding="3">
10 <tr><td class="block" style="background-color: #cccccc" valign="middle">
11 <big><strong><span class="block">&nbsp;BackupPC</span></strong></big>
12 </td></tr>
13 </table>
14
15 <p><a name="__index__"></a></p>
16 <!-- INDEX BEGIN -->
17
18 <ul>
19
20 <li><a href="#backuppc_introduction">BackupPC Introduction</a></li>
21 <ul>
22
23 <li><a href="#overview">Overview</a></li>
24 <li><a href="#backup_basics">Backup basics</a></li>
25 <li><a href="#resources">Resources</a></li>
26 <li><a href="#road_map">Road map</a></li>
27 <li><a href="#you_can_help">You can help</a></li>
28 </ul>
29
30 <li><a href="#installing_backuppc">Installing BackupPC</a></li>
31 <ul>
32
33 <li><a href="#requirements">Requirements</a></li>
34 <li><a href="#how_much_disk_space_do_i_need">How much disk space do I need?</a></li>
35 <li><a href="#step_1__getting_backuppc">Step 1: Getting BackupPC</a></li>
36 <li><a href="#step_2__installing_the_distribution">Step 2: Installing the distribution</a></li>
37 <li><a href="#step_3__setting_up_config_pl">Step 3: Setting up config.pl</a></li>
38 <li><a href="#step_4__setting_up_the_hosts_file">Step 4: Setting up the hosts file</a></li>
39 <li><a href="#step_5__client_setup">Step 5: Client Setup</a></li>
40 <li><a href="#step_6__running_backuppc">Step 6: Running BackupPC</a></li>
41 <li><a href="#step_7__talking_to_backuppc">Step 7: Talking to BackupPC</a></li>
42 <li><a href="#step_8__cgi_interface">Step 8: CGI interface</a></li>
43 <li><a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a></li>
44 <li><a href="#other_installation_topics">Other installation topics</a></li>
45 <li><a href="#fixing_installation_problems">Fixing installation problems</a></li>
46 </ul>
47
48 <li><a href="#restore_functions">Restore functions</a></li>
49 <ul>
50
51 <li><a href="#cgi_restore_options">CGI restore options</a></li>
52 <li><a href="#commandline_restore_options">Command-line restore options</a></li>
53 </ul>
54
55 <li><a href="#archive_functions">Archive functions</a></li>
56 <ul>
57
58 <li><a href="#configuring_an_archive_host">Configuring an Archive Host</a></li>
59 <li><a href="#starting_an_archive">Starting an Archive</a></li>
60 </ul>
61
62 <li><a href="#backuppc_design">BackupPC Design</a></li>
63 <ul>
64
65 <li><a href="#some_design_issues">Some design issues</a></li>
66 <li><a href="#backuppc_operation">BackupPC operation</a></li>
67 <li><a href="#storage_layout">Storage layout</a></li>
68 <li><a href="#compressed_file_format">Compressed file format</a></li>
69 <li><a href="#rsync_checksum_caching">Rsync checksum caching</a></li>
70 <li><a href="#file_name_mangling">File name mangling</a></li>
71 <li><a href="#special_files">Special files</a></li>
72 <li><a href="#attribute_file_format">Attribute file format</a></li>
73 <li><a href="#optimizations">Optimizations</a></li>
74 <li><a href="#limitations">Limitations</a></li>
75 <li><a href="#security_issues">Security issues</a></li>
76 </ul>
77
78 <li><a href="#configuration_file">Configuration File</a></li>
79 <ul>
80
81 <li><a href="#modifying_the_main_configuration_file">Modifying the main configuration file</a></li>
82 <li><a href="#configuration_file_includes">Configuration file includes</a></li>
83 </ul>
84
85 <li><a href="#configuration_parameters">Configuration Parameters</a></li>
86 <ul>
87
88 <li><a href="#general_server_configuration">General server configuration</a></li>
89 <li><a href="#what_to_backup_and_when_to_do_it">What to backup and when to do it</a></li>
90 <li><a href="#general_perpc_configuration_settings">General per-PC configuration settings</a></li>
91 <li><a href="#email_reminders__status_and_messages">Email reminders, status and messages</a></li>
92 <li><a href="#cgi_user_interface_configuration_settings">CGI user interface configuration settings</a></li>
93 </ul>
94
95 <li><a href="#version_numbers">Version Numbers</a></li>
96 <li><a href="#author">Author</a></li>
97 <li><a href="#copyright">Copyright</a></li>
98 <li><a href="#credits">Credits</a></li>
99 <li><a href="#license">License</a></li>
100 </ul>
101 <!-- INDEX END -->
102
103 <hr />
104 <p>
105 </p>
106 <h1><a name="backuppc_introduction">BackupPC Introduction</a></h1>
107 <p>This documentation describes BackupPC version 2.1.2,
108 released on 5 Sep 2005.</p>
109 <p>
110 </p>
111 <h2><a name="overview">Overview</a></h2>
112 <p>BackupPC is a high-performance, enterprise-grade system for backing up
113 Unix, Linux and WinXX PCs, desktops and laptops to a server's disk.
114 BackupPC is highly configurable and easy to install and maintain.</p>
115 <p>Given the ever decreasing cost of disks and raid systems, it is now
116 practical and cost effective to backup a large number of machines onto
117 a server's local disk or network storage. For some sites this might be
118 the complete backup solution. For other sites additional permanent
119 archives could be created by periodically backing up the server to tape.</p>
120 <p>Features include:</p>
121 <ul>
122 <li>
123 A clever pooling scheme minimizes disk storage and disk I/O.
124 Identical files across multiple backups of the same or different PC
125 are stored only once (using hard links), resulting in substantial
126 savings in disk storage and disk writes.
127 <p></p>
128 <li>
129 Optional compression provides additional reductions in storage
130 (around 40%). The CPU impact of compression is low since only
131 new files (those not already in the pool) need to be compressed.
132 <p></p>
133 <li>
134 A powerful http/cgi user interface allows administrators to view log
135 files, configuration, current status and allows users to initiate and
136 cancel backups and browse and restore files from backups.
137 <p></p>
138 <li>
139 The http/cgi user interface has internationalization (i18n) support,
140 currently providing English, French, German, Spanish, Italian
141 and Dutch.
142 <p></p>
143 <li>
144 No client-side software is needed. On WinXX the standard smb
145 protocol is used to extract backup data. On linux or unix clients,
146 rsync or tar (over ssh/rsh/nfs) is used to extract backup data.
147 Alternatively, rsync can also be used on WinXX (using cygwin),
148 and Samba could be installed on the linux or unix client to
149 provide smb shares).
150 <p></p>
151 <li>
152 Flexible restore options. Single files can be downloaded from
153 any backup directly from the CGI interface. Zip or Tar archives
154 for selected files or directories from any backup can also be
155 downloaded from the CGI interface. Finally, direct restore to
156 the client machine (using smb or tar) for selected files or
157 directories is also supported from the CGI interface.
158 <p></p>
159 <li>
160 BackupPC supports mobile environments where laptops are only
161 intermittently connected to the network and have dynamic IP addresses
162 (DHCP). Configuration settings allow machines connected via slower WAN
163 connections (eg: dial up, DSL, cable) to not be backed up, even if they
164 use the same fixed or dynamic IP address as when they are connected
165 directly to the LAN.
166 <p></p>
167 <li>
168 Flexible configuration parameters allow multiple backups to be performed
169 in parallel, specification of which shares to backup, which directories
170 to backup or not backup, various schedules for full and incremental
171 backups, schedules for email reminders to users and so on. Configuration
172 parameters can be set system-wide or also on a per-PC basis.
173 <p></p>
174 <li>
175 Users are sent periodic email reminders if their PC has not
176 recently been backed up. Email content, timing and policies
177 are configurable.
178 <p></p>
179 <li>
180 BackupPC is Open Source software hosted by SourceForge.
181 <p></p></ul>
182 <p>
183 </p>
184 <h2><a name="backup_basics">Backup basics</a></h2>
185 <dl>
186 <dt><strong><a name="item_full_backup">Full Backup</a></strong><br />
187 </dt>
188 <dd>
189 A full backup is a complete backup of a share. BackupPC can be
190 configured to do a full backup at a regular interval (typically
191 weekly). BackupPC can be configured to keep a certain number
192 of full backups. Exponential expiry is also supported, allowing
193 full backups with various vintages to be kept (for example, a
194 settable number of most recent weekly fulls, plus a settable
195 number of older fulls that are 2, 4, 8, or 16 weeks apart).
196 </dd>
197 <p></p>
198 <dt><strong><a name="item_incremental_backup">Incremental Backup</a></strong><br />
199 </dt>
200 <dd>
201 An incremental backup is a backup of files that have changed (based on
202 their modification time) since the last successful full backup. For
203 SMB and tar, BackupPC backups all files that have changed since one
204 hour prior to the start of the last successful full backup. Rsync is
205 more clever: any files whose attributes have changed (ie: uid, gid,
206 mtime, modes, size) since the last full are backed up. Deleted, new
207 files and renamed files are detected by Rsync incrementals.
208 In constrast, SMB and tar incrementals are not able to detect deleted
209 files, renamed files or new files whose modification time is prior to
210 the last full dump.
211 </dd>
212 <dd>
213 <p>BackupPC can also be configured to keep a certain number of incremental
214 backups, and to keep a smaller number of very old incremental backups.
215 (BackupPC does not support multi-level incremental backups, although it
216 will in a future version.)</p>
217 </dd>
218 <dd>
219 <p>BackupPC's CGI interface ``fills-in'' incremental backups based on the
220 last full backup, giving every backup a ``full'' appearance. This makes
221 browsing and restoring backups easier.</p>
222 </dd>
223 <p></p>
224 <dt><strong><a name="item_partial_backup">Partial Backup</a></strong><br />
225 </dt>
226 <dd>
227 When a full backup fails or is canceled, and some files have already
228 been backed up, BackupPC keeps a partial backup containing just the
229 files that were backed up successfully. The partial backup is removed
230 when the next successful backup completes, or if another full backup
231 fails resulting in a newer partial backup. A failed full backup
232 that has not backed up any files, or any failed incremental backup,
233 is removed; no partial backup is saved in these cases.
234 </dd>
235 <dd>
236 <p>The partial backup may be browsed or used to restore files just like
237 a successful full or incremental backup.</p>
238 </dd>
239 <dd>
240 <p>With the rsync transfer method the partial backup is used to resume
241 the next full backup, avoiding the need to retransfer the file data
242 already in the partial backup.</p>
243 </dd>
244 <p></p>
245 <dt><strong><a name="item_identical_files">Identical Files</a></strong><br />
246 </dt>
247 <dd>
248 BackupPC pools identical files using hardlinks. By ``identical
249 files'' we mean files with identical contents, not necessary the
250 same permissions, ownership or modification time. Two files might
251 have different permissions, ownership, or modification time but
252 will still be pooled whenever the contents are identical. This
253 is possible since BackupPC stores the file meta-data (permissions,
254 ownership, and modification time) separately from the file contents.
255 </dd>
256 <p></p>
257 <dt><strong><a name="item_backup_policy">Backup Policy</a></strong><br />
258 </dt>
259 <dd>
260 Based on your site's requirements you need to decide what your backup
261 policy is. BackupPC is not designed to provide exact re-imaging of
262 failed disks. See <a href="#limitations">Limitations</a> for more information.
263 However, the addition of tar transport for linux/unix clients, plus
264 full support for special file types and unix attributes in v1.4.0
265 likely means an exact image of a linux/unix file system can be made.
266 </dd>
267 <dd>
268 <p>BackupPC saves backups onto disk. Because of pooling you can relatively
269 economically keep several weeks of old backups.</p>
270 </dd>
271 <dd>
272 <p>At some sites the disk-based backup will be adequate, without a
273 secondary tape backup. This system is robust to any single failure: if a
274 client disk fails or loses files, the BackupPC server can be used to
275 restore files. If the server disk fails, BackupPC can be restarted on a
276 fresh file system, and create new backups from the clients. The chance
277 of the server disk failing can be made very small by spending more money
278 on increasingly better RAID systems. However, there is still the risk
279 of catastrophic events like fires or earthquakes that can destroy
280 both the BackupPC server and the clients it is backing up if they
281 are physically nearby.</p>
282 </dd>
283 <dd>
284 <p>Some sites might choose to do periodic backups to tape or cd/dvd.
285 This backup can be done perhaps weekly using the archive function of
286 BackupPC.</p>
287 </dd>
288 <dd>
289 <p>Other users have reported success with removable disks to rotate the
290 BackupPC data drives, or using rsync to mirror the BackupPC data pool
291 offsite.</p>
292 </dd>
293 <p></p></dl>
294 <p>
295 </p>
296 <h2><a name="resources">Resources</a></h2>
297 <dl>
298 <dt><strong><a name="item_backuppc_home_page">BackupPC home page</a></strong><br />
299 </dt>
300 <dd>
301 The BackupPC Open Source project is hosted on SourceForge. The
302 home page can be found at:
303 </dd>
304 <dd>
305 <pre>
306 <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a></pre>
307 </dd>
308 <dd>
309 <p>This page has links to the current documentation, the SourceForge
310 project page and general information.</p>
311 </dd>
312 <p></p>
313 <dt><strong><a name="item_sourceforge_project">SourceForge project</a></strong><br />
314 </dt>
315 <dd>
316 The SourceForge project page is at:
317 </dd>
318 <dd>
319 <pre>
320 <a href="http://sourceforge.net/projects/backuppc">http://sourceforge.net/projects/backuppc</a></pre>
321 </dd>
322 <dd>
323 <p>This page has links to the current releases of BackupPC.</p>
324 </dd>
325 <p></p>
326 <dt><strong><a name="item_backuppc_faq">BackupPC FAQ</a></strong><br />
327 </dt>
328 <dd>
329 BackupPC has a FAQ at <a href="http://backuppc.sourceforge.net/faq">http://backuppc.sourceforge.net/faq</a>.
330 </dd>
331 <p></p>
332 <dt><strong><a name="item_mail_lists">Mail lists</a></strong><br />
333 </dt>
334 <dd>
335 Three BackupPC mailing lists exist for announcements (backuppc-announce),
336 developers (backuppc-devel), and a general user list for support, asking
337 questions or any other topic relevant to BackupPC (backuppc-users).
338 </dd>
339 <dd>
340 <p>The lists are archived on SourceForge and Gmane. The SourceForge lists
341 are not always up to date and the searching is limited, so Gmane is
342 a good alternative. See:</p>
343 </dd>
344 <dd>
345 <pre>
346 <a href="http://news.gmane.org/index.php?prefix=gmane.comp.sysutils.backup.backuppc">http://news.gmane.org/index.php?prefix=gmane.comp.sysutils.backup.backuppc</a>
347 <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=503">http://sourceforge.net/mailarchive/forum.php?forum_id=503</a></pre>
348 </dd>
349 <dd>
350 <p>You can subscribe to these lists by visiting:</p>
351 </dd>
352 <dd>
353 <pre>
354 <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-announce">http://lists.sourceforge.net/lists/listinfo/backuppc-announce</a>
355 <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-users">http://lists.sourceforge.net/lists/listinfo/backuppc-users</a>
356 <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-devel">http://lists.sourceforge.net/lists/listinfo/backuppc-devel</a></pre>
357 </dd>
358 <dd>
359 <p>The backuppc-announce list is moderated and is used only for
360 important announcements (eg: new versions). It is low traffic.
361 You only need to subscribe to one of backuppc-announce and
362 backuppc-users: backuppc-users also receives any messages on
363 backuppc-announce.</p>
364 </dd>
365 <dd>
366 <p>The backuppc-devel list is only for developers who are working on BackupPC.
367 Do not post questions or support requests there. But detailed technical
368 discussions should happen on this list.</p>
369 </dd>
370 <dd>
371 <p>To post a message to the backuppc-users list, send an email to</p>
372 </dd>
373 <dd>
374 <pre>
375 backuppc-users@lists.sourceforge.net</pre>
376 </dd>
377 <dd>
378 <p>Do not send subscription requests to this address!</p>
379 </dd>
380 <p></p>
381 <dt><strong><a name="item_other_programs_of_interest">Other Programs of Interest</a></strong><br />
382 </dt>
383 <dd>
384 If you want to mirror linux or unix files or directories to a remote server
385 you should consider rsync, <a href="http://rsync.samba.org">http://rsync.samba.org</a>. BackupPC now uses
386 rsync as a transport mechanism; if you are already an rsync user you
387 can think of BackupPC as adding efficient storage (compression and
388 pooling) and a convenient user interface to rsync.
389 </dd>
390 <dd>
391 <p>Unison is a utility that can do two-way, interactive, synchronization.
392 See <a href="http://www.cis.upenn.edu/~bcpierce/unison">http://www.cis.upenn.edu/~bcpierce/unison</a>.</p>
393 </dd>
394 <dd>
395 <p>Three popular open source packages that do tape backup are
396 Amanda (<a href="http://www.amanda.org">http://www.amanda.org</a>),
397 afbackup (<a href="http://sourceforge.net/projects/afbackup">http://sourceforge.net/projects/afbackup</a>), and
398 Bacula (<a href="http://www.bacula.org">http://www.bacula.org</a>).
399 Amanda can also backup WinXX machines to tape using samba.
400 These packages can be used as back ends to BackupPC to backup the
401 BackupPC server data to tape.</p>
402 </dd>
403 <dd>
404 <p>Various programs and scripts use rsync to provide hardlinked backups.
405 See, for example, Mike Rubel's site (<a href="http://www.mikerubel.org/computers/rsync_snapshots">http://www.mikerubel.org/computers/rsync_snapshots</a>),
406 JW Schultz's dirvish (<a href="http://www.dirvish.org">http://www.dirvish.org</a>),
407 Ben Escoto's rdiff-backup (<a href="http://rdiff-backup.stanford.edu">http://rdiff-backup.stanford.edu</a>),
408 and John Bowman's rlbackup (<a href="http://www.math.ualberta.ca/imaging/rlbackup">http://www.math.ualberta.ca/imaging/rlbackup</a>).</p>
409 </dd>
410 <dd>
411 <p>BackupPC provides many additional features, such as compressed storage,
412 hardlinking any matching files (rather than just files with the same name),
413 and storing special files without root privileges. But these other scripts
414 provide simple and effective solutions and are worthy of consideration.</p>
415 </dd>
416 <p></p></dl>
417 <p>
418 </p>
419 <h2><a name="road_map">Road map</a></h2>
420 <p>The new features planned for future releases of BackupPC
421 are at <a href="http://backuppc.sourceforge.net/faq/roadMap.html">http://backuppc.sourceforge.net/faq/roadMap.html</a>.</p>
422 <p>Comments and suggestions are welcome.</p>
423 <p>
424 </p>
425 <h2><a name="you_can_help">You can help</a></h2>
426 <p>BackupPC is free. I work on BackupPC because I enjoy doing it and I like
427 to contribute to the open source community.</p>
428 <p>BackupPC already has more than enough features for my own needs. The
429 main compensation for continuing to work on BackupPC is knowing that
430 more and more people find it useful. So feedback is certainly
431 appreciated, both positive and negative.</p>
432 <p>Beyond being a satisfied user and telling other people about it, everyone
433 is encouraged to add links to <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>
434 (I'll see them via Google) or otherwise publicize BackupPC. Unlike
435 the commercial products in this space, I have a zero budget (in both
436 time and money) for marketing, PR and advertising, so it's up to
437 all of you! Feel free to vote for BackupPC at
438 <a href="http://freshmeat.net/projects/backuppc">http://freshmeat.net/projects/backuppc</a>.</p>
439 <p>Also, everyone is encouraged to contribute patches, bug reports, feature
440 and design suggestions, new code, FAQs, and documentation corrections or
441 improvements. Answering questions on the mail list is a big help too.</p>
442 <p>
443 <a href="#__index__"><small>Back to Top</small></a>
444 </p>
445 <hr />
446 <h1><a name="installing_backuppc">Installing BackupPC</a></h1>
447 <p>
448 </p>
449 <h2><a name="requirements">Requirements</a></h2>
450 <p>BackupPC requires:</p>
451 <ul>
452 <li>
453 A linux, solaris, or unix based server with a substantial amount of free
454 disk space (see the next section for what that means). The CPU and disk
455 performance on this server will determine how many simultaneous backups
456 you can run. You should be able to run 4-8 simultaneous backups on a
457 moderately configured server.
458 <p>Several users have reported significantly better performance using
459 reiser compared to ext3 for the BackupPC data file system. It is
460 also recommended you consider either an LVM or raid setup (either
461 in HW or SW; eg: 3Ware RAID5) so that you can expand the
462 file system as necessary.</p>
463 <p>When BackupPC starts with an empty pool, all the backup data will be
464 written to the pool on disk. After more backups are done, a higher
465 percentage of incoming files will already be in the pool. BackupPC is
466 able to avoid writing to disk new files that are already in the pool.
467 So over time disk writes will reduce significantly (by perhaps a factor
468 of 20 or more), since eventually 95% or more of incoming backup files
469 are typically in the pool. Disk reads from the pool are still needed to
470 do file compares to verify files are an exact match. So, with a mature
471 pool, if a relatively fast client generates data at say 1MB/sec, and you
472 run 4 simultaneous backups, there will be an average server disk load of
473 about 4MB/sec reads and 0.2MB/sec writes (assuming 95% of the incoming
474 files are in the pool). These rates will be perhaps 40% lower if
475 compression is on.</p>
476 <p></p>
477 <li>
478 Perl version 5.6.0 or later. BackupPC has been tested with
479 version 5.6.x, and 5.8.x. If you don't have perl, please
480 see <a href="http://www.cpan.org">http://www.cpan.org</a>.
481 <p></p>
482 <li>
483 Perl modules Compress::Zlib, Archive::Zip and File::RsyncP. Try ``perldoc
484 Compress::Zlib'' and ``perldoc Archive::Zip'' to see if you have these
485 modules. If not, fetch them from <a href="http://www.cpan.org">http://www.cpan.org</a> and see the
486 instructions below for how to build and install them.
487 <p>The File::RsyncP module is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>
488 or CPAN. You'll need to install the File::RsyncP module if you want to use
489 Rsync as a transport method.</p>
490 <p></p>
491 <li>
492 If you are using smb to backup WinXX machines you need smbclient and
493 nmblookup from the samba package. You will also need nmblookup if
494 you are backing up linux/unix DHCP machines. See <a href="http://www.samba.org">http://www.samba.org</a>.
495 Version 2.2.0 or later of Samba is required.
496 Samba versions 3.x are stable and now recommended instead of 2.x.
497 <p>See <a href="http://www.samba.org">http://www.samba.org</a> for source and binaries. It's pretty easy to
498 fetch and compile samba, and just grab smbclient and nmblookup, without
499 doing the installation. Alternatively, <a href="http://www.samba.org">http://www.samba.org</a> has binary
500 distributions for most platforms.</p>
501 <p></p>
502 <li>
503 If you are using tar to backup linux/unix machines you should have version
504 1.13.7 at a minimum, with version 1.13.20 or higher recommended. Use
505 ``tar --version'' to check your version. Various GNU mirrors have the newest
506 versions of tar, see for example <a href="http://www.funet.fi/pub/gnu/alpha/gnu/tar">http://www.funet.fi/pub/gnu/alpha/gnu/tar</a>.
507 As of June 2003 the latest version is 1.13.25.
508 <p></p>
509 <li>
510 If you are using rsync to backup linux/unix machines you should have
511 version 2.5.5 or higher on each client machine. See
512 <a href="http://rsync.samba.org">http://rsync.samba.org</a>. Use ``rsync --version'' to check your version.
513 <p>For BackupPC to use Rsync you will also need to install the perl
514 File::RsyncP module, which is available from
515 <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>.
516 Version 0.52 or later is required.</p>
517 <p></p>
518 <li>
519 The Apache web server, see <a href="http://www.apache.org">http://www.apache.org</a>, preferably built
520 with mod_perl support.
521 <p></p></ul>
522 <p>
523 </p>
524 <h2><a name="how_much_disk_space_do_i_need">How much disk space do I need?</a></h2>
525 <p>Here's one real example for an environment that is backing up 65 laptops
526 with compression off. Each full backup averages 3.2GB. Each incremental
527 backup averages about 0.2GB. Storing one full backup and two incremental
528 backups per laptop is around 240GB of raw data. But because of the
529 pooling of identical files, only 87GB is used. This is without
530 compression.</p>
531 <p>Another example, with compression on: backing up 95 laptops, where
532 each backup averages 3.6GB and each incremental averages about 0.3GB.
533 Keeping three weekly full backups, and six incrementals is around
534 1200GB of raw data. Because of pooling and compression, only 150GB
535 is needed.</p>
536 <p>Here's a rule of thumb. Add up the disk usage of all the machines you
537 want to backup (210GB in the first example above). This is a rough
538 minimum space estimate that should allow a couple of full backups and at
539 least half a dozen incremental backups per machine. If compression is on
540 you can reduce the storage requirements by maybe 30-40%. Add some margin
541 in case you add more machines or decide to keep more old backups.</p>
542 <p>Your actual mileage will depend upon the types of clients, operating
543 systems and applications you have. The more uniform the clients and
544 applications the bigger the benefit from pooling common files.</p>
545 <p>For example, the Eudora email tool stores each mail folder in a separate
546 file, and attachments are extracted as separate files. So in the sadly
547 common case of a large attachment emailed to many recipients, Eudora
548 will extract the attachment into a new file. When these machines are
549 backed up, only one copy of the file will be stored on the server, even
550 though the file appears in many different full or incremental backups. In
551 this sense Eudora is a ``friendly'' application from the point of view of
552 backup storage requirements.</p>
553 <p>An example at the other end of the spectrum is Outlook. Everything
554 (email bodies, attachments, calendar, contact lists) is stored in a
555 single file, which often becomes huge. Any change to this file requires
556 a separate copy of the file to be saved during backup. Outlook is even
557 more troublesome, since it keeps this file locked all the time, so it
558 cannot be read by smbclient whenever Outlook is running. See the
559 <a href="#limitations">Limitations</a> section for more discussion of this problem.</p>
560 <p>In addition to total disk space, you shold make sure you have
561 plenty of inodes on your BackupPC data partition. Some users have
562 reported running out of inodes on their BackupPC data partition.
563 So even if you have plenty of disk space, BackupPC will report
564 failures when the inodes are exhausted. This is a particular
565 problem with ext2/ext3 file systems that have a fixed number of
566 inodes when the file system is built. Use ``df -i'' to see your
567 inode usage.</p>
568 <p>
569 </p>
570 <h2><a name="step_1__getting_backuppc">Step 1: Getting BackupPC</a></h2>
571 <p>Some linux distributions now include BackupPC. The Debian
572 distribution, supprted by Ludovic Drolez, can be found at
573 <a href="http://packages.debian.org/backuppc">http://packages.debian.org/backuppc</a>; it should be included
574 in the next stable Debian release. On Debian, BackupPC can
575 be installed with the command:</p>
576 <pre>
577 apt-get install backuppc</pre>
578 <p>In the future there might be packages for Gentoo and other
579 linux flavors. If the packaged version is older than the
580 released version then you will probably want to install the
581 lastest version as described below.</p>
582 <p>Otherwise, manually fetching and installing BackupPC is easy.
583 Start by downloading the latest version from
584 <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. Hit the ``Code'' button,
585 then select the ``backuppc'' or ``backuppc-beta'' package and
586 download the latest version.</p>
587 <p>
588 </p>
589 <h2><a name="step_2__installing_the_distribution">Step 2: Installing the distribution</a></h2>
590 <p>First off, there are three perl modules you should install.
591 These are all optional, but highly recommended:</p>
592 <dl>
593 <dt><strong><a name="item_compress_3a_3azlib">Compress::Zlib</a></strong><br />
594 </dt>
595 <dd>
596 To enable compression, you will need to install Compress::Zlib
597 from <a href="http://www.cpan.org">http://www.cpan.org</a>.
598 You can run ``perldoc Compress::Zlib'' to see if this module is installed.
599 </dd>
600 <p></p>
601 <dt><strong><a name="item_archive_3a_3azip">Archive::Zip</a></strong><br />
602 </dt>
603 <dd>
604 To support restore via Zip archives you will need to install
605 Archive::Zip, also from <a href="http://www.cpan.org">http://www.cpan.org</a>.
606 You can run ``perldoc Archive::Zip'' to see if this module is installed.
607 </dd>
608 <p></p>
609 <dt><strong><a name="item_file_3a_3arsyncp">File::RsyncP</a></strong><br />
610 </dt>
611 <dd>
612 To use rsync and rsyncd with BackupPC you will need to install File::RsyncP.
613 You can run ``perldoc File::RsyncP'' to see if this module is installed.
614 File::RsyncP is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>.
615 Version 0.52 or later is required.
616 </dd>
617 <p></p></dl>
618 <p>To build and install these packages, fetch the tar.gz file and
619 then run these commands:</p>
620 <pre>
621 tar zxvf Archive-Zip-1.01.tar.gz
622 cd Archive-Zip-1.01
623 perl Makefile.PL
624 make
625 make test
626 make install</pre>
627 <p>The same sequence of commands can be used for each module.</p>
628 <p>Now let's move onto BackupPC itself. After fetching
629 BackupPC-2.1.2.tar.gz, run these commands as root:</p>
630 <pre>
631 tar zxf BackupPC-2.1.2.tar.gz
632 cd BackupPC-2.1.2
633 perl configure.pl</pre>
634 <p>In the future this release might also have patches available on the
635 SourceForge site. These patch files are text files, with a name of
636 the form</p>
637 <pre>
638 BackupPC-2.1.2plN.diff</pre>
639 <p>where N is the patch level, eg: pl5 is patch-level 5. These
640 patch files are cumulative: you only need apply the last patch
641 file, not all the earlier patch files. If a patch file is
642 available, eg: BackupPC-2.1.2pl5.diff, you should apply
643 the patch after extracting the tar file:</p>
644 <pre>
645 # fetch BackupPC-2.1.2.tar.gz
646 # fetch BackupPC-2.1.2pl5.diff
647 tar zxf BackupPC-2.1.2.tar.gz
648 cd BackupPC-2.1.2
649 patch -p0 &lt; ../BackupPC-2.1.2pl5.diff
650 perl configure.pl</pre>
651 <p>A patch file includes comments that describe that bug fixes
652 and changes. Feel free to review it before you apply the patch.</p>
653 <p>The configure.pl script also accepts command-line options if you
654 wish to run it in a non-interactive manner. It has self-contained
655 documentation for all the command-line options, which you can
656 read with perldoc:</p>
657 <pre>
658 perldoc configure.pl</pre>
659 <p>When you run configure.pl you will be prompted for the full paths
660 of various executables, and you will be prompted for the following
661 information:</p>
662 <dl>
663 <dt><strong><a name="item_backuppc_user">BackupPC User</a></strong><br />
664 </dt>
665 <dd>
666 It is best if BackupPC runs as a special user, eg backuppc, that has
667 limited privileges. It is preferred that backuppc belongs to a system
668 administrator group so that sys admin members can browse backuppc files,
669 edit the configuration files and so on. Although configurable, the
670 default settings leave group read permission on pool files, so make
671 sure the BackupPC user's group is chosen restrictively.
672 </dd>
673 <dd>
674 <p>On this installation, this is __BACKUPPCUSER__.</p>
675 </dd>
676 <p></p>
677 <dt><strong><a name="item_data_directory">Data Directory</a></strong><br />
678 </dt>
679 <dd>
680 You need to decide where to put the data directory, below which
681 all the BackupPC data is stored. This needs to be a big file system.
682 </dd>
683 <dd>
684 <p>On this installation, this is __TOPDIR__.</p>
685 </dd>
686 <p></p>
687 <dt><strong><a name="item_install_directory">Install Directory</a></strong><br />
688 </dt>
689 <dd>
690 You should decide where the BackupPC scripts, libraries and documentation
691 should be installed, eg: /opt/local/BackupPC.
692 </dd>
693 <dd>
694 <p>On this installation, this is __INSTALLDIR__.</p>
695 </dd>
696 <p></p>
697 <dt><strong><a name="item_cgi_bin_directory">CGI bin Directory</a></strong><br />
698 </dt>
699 <dd>
700 You should decide where the BackupPC CGI script resides. This will
701 usually below Apache's cgi-bin directory.
702 </dd>
703 <dd>
704 <p>On this installation, this is __CGIDIR__.</p>
705 </dd>
706 <p></p>
707 <dt><strong><a name="item_apache_image_directory">Apache image directory</a></strong><br />
708 </dt>
709 <dd>
710 A directory where BackupPC's images are stored so that Apache can
711 serve them. This should be somewhere under Apache's DocumentRoot
712 directory.
713 </dd>
714 <p></p></dl>
715 <p>
716 </p>
717 <h2><a name="step_3__setting_up_config_pl">Step 3: Setting up config.pl</a></h2>
718 <p>After running configure.pl, browse through the config file,
719 __TOPDIR__/conf/config.pl, and make sure all the default settings
720 are correct. In particular, you will need to decide whether to use
721 smb, tar or rsync transport (or whether to set it on a per-PC basis)
722 and set the relevant parameters for that transport method.
723 See the section <a href="#step_5__client_setup">Client Setup</a> for more details.</p>
724 <p>
725 </p>
726 <h2><a name="step_4__setting_up_the_hosts_file">Step 4: Setting up the hosts file</a></h2>
727 <p>The file __TOPDIR__/conf/hosts contains the list of clients to backup.
728 BackupPC reads this file in three cases:</p>
729 <ul>
730 <li>
731 Upon startup.
732 <p></p>
733 <li>
734 When BackupPC is sent a HUP (-1) signal. Assuming you installed the
735 init.d script, you can also do this with ``/etc/init.d/backuppc reload''.
736 <p></p>
737 <li>
738 When the modification time of the hosts file changes. BackupPC
739 checks the modification time once during each regular wakeup.
740 <p></p></ul>
741 <p>Whenever you change the hosts file (to add or remove a host) you can
742 either do a kill -HUP BackupPC_pid or simply wait until the next regular
743 wakeup period.</p>
744 <p>Each line in the hosts file contains three fields, separated
745 by white space:</p>
746 <dl>
747 <dt><strong><a name="item_host_name">Host name</a></strong><br />
748 </dt>
749 <dd>
750 This is typically the host name or NetBios name of the client machine
751 and should be in lower case. The host name can contain spaces (escape
752 with a backslash), but it is not recommended.
753 </dd>
754 <dd>
755 <p>Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a>.</p>
756 </dd>
757 <dd>
758 <p>In certain cases you might want several distinct clients to refer
759 to the same physical machine. For example, you might have a database
760 you want to backup, and you want to bracket the backup of the database
761 with shutdown/restart using <a href="#item_%24conf%7bdumppreusercmd%7d">$Conf{DumpPreUserCmd}</A> and <a href="#item_%24conf%7bdumppostusercmd%7d">$Conf{DumpPostUserCmd}</A>.
762 But you also want to backup the rest of the machine while the database
763 is still running. In the case you can specify two different clients in
764 the host file, using any mnemonic name (eg: myhost_mysql and myhost), and
765 use <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> in myhost_mysql's config.pl to specify the
766 real host name of the machine.</p>
767 </dd>
768 <p></p>
769 <dt><strong><a name="item_dhcp_flag">DHCP flag</a></strong><br />
770 </dt>
771 <dd>
772 Starting with v2.0.0 the way hosts are discovered has changed and now
773 in most cases you should specify 0 for the DHCP flag, even if the host
774 has a dynamically assigned IP address.
775 Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a>
776 to understand whether you need to set the DHCP flag.
777 </dd>
778 <dd>
779 <p>You only need to set DHCP to 1 if your client machine doesn't
780 respond to the NetBios multicast request:</p>
781 </dd>
782 <dd>
783 <pre>
784 nmblookup myHost</pre>
785 </dd>
786 <dd>
787 <p>but does respond to a request directed to its IP address:</p>
788 </dd>
789 <dd>
790 <pre>
791 nmblookup -A W.X.Y.Z</pre>
792 </dd>
793 <dd>
794 <p>If you do set DHCP to 1 on any client you will need to specify the range of
795 DHCP addresses to search is specified in <a href="#item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges}</A>.</p>
796 </dd>
797 <dd>
798 <p>Note also that the <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> feature does not work for
799 clients with DHCP set to 1.</p>
800 </dd>
801 <p></p>
802 <dt><strong><a name="item_user_name">User name</a></strong><br />
803 </dt>
804 <dd>
805 This should be the unix login/email name of the user who ``owns'' or uses
806 this machine. This is the user who will be sent email about this
807 machine, and this user will have permission to stop/start/browse/restore
808 backups for this host. Leave this blank if no specific person should
809 receive email or be allowed to stop/start/browse/restore backups
810 for this host. Administrators will still have full permissions.
811 </dd>
812 <p></p>
813 <dt><strong><a name="item_more_users">More users</a></strong><br />
814 </dt>
815 <dd>
816 Additional user names, separate by commas and with no white space,
817 can be specified. These users will also have full permission in
818 the CGI interface to stop/start/browse/restore backups for this host.
819 These users will not be sent email about this host.
820 </dd>
821 <p></p></dl>
822 <p>The first non-comment line of the hosts file is special: it contains
823 the names of the columns and should not be edited.</p>
824 <p>Here's a simple example of a hosts file:</p>
825 <pre>
826 host dhcp user moreUsers
827 farside 0 craig jim,dave
828 larson 1 gary andy</pre>
829 <p>
830 </p>
831 <h2><a name="step_5__client_setup">Step 5: Client Setup</a></h2>
832 <p>Two methods for getting backup data from a client are supported: smb and
833 tar. Smb or rsync are the preferred methods for WinXX clients and rsync or
834 tar are the preferred methods for linux/unix clients.</p>
835 <p>The transfer method is set using the <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> configuration
836 setting. If you have a mixed environment (ie: you will use smb for some
837 clients and tar for others), you will need to pick the most common
838 choice for <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> for the main config.pl file, and then
839 override it in the per-PC config file for those hosts that will use
840 the other method. (Or you could run two completely separate instances
841 of BackupPC, with different data directories, one for WinXX and the
842 other for linux/unix, but then common files between the different
843 machine types will duplicated.)</p>
844 <p>Here are some brief client setup notes:</p>
845 <dl>
846 <dt><strong><a name="item_winxx">WinXX</a></strong><br />
847 </dt>
848 <dd>
849 The preferred setup for WinXX clients is to set <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> to ``smb''.
850 (Actually, for v2.0.0, rsyncd is the better method for WinXX if you are
851 prepared to run rsync/cygwin on your WinXX client. More information
852 about this will be provided via the FAQ.)
853 </dd>
854 <dd>
855 <p>If you want to use rsyncd for WinXX clients you can find a pre-packaged
856 zip file on <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. The package is called
857 cygwin-rsync. It contains rsync.exe, template setup files and the
858 minimal set of cygwin libraries for everything to run. The README file
859 contains instructions for running rsync as a service, so it starts
860 automatically everytime you boot your machine.</p>
861 </dd>
862 <dd>
863 <p>If you build your own rsync, for rsync 2.6.2 it is strongly
864 recommended you apply the patch in the cygwin-rsync package on
865 <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. This patch adds the --checksum-seed
866 option for checksum caching, and also sends all errors to the client,
867 which is important so BackupPC can log all file access errors.</p>
868 </dd>
869 <dd>
870 <p>Otherwise, to use SMB, you need to create shares for the data you want
871 to backup. Open ``My Computer'', right click on the drive (eg: C), and
872 select ``Sharing...'' (or select ``Properties'' and select the ``Sharing''
873 tab). In this dialog box you can enable sharing, select the share name
874 and permissions. Many machines will be configured by default to share
875 the entire C drive as C$ using the administrator password.</p>
876 </dd>
877 <dd>
878 <p>If this machine uses DHCP you will also need to make sure the
879 NetBios name is set. Go to Control Panel|System|Network Identification
880 (on Win2K) or Control Panel|System|Computer Name (on WinXP).
881 Also, you should go to Control Panel|Network Connections|Local Area
882 Connection|Properties|Internet Protocol (TCP/IP)|Properties|Advanced|WINS
883 and verify that NetBios is not disabled.</p>
884 </dd>
885 <dd>
886 <p>The relevant configuration settings are <a href="#item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName}</A>,
887 <a href="#item_%24conf%7bsmbshareusername%7d">$Conf{SmbShareUserName}</A>, <a href="#item_%24conf%7bsmbsharepasswd%7d">$Conf{SmbSharePasswd}</A>, <a href="#item_%24conf%7bsmbclientpath%7d">$Conf{SmbClientPath}</A>,
888 <a href="#item_%24conf%7bsmbclientfullcmd%7d">$Conf{SmbClientFullCmd}</A>, <a href="#item_%24conf%7bsmbclientincrcmd%7d">$Conf{SmbClientIncrCmd}</A> and
889 <a href="#item_%24conf%7bsmbclientrestorecmd%7d">$Conf{SmbClientRestoreCmd}</A>.</p>
890 </dd>
891 <dd>
892 <p>BackupPC needs to know the smb share user name and password for a
893 client machine that uses smb. The user name is specified in
894 <a href="#item_%24conf%7bsmbshareusername%7d">$Conf{SmbShareUserName}</A>. There are four ways to tell BackupPC the
895 smb share password:</p>
896 </dd>
897 <ul>
898 <li>
899 As an environment variable BPC_SMB_PASSWD set before BackupPC starts.
900 If you start BackupPC manually the BPC_SMB_PASSWD variable must be set
901 manually first. For backward compatibility for v1.5.0 and prior, the
902 environment variable PASSWD can be used if BPC_SMB_PASSWD is not set.
903 Warning: on some systems it is possible to see environment variables of
904 running processes.
905 <p></p>
906 <li>
907 Alternatively the BPC_SMB_PASSWD setting can be included in
908 /etc/init.d/backuppc, in which case you must make sure this file
909 is not world (other) readable.
910 <p></p>
911 <li>
912 As a configuration variable <a href="#item_%24conf%7bsmbsharepasswd%7d">$Conf{SmbSharePasswd}</A> in
913 __TOPDIR__/conf/config.pl. If you put the password
914 here you must make sure this file is not world (other) readable.
915 <p></p>
916 <li>
917 As a configuration variable <a href="#item_%24conf%7bsmbsharepasswd%7d">$Conf{SmbSharePasswd}</A> in the per-PC
918 configuration file, __TOPDIR__/pc/$host/config.pl. You will have to
919 use this option if the smb share password is different for each host.
920 If you put the password here you must make sure this file is not
921 world (other) readable.
922 <p></p></ul>
923 <p>Placement and protection of the smb share password is a possible
924 security risk, so please double-check the file and directory
925 permissions. In a future version there might be support for
926 encryption of this password, but a private key will still have to
927 be stored in a protected place. Suggestions are welcome.</p>
928 <p>As an alternative to setting <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> to ``smb'' (using
929 smbclient) for WinXX clients, you can use an smb network filesystem (eg:
930 ksmbfs or similar) on your linux/unix server to mount the share,
931 and then set <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> to ``tar'' (use tar on the network
932 mounted file system).</p>
933 <p>Also, to make sure that file names with 8-bit characters are correctly
934 transferred by smbclient you should add this to samba's smb.conf file
935 for samba 2.x:</p>
936 <pre>
937 [global]
938 # Accept the windows charset
939 client code page = 850
940 character set = ISO8859-1</pre>
941 <p>For samba 3.x this should instead be:</p>
942 <pre>
943 [global]
944 unix charset = ISO8859-1</pre>
945 <p>This setting should work for western europe.
946 See <a href="http://www.oreilly.com/catalog/samba/chapter/book/ch08_03.html">http://www.oreilly.com/catalog/samba/chapter/book/ch08_03.html</a>
947 for more information about settings for other languages.</p>
948 <dt><strong><a name="item_linux_2funix">Linux/Unix</a></strong><br />
949 </dt>
950 <dd>
951 The preferred setup for linux/unix clients is to set <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A>
952 to ``rsync'', ``rsyncd'' or ``tar''.
953 </dd>
954 <dd>
955 <p>You can use either rsync, smb, or tar for linux/unix machines. Smb requires
956 that the Samba server (smbd) be run to provide the shares. Since the smb
957 protocol can't represent special files like symbolic links and fifos,
958 tar and rsync are the better transport methods for linux/unix machines.
959 (In fact, by default samba makes symbolic links look like the file or
960 directory that they point to, so you could get an infinite loop if a
961 symbolic link points to the current or parent directory. If you really
962 need to use Samba shares for linux/unix backups you should turn off the
963 ``follow symlinks'' samba config setting. See the smb.conf manual page.)</p>
964 </dd>
965 <dd>
966 <p>The requirements for each Xfer Method are:</p>
967 </dd>
968 <dl>
969 <dt><strong><a name="item_tar">tar</a></strong><br />
970 </dt>
971 <dd>
972 You must have GNU tar on the client machine. Use ``tar --version''
973 or ``gtar --version'' to verify. The version should be at least
974 1.13.7, and 1.13.20 or greater is recommended. Tar is run on
975 the client machine via rsh or ssh.
976 </dd>
977 <dd>
978 <p>The relevant configuration settings are <a href="#item_%24conf%7btarclientpath%7d">$Conf{TarClientPath}</A>,
979 <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A>, <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A>, <a href="#item_%24conf%7btarfullargs%7d">$Conf{TarFullArgs}</A>,
980 <a href="#item_%24conf%7btarincrargs%7d">$Conf{TarIncrArgs}</A>, and <a href="#item_%24conf%7btarclientrestorecmd%7d">$Conf{TarClientRestoreCmd}</A>.</p>
981 </dd>
982 <p></p>
983 <dt><strong><a name="item_rsync">rsync</a></strong><br />
984 </dt>
985 <dd>
986 You should have at least rsync 2.5.5, and the latest version 2.5.6
987 is recommended. Rsync is run on the remote client via rsh or ssh.
988 </dd>
989 <dd>
990 <p>The relevant configuration settings are <a href="#item_%24conf%7brsyncclientpath%7d">$Conf{RsyncClientPath}</A>,
991 <a href="#item_%24conf%7brsyncclientcmd%7d">$Conf{RsyncClientCmd}</A>, <a href="#item_%24conf%7brsyncclientrestorecmd%7d">$Conf{RsyncClientRestoreCmd}</A>, <a href="#item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName}</A>,
992 <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>, and <a href="#item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs}</A>.</p>
993 </dd>
994 <p></p>
995 <dt><strong><a name="item_rsyncd">rsyncd</a></strong><br />
996 </dt>
997 <dd>
998 You should have at least rsync 2.5.5, and the latest version 2.6.2
999 is recommended. In this case the rsync daemon should be running on
1000 the client machine and BackupPC connects directly to it.
1001 </dd>
1002 <dd>
1003 <p>The relevant configuration settings are <a href="#item_%24conf%7brsyncdclientport%7d">$Conf{RsyncdClientPort}</A>,
1004 <a href="#item_%24conf%7brsyncdusername%7d">$Conf{RsyncdUserName}</A>, <a href="#item_%24conf%7brsyncdpasswd%7d">$Conf{RsyncdPasswd}</A>, <a href="#item_%24conf%7brsyncdauthrequired%7d">$Conf{RsyncdAuthRequired}</A>,
1005 <a href="#item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName}</A>, <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>, and <a href="#item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs}</A>.
1006 <a href="#item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName}</A> is the name of an rsync module (ie: the thing
1007 in square brackets in rsyncd's conf file -- see rsyncd.conf), not a
1008 file system path.</p>
1009 </dd>
1010 <dd>
1011 <p>Be aware that rsyncd will remove the leading '/' from path names in
1012 symbolic links if you specify ``use chroot = no'' in the rsynd.conf file.
1013 See the rsyncd.conf manual page for more information.</p>
1014 </dd>
1015 <p></p></dl>
1016 <p>For linux/unix machines you should not backup ``/proc''. This directory
1017 contains a variety of files that look like regular files but they are
1018 special files that don't need to be backed up (eg: /proc/kcore is a
1019 regular file that contains physical memory). See <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A>.
1020 It is safe to back up /dev since it contains mostly character-special
1021 and block-special files, which are correctly handed by BackupPC
1022 (eg: backing up /dev/hda5 just saves the block-special file information,
1023 not the contents of the disk).</p>
1024 <p>Alternatively, rather than backup all the file systems as a single
1025 share (``/''), it is easier to restore a single file system if you backup
1026 each file system separately. To do this you should list each file system
1027 mount point in <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> or <a href="#item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName}</A>, and add the
1028 --one-file-system option to <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> or add --one-file-system
1029 (note the different punctuation) to <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>. In this case there
1030 is no need to exclude /proc explicitly since it looks like a different
1031 file system.</p>
1032 <p>Next you should decide whether to run tar over ssh, rsh or nfs. Ssh is
1033 the preferred method. Rsh is not secure and therefore not recommended.
1034 Nfs will work, but you need to make sure that the BackupPC user (running
1035 on the server) has sufficient permissions to read all the files below
1036 the nfs mount.</p>
1037 <p>Ssh allows BackupPC to run as a privileged user on the client (eg:
1038 root), since it needs sufficient permissions to read all the backup
1039 files. Ssh is setup so that BackupPC on the server (an otherwise low
1040 privileged user) can ssh as root on the client, without being prompted
1041 for a password. There are two common versions of ssh: v1 and v2. Here
1042 are some instructions for one way to setup ssh. (Check which version
1043 of SSH you have by typing ``ssh'' or ``man ssh''.)</p>
1044 <dt><strong><a name="item_mac_os_x">Mac OS X</a></strong><br />
1045 </dt>
1046 <dd>
1047 In general this should be similar to Linux/Unix machines.
1048 Many users have reported success using xtar, which also
1049 backs up the Mac OS X resource forks.
1050 </dd>
1051 <dd>
1052 <p>Other choices include rsync and Mark Stosberg reports that you
1053 can also use hfstar.
1054 See <a href="http://fink.sourceforge.net/pdb/package.php/hfstar">http://fink.sourceforge.net/pdb/package.php/hfstar</a>.</p>
1055 </dd>
1056 <p></p>
1057 <dt><strong><a name="item_ssh_setup">SSH Setup</a></strong><br />
1058 </dt>
1059 <dd>
1060 SSH is a secure way to run tar or rsync on a backup client to extract
1061 the data. SSH provides strong authentication and encryption of
1062 the network data.
1063 </dd>
1064 <dd>
1065 <p>Note that if you run rsyncd (rsync daemon), ssh is not used.
1066 In this case, rsyncd provides its own authentication, but there
1067 is no encryption of network data. If you want encryption of
1068 network data you can use ssh to create a tunnel, or use a
1069 program like stunnel. If someone submits instructions I</p>
1070 </dd>
1071 <dd>
1072 <p>Setup instructions for ssh are at
1073 <a href="http://backuppc.sourceforge.net/faq/ssh.html">http://backuppc.sourceforge.net/faq/ssh.html</a>.</p>
1074 </dd>
1075 <p></p>
1076 <dt><strong><a name="item_clients_that_use_dhcp">Clients that use DHCP</a></strong><br />
1077 </dt>
1078 <dd>
1079 If a client machine uses DHCP BackupPC needs some way to find the
1080 IP address given the host name. One alternative is to set dhcp
1081 to 1 in the hosts file, and BackupPC will search a pool of IP
1082 addresses looking for hosts. More efficiently, it is better to
1083 set dhcp = 0 and provide a mechanism for BackupPC to find the
1084 IP address given the host name.
1085 </dd>
1086 <dd>
1087 <p>For WinXX machines BackupPC uses the NetBios name server to determine
1088 the IP address given the host name.
1089 For unix machines you can run nmbd (the NetBios name server) from
1090 the Samba distribution so that the machine responds to a NetBios
1091 name request. See the manual page and Samba documentation for more
1092 information.</p>
1093 </dd>
1094 <dd>
1095 <p>Alternatively, you can set <a href="#item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd}</A> to any command
1096 that returns the IP address given the host name.</p>
1097 </dd>
1098 <dd>
1099 <p>Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a>
1100 for more details.</p>
1101 </dd>
1102 <p></p></dl>
1103 <p>
1104 </p>
1105 <h2><a name="step_6__running_backuppc">Step 6: Running BackupPC</a></h2>
1106 <p>The installation contains an init.d backuppc script that can be copied
1107 to /etc/init.d so that BackupPC can auto-start on boot.
1108 See init.d/README for further instructions.</p>
1109 <p>BackupPC should be ready to start. If you installed the init.d script,
1110 then you should be able to run BackupPC with:</p>
1111 <pre>
1112 /etc/init.d/backuppc start</pre>
1113 <p>(This script can also be invoked with ``stop'' to stop BackupPC and ``reload''
1114 to tell BackupPC to reload config.pl and the hosts file.)</p>
1115 <p>Otherwise, just run</p>
1116 <pre>
1117 __INSTALLDIR__/bin/BackupPC -d</pre>
1118 <p>as user __BACKUPPCUSER__. The -d option tells BackupPC to run as a daemon
1119 (ie: it does an additional fork).</p>
1120 <p>Any immediate errors will be printed to stderr and BackupPC will quit.
1121 Otherwise, look in __TOPDIR__/log/LOG and verify that BackupPC reports
1122 it has started and all is ok.</p>
1123 <p>
1124 </p>
1125 <h2><a name="step_7__talking_to_backuppc">Step 7: Talking to BackupPC</a></h2>
1126 <p>Note: as of version 1.5.0, BackupPC no longer supports telnet
1127 to its TCP port. First off, a unix domain socket is used
1128 instead of a TCP port. (The TCP port can still be re-enabled
1129 if your installation has apache and BackupPC running on different
1130 machines.) Secondly, even if you still use the TCP port, the
1131 messages exchanged over this interface are now protected by
1132 an MD5 digest based on a shared secret (see <a href="#item_%24conf%7bservermesgsecret%7d">$Conf{ServerMesgSecret}</A>)
1133 as well as sequence numbers and per-session unique keys, preventing
1134 forgery and replay attacks.</p>
1135 <p>You should verify that BackupPC is running by using BackupPC_serverMesg.
1136 This sends a message to BackupPC via the unix (or TCP) socket and prints
1137 the response.</p>
1138 <p>You can request status information and start and stop backups using this
1139 interface. This socket interface is mainly provided for the CGI interface
1140 (and some of the BackupPC sub-programs use it too). But right now we just
1141 want to make sure BackupPC is happy. Each of these commands should
1142 produce some status output:</p>
1143 <pre>
1144 __INSTALLDIR__/bin/BackupPC_serverMesg status info
1145 __INSTALLDIR__/bin/BackupPC_serverMesg status jobs
1146 __INSTALLDIR__/bin/BackupPC_serverMesg status hosts</pre>
1147 <p>The output should be some hashes printed with Data::Dumper. If it
1148 looks cryptic and confusing, and doesn't look like an error message,
1149 then all is ok.</p>
1150 <p>The jobs status should initially show just BackupPC_trashClean.
1151 The hosts status should produce a list of every host you have listed
1152 in __TOPDIR__/conf/hosts as part of a big cryptic output line.</p>
1153 <p>You can also request that all hosts be queued:</p>
1154 <pre>
1155 __INSTALLDIR__/bin/BackupPC_serverMesg backup all</pre>
1156 <p>At this point you should make sure the CGI interface works since
1157 it will be much easier to see what is going on. That's our
1158 next subject.</p>
1159 <p>
1160 </p>
1161 <h2><a name="step_8__cgi_interface">Step 8: CGI interface</a></h2>
1162 <p>The CGI interface script, BackupPC_Admin, is a powerful and flexible
1163 way to see and control what BackupPC is doing. It is written for an
1164 Apache server. If you don't have Apache, see <a href="http://www.apache.org">http://www.apache.org</a>.</p>
1165 <p>There are two options for setting up the CGI interface: standard
1166 mode and using mod_perl. Mod_perl provides much higher performance
1167 (around 15x) and is the best choice if your Apache was built with
1168 mod_perl support. To see if your apache was built with mod_perl
1169 run this command:</p>
1170 <pre>
1171 httpd -l | egrep mod_perl</pre>
1172 <p>If this prints mod_perl.c then your Apache supports mod_perl.</p>
1173 <p>Using mod_perl with BackupPC_Admin requires a dedicated Apache
1174 to be run as the BackupPC user (__BACKUPPCUSER__). This is
1175 because BackupPC_Admin needs permission to access various files
1176 in BackupPC's data directories. In contrast, the standard
1177 installation (without mod_perl) solves this problem by having
1178 BackupPC_Admin installed as setuid to the BackupPC user, so that
1179 BackupPC_Admin runs as the BackuPC user.</p>
1180 <p>Here are some specifics for each setup:</p>
1181 <dl>
1182 <dt><strong><a name="item_standard_setup">Standard Setup</a></strong><br />
1183 </dt>
1184 <dd>
1185 The CGI interface should have been installed by the configure.pl script
1186 in __CGIDIR__/BackupPC_Admin. BackupPC_Admin should have been installed
1187 as setuid to the BackupPC user (__BACKUPPCUSER__), in addition to user
1188 and group execute permission.
1189 </dd>
1190 <dd>
1191 <p>You should be very careful about permissions on BackupPC_Admin and
1192 the directory __CGIDIR__: it is important that normal users cannot
1193 directly execute or change BackupPC_Admin, otherwise they can access
1194 backup files for any PC. You might need to change the group ownership
1195 of BackupPC_Admin to a group that Apache belongs to so that Apache
1196 can execute it (don't add ``other'' execute permission!).
1197 The permissions should look like this:</p>
1198 </dd>
1199 <dd>
1200 <pre>
1201 ls -l __CGIDIR__/BackupPC_Admin
1202 -swxr-x--- 1 __BACKUPPCUSER__ web 82406 Jun 17 22:58 __CGIDIR__/BackupPC_Admin</pre>
1203 </dd>
1204 <dd>
1205 <p>The setuid script won't work unless perl on your machine was installed
1206 with setuid emulation. This is likely the problem if you get an error
1207 saying such as ``Wrong user: my userid is 25, instead of 150'', meaning
1208 the script is running as the httpd user, not the BackupPC user.
1209 This is because setuid scripts are disabled by the kernel in most
1210 flavors of unix and linux.</p>
1211 </dd>
1212 <dd>
1213 <p>To see if your perl has setuid emulation, see if there is a program
1214 called sperl5.6.0 (or sperl5.8.2 etc, based on your perl version)
1215 in the place where perl is installed. If you can't find this program,
1216 then you have two options: rebuild and reinstall perl with the setuid
1217 emulation turned on (answer ``y'' to the question ``Do you want to do
1218 setuid/setgid emulation?'' when you run perl's configure script), or
1219 switch to the mod_perl alternative for the CGI script (which doesn't
1220 need setuid to work).</p>
1221 </dd>
1222 <p></p>
1223 <dt><strong><a name="item_mod_perl_setup">Mod_perl Setup</a></strong><br />
1224 </dt>
1225 <dd>
1226 The advantage of the mod_perl setup is that no setuid script is needed,
1227 and there is a huge performance advantage. Not only does all the perl
1228 code need to be parsed just once, the config.pl and hosts files, plus
1229 the connection to the BackupPC server are cached between requests. The
1230 typical speedup is around 15 times.
1231 </dd>
1232 <dd>
1233 <p>To use mod_perl you need to run Apache as user __BACKUPPCUSER__.
1234 If you need to run multiple Apache's for different services then
1235 you need to create multiple top-level Apache directories, each
1236 with their own config file. You can make copies of /etc/init.d/httpd
1237 and use the -d option to httpd to point each http to a different
1238 top-level directory. Or you can use the -f option to explicitly
1239 point to the config file. Multiple Apache's will run on different
1240 Ports (eg: 80 is standard, 8080 is a typical alternative port accessed
1241 via <a href="http://yourhost.com:8080).">http://yourhost.com:8080).</a></p>
1242 </dd>
1243 <dd>
1244 <p>Inside BackupPC's Apache http.conf file you should check the
1245 settings for ServerRoot, DocumentRoot, User, Group, and Port. See
1246 <a href="http://httpd.apache.org/docs/server-wide.html">http://httpd.apache.org/docs/server-wide.html</a> for more details.</p>
1247 </dd>
1248 <dd>
1249 <p>For mod_perl, BackupPC_Admin should not have setuid permission, so
1250 you should turn it off:</p>
1251 </dd>
1252 <dd>
1253 <pre>
1254 chmod u-s __CGIDIR__/BackupPC_Admin</pre>
1255 </dd>
1256 <dd>
1257 <p>To tell Apache to use mod_perl to execute BackupPC_Admin, add this
1258 to Apache's 1.x httpd.conf file:</p>
1259 </dd>
1260 <dd>
1261 <pre>
1262 &lt;IfModule mod_perl.c&gt;
1263 PerlModule Apache::Registry
1264 PerlTaintCheck On
1265 &lt;Location /cgi-bin/BackupPC/BackupPC_Admin&gt; # &lt;--- change path as needed
1266 SetHandler perl-script
1267 PerlHandler Apache::Registry
1268 Options ExecCGI
1269 PerlSendHeader On
1270 &lt;/Location&gt;
1271 &lt;/IfModule&gt;</pre>
1272 </dd>
1273 <dd>
1274 <p>Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that
1275 this works (with tweaks from Michael Tuzi):</p>
1276 </dd>
1277 <dd>
1278 <pre>
1279 LoadModule perl_module modules/mod_perl.so
1280 PerlModule Apache2</pre>
1281 </dd>
1282 <dd>
1283 <pre>
1284 &lt;Directory /path/to/cgi/&gt;
1285 SetHandler perl-script
1286 PerlResponseHandler ModPerl::Registry
1287 PerlOptions +ParseHeaders
1288 Options +ExecCGI
1289 Order deny,allow
1290 Deny from all
1291 Allow from 192.168.0
1292 AuthName &quot;Backup Admin&quot;
1293 AuthType Basic
1294 AuthUserFile /path/to/user_file
1295 Require valid-user
1296 &lt;/Directory&gt;</pre>
1297 </dd>
1298 <dd>
1299 <p>There are other optimizations and options with mod_perl. For
1300 example, you can tell mod_perl to preload various perl modules,
1301 which saves memory compared to loading separate copies in every
1302 Apache process after they are forked. See Stas's definitive
1303 mod_perl guide at <a href="http://perl.apache.org/guide">http://perl.apache.org/guide</a>.</p>
1304 </dd>
1305 <p></p></dl>
1306 <p>BackupPC_Admin requires that users are authenticated by Apache.
1307 Specifically, it expects that Apache sets the REMOTE_USER environment
1308 variable when it runs. There are several ways to do this. One way
1309 is to create a .htaccess file in the cgi-bin directory that looks like:</p>
1310 <pre>
1311 AuthGroupFile /etc/httpd/conf/group # &lt;--- change path as needed
1312 AuthUserFile /etc/http/conf/passwd # &lt;--- change path as needed
1313 AuthType basic
1314 AuthName &quot;access&quot;
1315 require valid-user</pre>
1316 <p>You will also need ``AllowOverride Indexes AuthConfig'' in the Apache
1317 httpd.conf file to enable the .htaccess file. Alternatively, everything
1318 can go in the Apache httpd.conf file inside a Location directive. The
1319 list of users and password file above can be extracted from the NIS
1320 passwd file.</p>
1321 <p>One alternative is to use LDAP. In Apache's http.conf add these lines:</p>
1322 <pre>
1323 LoadModule auth_ldap_module modules/auth_ldap.so
1324 AddModule auth_ldap.c</pre>
1325 <pre>
1326 # cgi-bin - auth via LDAP (for BackupPC)
1327 &lt;Location /cgi-binBackupPC/BackupPC_Admin&gt; # &lt;--- change path as needed
1328 AuthType Basic
1329 AuthName &quot;BackupPC login&quot;
1330 # replace MYDOMAIN, PORT, ORG and CO as needed
1331 AuthLDAPURL ldap://ldap.MYDOMAIN.com:PORT/o=ORG,c=CO?uid?sub?(objectClass=*)
1332 require valid-user
1333 &lt;/Location&gt;</pre>
1334 <p>If you want to disable the user authentication you can set
1335 <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A> to '*', which allows any user to have
1336 full access to all hosts and backups. In this case the REMOTE_USER
1337 environment variable does not have to be set by Apache.</p>
1338 <p>Alternatively, you can force a particular user name by getting Apache
1339 to set REMOTE_USER, eg, to hardcode the user to www you could add
1340 this to Apache's httpd.conf:</p>
1341 <pre>
1342 &lt;Location /cgi-bin/BackupPC/BackupPC_Admin&gt; # &lt;--- change path as needed
1343 Setenv REMOTE_USER www
1344 &lt;/Location&gt;</pre>
1345 <p>Finally, you should also edit the config.pl file and adjust, as necessary,
1346 the CGI-specific settings. They're near the end of the config file. In
1347 particular, you should specify which users or groups have administrator
1348 (privileged) access: see the config settings <a href="#item_%24conf%7bcgiadminusergroup%7d">$Conf{CgiAdminUserGroup}</A>
1349 and <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A>. Also, the configure.pl script placed various
1350 images into <a href="#item_%24conf%7bcgiimagedir%7d">$Conf{CgiImageDir}</A> that BackupPC_Admin needs to serve
1351 up. You should make sure that <a href="#item_%24conf%7bcgiimagedirurl%7d">$Conf{CgiImageDirURL}</A> is the correct
1352 URL for the image directory.</p>
1353 <p>See the section <a href="#fixing_installation_problems">Fixing installation problems</a> for suggestions on debugging the Apache authentication setup.</p>
1354 <p>
1355 </p>
1356 <h2><a name="how_backuppc_finds_hosts">How BackupPC Finds Hosts</a></h2>
1357 <p>Starting with v2.0.0 the way hosts are discovered has changed. In most
1358 cases you should specify 0 for the DHCP flag in the conf/hosts file,
1359 even if the host has a dynamically assigned IP address.</p>
1360 <p>BackupPC (starting with v2.0.0) looks up hosts with DHCP = 0 in this manner:</p>
1361 <ul>
1362 <li>
1363 First DNS is used to lookup the IP address given the client's name
1364 using perl's <code>gethostbyname()</code> function. This should succeed for machines
1365 that have fixed IP addresses that are known via DNS. You can manually
1366 see whether a given host have a DNS entry according to perls'
1367 gethostbyname function with this command:
1368 <pre>
1369 perl -e 'print(gethostbyname(&quot;myhost&quot;) ? &quot;ok\n&quot; : &quot;not found\n&quot;);'</pre>
1370 <p></p>
1371 <li>
1372 If <code>gethostbyname()</code> fails, BackupPC then attempts a NetBios multicast to
1373 find the host. Provided your client machine is configured properly,
1374 it should respond to this NetBios multicast request. Specifically,
1375 BackupPC runs a command of this form:
1376 <pre>
1377 nmblookup myhost</pre>
1378 <p>If this fails you will see output like:</p>
1379 <pre>
1380 querying myhost on 10.10.255.255
1381 name_query failed to find name myhost</pre>
1382 <p>If this success you will see output like:</p>
1383 <pre>
1384 querying myhost on 10.10.255.255
1385 10.10.1.73 myhost&lt;00&gt;</pre>
1386 <p>Depending on your netmask you might need to specify the -B option to
1387 nmblookup. For example:</p>
1388 <pre>
1389 nmblookup -B 10.10.1.255 myhost</pre>
1390 <p>If necessary, experiment on the nmblookup command that will return the
1391 IP address of the client given its name. Then update
1392 <a href="#item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd}</A> with any necessary options to nmblookup.</p>
1393 <p></p></ul>
1394 <p>For hosts that have the DHCP flag set to 1, these machines are
1395 discovered as follows:</p>
1396 <ul>
1397 <li>
1398 A DHCP address pool (<a href="#item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges}</A>) needs to be specified.
1399 BackupPC will check the NetBIOS name of each machine in the range using
1400 a command of the form:
1401 <pre>
1402 nmblookup -A W.X.Y.Z</pre>
1403 <p>where W.X.Y.Z is each candidate address from <a href="#item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges}</A>.
1404 Any host that has a valid NetBIOS name returned by this command (ie:
1405 matching an entry in the hosts file) will be backed up. You can
1406 modify the specific nmblookup command if necessary via <a href="#item_%24conf%7bnmblookupcmd%7d">$Conf{NmbLookupCmd}</A>.</p>
1407 <p></p>
1408 <li>
1409 You only need to use this DHCP feature if your client machine doesn't
1410 respond to the NetBios multicast request:
1411 <pre>
1412 nmblookup myHost</pre>
1413 <p>but does respond to a request directed to its IP address:</p>
1414 <pre>
1415 nmblookup -A W.X.Y.Z</pre>
1416 <p></p></ul>
1417 <p>
1418 </p>
1419 <h2><a name="other_installation_topics">Other installation topics</a></h2>
1420 <dl>
1421 <dt><strong><a name="item_removing_a_client">Removing a client</a></strong><br />
1422 </dt>
1423 <dd>
1424 If there is a machine that no longer needs to be backed up (eg: a retired
1425 machine) you have two choices. First, you can keep the backups accessible
1426 and browsable, but disable all new backups. Alternatively, you can
1427 completely remove the client and all its backups.
1428 </dd>
1429 <dd>
1430 <p>To disable backups for a client there are two special values for
1431 <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A> in that client's per-PC config.pl file:</p>
1432 </dd>
1433 <dl>
1434 <dt><strong><a name="item__2d1">-1</a></strong><br />
1435 </dt>
1436 <dd>
1437 Don't do any regular backups on this machine. Manually
1438 requested backups (via the CGI interface) will still occur.
1439 </dd>
1440 <p></p>
1441 <dt><strong><a name="item__2d2">-2</a></strong><br />
1442 </dt>
1443 <dd>
1444 Don't do any backups on this machine. Manually requested
1445 backups (via the CGI interface) will be ignored.
1446 </dd>
1447 <p></p></dl>
1448 <p>This will still allow that client's old backups to be browsable
1449 and restorable.</p>
1450 <p>To completely remove a client and all its backups, you should remove its
1451 entry in the conf/hosts file, and then delete the __TOPDIR__/pc/$host
1452 directory. Whenever you change the hosts file, you should send
1453 BackupPC a HUP (-1) signal so that it re-reads the hosts file.
1454 If you don't do this, BackupPC will automatically re-read the
1455 hosts file at the next regular wakeup.</p>
1456 <p>Note that when you remove a client's backups you won't initially recover
1457 a lot of disk space. That's because the client's files are still in
1458 the pool. Overnight, when BackupPC_nightly next runs, all the unused
1459 pool files will be deleted and this will recover the disk space used
1460 by the client's backups.</p>
1461 <dt><strong><a name="item_copying_the_pool">Copying the pool</a></strong><br />
1462 </dt>
1463 <dd>
1464 If the pool disk requirements grow you might need to copy the entire
1465 data directory to a new (bigger) file system. Hopefully you are lucky
1466 enough to avoid this by having the data directory on a RAID file system
1467 or LVM that allows the capacity to be grown in place by adding disks.
1468 </dd>
1469 <dd>
1470 <p>The backup data directories contain large numbers of hardlinks. If
1471 you try to copy the pool the target directory will occupy a lot more
1472 space if the hardlinks aren't re-established.</p>
1473 </dd>
1474 <dd>
1475 <p>The GNU cp program with the -a option is aware of hardlinks and knows
1476 to re-establish them. So GNU cp -a is the recommended way to copy
1477 the data directory and pool. Don't forget to stop BackupPC while
1478 the copy runs.</p>
1479 </dd>
1480 <p></p>
1481 <dt><strong><a name="item_compressing_an_existing_pool">Compressing an existing pool</a></strong><br />
1482 </dt>
1483 <dd>
1484 If you are upgrading BackupPC and want to turn compression on you have
1485 two choices:
1486 </dd>
1487 <ul>
1488 <li>
1489 Simply turn on compression. All new backups will be compressed. Both old
1490 (uncompressed) and new (compressed) backups can be browsed and viewed.
1491 Eventually, the old backups will expire and all the pool data will be
1492 compressed. However, until the old backups expire, this approach could
1493 require 60% or more additional pool storage space to store both
1494 uncompressed and compressed versions of the backup files.
1495 <p></p>
1496 <li>
1497 Convert all the uncompressed pool files and backups to compressed.
1498 The script __INSTALLDIR__/bin/BackupPC_compressPool does this.
1499 BackupPC must not be running when you run BackupPC_compressPool.
1500 Also, there must be no existing compressed backups when you
1501 run BackupPC_compressPool.
1502 <p>BackupPC_compressPool compresses all the files in the uncompressed pool
1503 (__TOPDIR__/pool) and moves them to the compressed pool
1504 (__TOPDIR__/cpool). It rewrites the files in place, so that the
1505 existing hardlinks are not disturbed.</p>
1506 <p></p></ul>
1507 <p>The rest of this section discusses how to run BackupPC_compressPool.</p>
1508 <p>BackupPC_compressPool takes three command line options:</p>
1509 <dl>
1510 <dt><strong><a name="item__2dt">-t</a></strong><br />
1511 </dt>
1512 <dd>
1513 Test mode: do everything except actually replace the pool files.
1514 Useful for estimating total run time without making any real
1515 changes.
1516 </dd>
1517 <p></p>
1518 <dt><strong><a name="item__2dr">-r</a></strong><br />
1519 </dt>
1520 <dd>
1521 Read check: re-read the compressed file and compare it against
1522 the original uncompressed file. Can only be used in test mode.
1523 </dd>
1524 <p></p>
1525 <dt><strong><a name="item__2dc__23">-c #</a></strong><br />
1526 </dt>
1527 <dd>
1528 Number of children to fork. BackupPC_compressPool can take a long time
1529 to run, so to speed things up it spawns four children, each working on a
1530 different part of the pool. You can change the number of children with
1531 the -c option.
1532 </dd>
1533 <p></p></dl>
1534 <p>Here are the recommended steps for running BackupPC_compressPool:</p>
1535 <ul>
1536 <li>
1537 Stop BackupPC (eg: ``/etc/init.d/backuppc stop'').
1538 <p></p>
1539 <li>
1540 Set <a href="#item_%24conf%7bcompresslevel%7d">$Conf{CompressLevel}</A> to a non-zero number (eg: 3).
1541 <p></p>
1542 <li>
1543 Do a dry run of BackupPC_compressPool. Make sure you run this as
1544 the BackupPC user (__BACKUPPCUSER__):
1545 <pre>
1546 BackupPC_compressPool -t -r</pre>
1547 <p>The -t option (test mode) makes BackupPC_compressPool do all the steps,
1548 but not actually change anything. The -r option re-reads the compressed
1549 file and compares it against the original.</p>
1550 <p>BackupPC_compressPool gives a status as it completes each 1% of the job.
1551 It also shows the cumulative compression ratio and estimated completion
1552 time. Once you are comfortable that things look ok, you can kill
1553 BackupPC_compressPool or wait for it to finish.</p>
1554 <p></p>
1555 <li>
1556 Now you are ready to run BackupPC_compressPool for real. Once again,
1557 as the BackupPC user (__BACKUPPCUSER__), run:
1558 <pre>
1559 BackupPC_compressPool</pre>
1560 <p>You should put the output into a file and tail this file. (The running
1561 time could be twice as long as the test mode since the test mode file
1562 writes are immediately followed by an unlink, so in test mode it is
1563 likely the file writes never make it to disk.)</p>
1564 <p>It is <strong>critical</strong> that BackupPC_compressPool runs to completion before
1565 re-starting BackupPC. Before BackupPC_compressPool completes, none of
1566 the existing backups will be in a consistent state. If you must stop
1567 BackupPC_compressPool for some reason, send it an INT or TERM signal
1568 and give it several seconds (or more) to clean up gracefully.
1569 After that, you can re-run BackupPC_compressPool and it will start
1570 again where it left off. Once again, it is critical that it runs
1571 to 100% completion.</p>
1572 <p></p></ul>
1573 <p>After BackupPC_compressPool completes you should have a complete set
1574 of compressed backups (and your disk usage should be lower). You
1575 can now re-start BackupPC.</p>
1576 </dl>
1577 <p>
1578 </p>
1579 <h2><a name="fixing_installation_problems">Fixing installation problems</a></h2>
1580 <p>Please see the FAQ at <a href="http://backuppc.sourceforge.net/faq">http://backuppc.sourceforge.net/faq</a> for
1581 debugging suggestions.</p>
1582 <p>
1583 <a href="#__index__"><small>Back to Top</small></a>
1584 </p>
1585 <hr />
1586 <h1><a name="restore_functions">Restore functions</a></h1>
1587 <p>BackupPC supports several different methods for restoring files. The
1588 most convenient restore options are provided via the CGI interface.
1589 Alternatively, backup files can be restored using manual commands.</p>
1590 <p>
1591 </p>
1592 <h2><a name="cgi_restore_options">CGI restore options</a></h2>
1593 <p>By selecting a host in the CGI interface, a list of all the backups
1594 for that machine will be displayed. By selecting the backup number
1595 you can navigate the shares and directory tree for that backup.</p>
1596 <p>BackupPC's CGI interface automatically fills incremental backups
1597 with the corresponding full backup, which means each backup has
1598 a filled appearance. Therefore, there is no need to do multiple
1599 restores from the incremental and full backups: BackupPC does all
1600 the hard work for you. You simply select the files and directories
1601 you want from the correct backup vintage in one step.</p>
1602 <p>You can download a single backup file at any time simply by selecting
1603 it. Your browser should prompt you with the file name and ask you
1604 whether to open the file or save it to disk.</p>
1605 <p>Alternatively, you can select one or more files or directories in
1606 the currently selected directory and select ``Restore selected files''.
1607 (If you need to restore selected files and directories from several
1608 different parent directories you will need to do that in multiple
1609 steps.)</p>
1610 <p>If you select all the files in a directory, BackupPC will replace
1611 the list of files with the parent directory. You will be presented
1612 with a screen that has three options:</p>
1613 <dl>
1614 <dt><strong><a name="item_option_1_3a_direct_restore">Option 1: Direct Restore</a></strong><br />
1615 </dt>
1616 <dd>
1617 With this option the selected files and directories are restored
1618 directly back onto the host, by default in their original location.
1619 Any old files with the same name will be overwritten, so use caution.
1620 You can optionally change the target host name, target share name,
1621 and target path prefix for the restore, allowing you to restore the
1622 files to a different location.
1623 </dd>
1624 <dd>
1625 <p>Once you select ``Start Restore'' you will be prompted one last time
1626 with a summary of the exact source and target files and directories
1627 before you commit. When you give the final go ahead the restore
1628 operation will be queued like a normal backup job, meaning that it
1629 will be deferred if there is a backup currently running for that host.
1630 When the restore job is run, smbclient, tar, rsync or rsyncd is used
1631 (depending upon <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A>) to actually restore the files.
1632 Sorry, there is currently no option to cancel a restore that has been
1633 started.</p>
1634 </dd>
1635 <dd>
1636 <p>A record of the restore request, including the result and list of
1637 files and directories, is kept. It can be browsed from the host's
1638 home page. <a href="#item_%24conf%7brestoreinfokeepcnt%7d">$Conf{RestoreInfoKeepCnt}</A> specifies how many old restore
1639 status files to keep.</p>
1640 </dd>
1641 <dd>
1642 <p>Note that for direct restore to work, the <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> must
1643 be able to write to the client. For example, that means an SMB
1644 share for smbclient needs to be writable, and the rsyncd module
1645 needs ``read only'' set to ``false''. This creates additional security
1646 risks. If you only create read-only SMB shares (which is a good
1647 idea), then the direct restore will fail. You can disable the
1648 direct restore option by setting <a href="#item_%24conf%7bsmbclientrestorecmd%7d">$Conf{SmbClientRestoreCmd}</A>,
1649 <a href="#item_%24conf%7btarclientrestorecmd%7d">$Conf{TarClientRestoreCmd}</A> and <a href="#item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs}</A> to undef.</p>
1650 </dd>
1651 <p></p>
1652 <dt><strong><a name="item_option_2_3a_download_zip_archive">Option 2: Download Zip archive</a></strong><br />
1653 </dt>
1654 <dd>
1655 With this option a zip file containing the selected files and directories
1656 is downloaded. The zip file can then be unpacked or individual files
1657 extracted as necessary on the host machine. The compression level can be
1658 specified. A value of 0 turns off compression.
1659 </dd>
1660 <dd>
1661 <p>When you select ``Download Zip File'' you should be prompted where to
1662 save the restore.zip file.</p>
1663 </dd>
1664 <dd>
1665 <p>BackupPC does not consider downloading a zip file as an actual
1666 restore operation, so the details are not saved for later browsing
1667 as in the first case. However, a mention that a zip file was
1668 downloaded by a particular user, and a list of the files, does
1669 appear in BackupPC's log file.</p>
1670 </dd>
1671 <p></p>
1672 <dt><strong><a name="item_option_3_3a_download_tar_archive">Option 3: Download Tar archive</a></strong><br />
1673 </dt>
1674 <dd>
1675 This is identical to the previous option, except a tar file is downloaded
1676 rather than a zip file (and there is currently no compression option).
1677 </dd>
1678 <p></p></dl>
1679 <p>
1680 </p>
1681 <h2><a name="commandline_restore_options">Command-line restore options</a></h2>
1682 <p>Apart from the CGI interface, BackupPC allows you to restore files
1683 and directories from the command line. The following programs can
1684 be used:</p>
1685 <dl>
1686 <dt><strong><a name="item_backuppc_zcat">BackupPC_zcat</a></strong><br />
1687 </dt>
1688 <dd>
1689 For each file name argument it inflates (uncompresses) the file and
1690 writes it to stdout. To use BackupPC_zcat you could give it the
1691 full file name, eg:
1692 </dd>
1693 <dd>
1694 <pre>
1695 __INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/host/5/fc/fcraig/fexample.txt &gt; example.txt</pre>
1696 </dd>
1697 <dd>
1698 <p>It's your responsibility to make sure the file is really compressed:
1699 BackupPC_zcat doesn't check which backup the requested file is from.
1700 BackupPC_zcat returns a non-zero status if it fails to uncompress
1701 a file.</p>
1702 </dd>
1703 <p></p>
1704 <dt><strong><a name="item_backuppc_tarcreate">BackupPC_tarCreate</a></strong><br />
1705 </dt>
1706 <dd>
1707 BackupPC_tarCreate creates a tar file for any files or directories in
1708 a particular backup. Merging of incrementals is done automatically,
1709 so you don't need to worry about whether certain files appear in the
1710 incremental or full backup.
1711 </dd>
1712 <dd>
1713 <p>The usage is:</p>
1714 </dd>
1715 <dd>
1716 <pre>
1717 BackupPC_tarCreate [-t] [-h host] [-n dumpNum] [-s shareName]
1718 [-r pathRemove] [-p pathAdd] [-b BLOCKS] [-w writeBufSz]
1719 files/directories...</pre>
1720 </dd>
1721 <dd>
1722 <p>The command-line files and directories are relative to the specified
1723 shareName. The tar file is written to stdout.</p>
1724 </dd>
1725 <dd>
1726 <p>The required options are:</p>
1727 </dd>
1728 <dl>
1729 <dt><strong><a name="item__2dh_host">-h host</a></strong><br />
1730 </dt>
1731 <dd>
1732 host from which the tar archive is created
1733 </dd>
1734 <p></p>
1735 <dt><strong><a name="item__2dn_dumpnum">-n dumpNum</a></strong><br />
1736 </dt>
1737 <dd>
1738 dump number from which the tar archive is created
1739 </dd>
1740 <p></p>
1741 <dt><strong><a name="item__2ds_sharename">-s shareName</a></strong><br />
1742 </dt>
1743 <dd>
1744 share name from which the tar archive is created
1745 </dd>
1746 <p></p></dl>
1747 <p>Other options are:</p>
1748 <dl>
1749 <dt><strong>-t</strong><br />
1750 </dt>
1751 <dd>
1752 print summary totals
1753 </dd>
1754 <p></p>
1755 <dt><strong><a name="item__2dr_pathremove">-r pathRemove</a></strong><br />
1756 </dt>
1757 <dd>
1758 path prefix that will be replaced with pathAdd
1759 </dd>
1760 <p></p>
1761 <dt><strong><a name="item__2dp_pathadd">-p pathAdd</a></strong><br />
1762 </dt>
1763 <dd>
1764 new path prefix
1765 </dd>
1766 <p></p>
1767 <dt><strong><a name="item__2db_blocks">-b BLOCKS</a></strong><br />
1768 </dt>
1769 <dd>
1770 the tar block size, default is 20, meaning tar writes data in 20 * 512
1771 bytes chunks.
1772 </dd>
1773 <p></p>
1774 <dt><strong><a name="item__2dw_writebufsz">-w writeBufSz</a></strong><br />
1775 </dt>
1776 <dd>
1777 write buffer size, default 1048576 (1MB). You can increase this if
1778 you are trying to stream to a fast tape device.
1779 </dd>
1780 <p></p></dl>
1781 <p>The -h, -n and -s options specify which dump is used to generate
1782 the tar archive. The -r and -p options can be used to relocate
1783 the paths in the tar archive so extracted files can be placed
1784 in a location different from their original location.</p>
1785 <dt><strong><a name="item_backuppc_zipcreate">BackupPC_zipCreate</a></strong><br />
1786 </dt>
1787 <dd>
1788 BackupPC_zipCreate creates a zip file for any files or directories in
1789 a particular backup. Merging of incrementals is done automatically,
1790 so you don't need to worry about whether certain files appear in the
1791 incremental or full backup.
1792 </dd>
1793 <dd>
1794 <p>The usage is:</p>
1795 </dd>
1796 <dd>
1797 <pre>
1798 BackupPC_zipCreate [-t] [-h host] [-n dumpNum] [-s shareName]
1799 [-r pathRemove] [-p pathAdd] [-c compressionLevel]
1800 files/directories...</pre>
1801 </dd>
1802 <dd>
1803 <p>The command-line files and directories are relative to the specified
1804 shareName. The zip file is written to stdout.</p>
1805 </dd>
1806 <dd>
1807 <p>The required options are:</p>
1808 </dd>
1809 <dl>
1810 <dt><strong>-h host</strong><br />
1811 </dt>
1812 <dd>
1813 host from which the zip archive is created
1814 </dd>
1815 <p></p>
1816 <dt><strong>-n dumpNum</strong><br />
1817 </dt>
1818 <dd>
1819 dump number from which the zip archive is created
1820 </dd>
1821 <p></p>
1822 <dt><strong>-s shareName</strong><br />
1823 </dt>
1824 <dd>
1825 share name from which the zip archive is created
1826 </dd>
1827 <p></p></dl>
1828 <p>Other options are:</p>
1829 <dl>
1830 <dt><strong>-t</strong><br />
1831 </dt>
1832 <dd>
1833 print summary totals
1834 </dd>
1835 <p></p>
1836 <dt><strong>-r pathRemove</strong><br />
1837 </dt>
1838 <dd>
1839 path prefix that will be replaced with pathAdd
1840 </dd>
1841 <p></p>
1842 <dt><strong>-p pathAdd</strong><br />
1843 </dt>
1844 <dd>
1845 new path prefix
1846 </dd>
1847 <p></p>
1848 <dt><strong><a name="item__2dc_level">-c level</a></strong><br />
1849 </dt>
1850 <dd>
1851 compression level (default is 0, no compression)
1852 </dd>
1853 <p></p></dl>
1854 <p>The -h, -n and -s options specify which dump is used to generate
1855 the zip archive. The -r and -p options can be used to relocate
1856 the paths in the zip archive so extracted files can be placed
1857 in a location different from their original location.</p>
1858 </dl>
1859 <p>Each of these programs reside in __INSTALLDIR__/bin.</p>
1860 <p>
1861 <a href="#__index__"><small>Back to Top</small></a>
1862 </p>
1863 <hr />
1864 <h1><a name="archive_functions">Archive functions</a></h1>
1865 <p>BackupPC supports archiving to removable media. For users that require
1866 offsite backups, BackupPC can create archives that stream to tape
1867 devices, or create files of specified sizes to fit onto cd or dvd media.</p>
1868 <p>Each archive type is specified by a BackupPC host with its XferMethod
1869 set to 'archive'. This allows for multiple configurations at sites where
1870 there might be a combination of tape and cd/dvd backups being made.</p>
1871 <p>BackupPC provides a menu that allows one or more hosts to be archived.
1872 The most recent backup of each host is archived using BackupPC_tarCreate,
1873 and the output is optionally compressed and split into fixed-sized
1874 files (eg: 650MB).</p>
1875 <p>The archive for each host is done by default using
1876 __INSTALLDIR__/BackupPC_archiveHost. This script can be copied
1877 and customized as needed.</p>
1878 <p>
1879 </p>
1880 <h2><a name="configuring_an_archive_host">Configuring an Archive Host</a></h2>
1881 <p>To create an Archive Host, add it to the hosts file just as any other host
1882 and call it a name that best describes the type of archive, e.g. ArchiveDLT</p>
1883 <p>To tell BackupPC that the Host is for Archives, create a config.pl file in
1884 the Archive Hosts's pc directory, adding the following line:</p>
1885 <p><a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'archive';</p>
1886 <p>To further customise the archive's parameters you can adding the changed
1887 parameters in the host's config.pl file. The parameters are explained in
1888 the config.pl file. Parameters may be fixed or the user can be allowed
1889 to change them (eg: output device).</p>
1890 <p>The per-host archive command is <a href="#item_%24conf%7barchiveclientcmd%7d">$Conf{ArchiveClientCmd}</A>. By default
1891 this invokes</p>
1892 <pre>
1893 __INSTALLDIR__/BackupPC_archiveHost</pre>
1894 <p>which you can copy and customize as necessary.</p>
1895 <p>
1896 </p>
1897 <h2><a name="starting_an_archive">Starting an Archive</a></h2>
1898 <p>In the web interface, click on the Archive Host you wish to use. You will see a
1899 list of previous archives and a summary on each. By clicking the ``Start Archive''
1900 button you are presented with the list of hosts and the approximate backup size
1901 (note this is raw size, not projected compressed size) Select the hosts you wish
1902 to archive and press the ``Archive Selected Hosts'' button.</p>
1903 <p>The next screen allows you to adjust the parameters for this archive run.
1904 Press the ``Start the Archive'' to start archiving the selected hosts with the
1905 parameters displayed.</p>
1906 <p>
1907 <a href="#__index__"><small>Back to Top</small></a>
1908 </p>
1909 <hr />
1910 <h1><a name="backuppc_design">BackupPC Design</a></h1>
1911 <p>
1912 </p>
1913 <h2><a name="some_design_issues">Some design issues</a></h2>
1914 <dl>
1915 <dt><strong><a name="item_pooling_common_files">Pooling common files</a></strong><br />
1916 </dt>
1917 <dd>
1918 To quickly see if a file is already in the pool, an MD5 digest of the
1919 file length and contents is used as the file name in the pool. This
1920 can't guarantee a file is identical: it just reduces the search to
1921 often a single file or handful of files. A complete file comparison
1922 is always done to verify if two files are really the same.
1923 </dd>
1924 <dd>
1925 <p>Identical files on multiples backups are represented by hard links.
1926 Hardlinks are used so that identical files all refer to the same
1927 physical file on the server's disk. Also, hard links maintain
1928 reference counts so that BackupPC knows when to delete unused files
1929 from the pool.</p>
1930 </dd>
1931 <dd>
1932 <p>For the computer-science majors among you, you can think of the pooling
1933 system used by BackupPC as just a chained hash table stored on a (big)
1934 file system.</p>
1935 </dd>
1936 <p></p>
1937 <dt><strong><a name="item_the_hashing_function">The hashing function</a></strong><br />
1938 </dt>
1939 <dd>
1940 There is a tradeoff between how much of file is used for the MD5 digest
1941 and the time taken comparing all the files that have the same hash.
1942 </dd>
1943 <dd>
1944 <p>Using the file length and just the first 4096 bytes of the file for the
1945 MD5 digest produces some repetitions. One example: with 900,000 unique
1946 files in the pool, this hash gives about 7,000 repeated files, and in
1947 the worst case 500 files have the same hash. That's not bad: we only
1948 have to do a single file compare 99.2% of the time. But in the worst
1949 case we have to compare as many as 500 files checking for a match.</p>
1950 </dd>
1951 <dd>
1952 <p>With a modest increase in CPU time, if we use the file length and the
1953 first 256K of the file we now only have 500 repeated files and in the
1954 worst case around 20 files have the same hash. Furthermore, if we
1955 instead use the first and last 128K of the file (more specifically, the
1956 first and eighth 128K chunks for files larger than 1MB) we get only 300
1957 repeated files and in the worst case around 20 files have the same hash.</p>
1958 </dd>
1959 <dd>
1960 <p>Based on this experimentation, this is the hash function used by BackupPC.
1961 It is important that you don't change the hash function after files
1962 are already in the pool. Otherwise your pool will grow to twice the
1963 size until all the old backups (and all the old files with old hashes)
1964 eventually expire.</p>
1965 </dd>
1966 <p></p>
1967 <dt><strong><a name="item_compression">Compression</a></strong><br />
1968 </dt>
1969 <dd>
1970 BackupPC supports compression. It uses the deflate and inflate methods
1971 in the Compress::Zlib module, which is based on the zlib compression
1972 library (see <a href="http://www.gzip.org/zlib/">http://www.gzip.org/zlib/</a>).
1973 </dd>
1974 <dd>
1975 <p>The <a href="#item_%24conf%7bcompresslevel%7d">$Conf{CompressLevel}</A> setting specifies the compression level to use.
1976 Zero (0) means no compression. Compression levels can be from 1 (least
1977 cpu time, slightly worse compression) to 9 (most cpu time, slightly
1978 better compression). The recommended value is 3. Changing it to 5, for
1979 example, will take maybe 20% more cpu time and will get another 2-3%
1980 additional compression. Diminishing returns set in above 5. See the zlib
1981 documentation for more information about compression levels.</p>
1982 </dd>
1983 <dd>
1984 <p>BackupPC implements compression with minimal CPU load. Rather than
1985 compressing every incoming backup file and then trying to match it
1986 against the pool, BackupPC computes the MD5 digest based on the
1987 uncompressed file, and matches against the candidate pool files by
1988 comparing each uncompressed pool file against the incoming backup file.
1989 Since inflating a file takes roughly a factor of 10 less CPU time than
1990 deflating there is a big saving in CPU time.</p>
1991 </dd>
1992 <dd>
1993 <p>The combination of pooling common files and compression can yield
1994 a factor of 8 or more overall saving in backup storage.</p>
1995 </dd>
1996 <p></p></dl>
1997 <p>
1998 </p>
1999 <h2><a name="backuppc_operation">BackupPC operation</a></h2>
2000 <p>BackupPC reads the configuration information from
2001 __TOPDIR__/conf/config.pl. It then runs and manages all the backup
2002 activity. It maintains queues of pending backup requests, user backup
2003 requests and administrative commands. Based on the configuration various
2004 requests will be executed simultaneously.</p>
2005 <p>As specified by <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A>, BackupPC wakes up periodically
2006 to queue backups on all the PCs. This is a four step process:</p>
2007 <ol>
2008 <li>
2009 For each host and DHCP address backup requests are queued on the
2010 background command queue.
2011 <p></p>
2012 <li>
2013 For each PC, BackupPC_dump is forked. Several of these may be run in
2014 parallel, based on the configuration. First a ping is done to see if
2015 the machine is alive. If this is a DHCP address, nmblookup is run to
2016 get the netbios name, which is used as the host name. If DNS lookup
2017 fails, <a href="#item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd}</A> is run to find the IP address from
2018 the host name. The file __TOPDIR__/pc/$host/backups is read to decide
2019 whether a full or incremental backup needs to be run. If no backup is
2020 scheduled, or the ping to $host fails, then BackupPC_dump exits.
2021 <p>The backup is done using the specified XferMethod. Either samba's smbclient
2022 or tar over ssh/rsh/nfs piped into BackupPC_tarExtract, or rsync over ssh/rsh
2023 is run, or rsyncd is connected to, with the incoming data
2024 extracted to __TOPDIR__/pc/$host/new. The XferMethod output is put
2025 into __TOPDIR__/pc/$host/XferLOG.</p>
2026 <p>The letter in the XferLOG file shows the type of object, similar to the
2027 first letter of the modes displayed by ls -l:</p>
2028 <pre>
2029 d -&gt; directory
2030 l -&gt; symbolic link
2031 b -&gt; block special file
2032 c -&gt; character special file
2033 p -&gt; pipe file (fifo)
2034 nothing -&gt; regular file</pre>
2035 <p>The words mean:</p>
2036 <dl>
2037 <dt><strong><a name="item_create">create</a></strong><br />
2038 </dt>
2039 <dd>
2040 new for this backup (ie: directory or file not in pool)
2041 </dd>
2042 <p></p>
2043 <dt><strong><a name="item_pool">pool</a></strong><br />
2044 </dt>
2045 <dd>
2046 found a match in the pool
2047 </dd>
2048 <p></p>
2049 <dt><strong><a name="item_same">same</a></strong><br />
2050 </dt>
2051 <dd>
2052 file is identical to previous backup (contents were
2053 checksummed and verified during full dump).
2054 </dd>
2055 <p></p>
2056 <dt><strong><a name="item_skip">skip</a></strong><br />
2057 </dt>
2058 <dd>
2059 file skipped in incremental because attributes are the
2060 same (only displayed if <a href="#item_%24conf%7bxferloglevel%7d">$Conf{XferLogLevel}</A> &gt;= 2).
2061 </dd>
2062 <p></p></dl>
2063 <p>As BackupPC_tarExtract extracts the files from smbclient or tar, or as
2064 rsync runs, it checks each file in the backup to see if it is identical
2065 to an existing file from any previous backup of any PC. It does this
2066 without needed to write the file to disk. If the file matches an
2067 existing file, a hardlink is created to the existing file in the pool.
2068 If the file does not match any existing files, the file is written to
2069 disk and the file name is saved in __TOPDIR__/pc/$host/NewFileList for
2070 later processing by BackupPC_link. BackupPC_tarExtract and rsync can handle
2071 arbitrarily large files and multiple candidate matching files without
2072 needing to write the file to disk in the case of a match. This
2073 significantly reduces disk writes (and also reads, since the pool file
2074 comparison is done disk to memory, rather than disk to disk).</p>
2075 <p>Based on the configuration settings, BackupPC_dump checks each
2076 old backup to see if any should be removed. Any expired backups
2077 are moved to __TOPDIR__/trash for later removal by BackupPC_trashClean.</p>
2078 <li>
2079 For each complete, good, backup, BackupPC_link is run.
2080 To avoid race conditions as new files are linked into the
2081 pool area, only a single BackupPC_link program runs
2082 at a time and the rest are queued.
2083 <p>BackupPC_link reads the NewFileList written by BackupPC_dump and
2084 inspects each new file in the backup. It re-checks if there is a
2085 matching file in the pool (another BackupPC_link
2086 could have added the file since BackupPC_dump checked). If so, the file
2087 is removed and replaced by a hard link to the existing file. If the file
2088 is new, a hard link to the file is made in the pool area, so that this
2089 file is available for checking against each new file and new backup.</p>
2090 <p>Then, if <a href="#item_%24conf%7bincrfill%7d">$Conf{IncrFill}</A> is set (note that the default setting is
2091 off), for each incremental backup, hard links are made in the new
2092 backup to all files that were not extracted during the incremental
2093 backups. The means the incremental backup looks like a complete
2094 image of the PC (with the exception that files that were removed on
2095 the PC since the last full backup will still appear in the backup
2096 directory tree).</p>
2097 <p>The CGI interface knows how to merge unfilled incremental backups will
2098 the most recent prior filled (full) backup, giving the incremental
2099 backups a filled appearance. The default for <a href="#item_%24conf%7bincrfill%7d">$Conf{IncrFill}</A> is off,
2100 since there is no need to fill incremental backups. This saves
2101 some level of disk activity, since lots of extra hardlinks are no
2102 longer needed (and don't have to be deleted when the backup expires).</p>
2103 <p></p>
2104 <li>
2105 BackupPC_trashClean is always run in the background to remove any
2106 expired backups. Every 5 minutes it wakes up and removes all the files
2107 in __TOPDIR__/trash.
2108 <p>Also, once each night, BackupPC_nightly is run to complete some additional
2109 administrative tasks, such as cleaning the pool. This involves removing
2110 any files in the pool that only have a single hard link (meaning no backups
2111 are using that file). Again, to avoid race conditions, BackupPC_nightly
2112 is only run when there are no BackupPC_dump or BackupPC_link processes
2113 running. Therefore, when it is time to run BackupPC_nightly, no new
2114 backups are started and BackupPC waits until all backups have finished.
2115 Then BackupPC_nightly is run, and until it finishes no new backups are
2116 started. If BackupPC_nightly takes too long to run, the settings
2117 <a href="#item_%24conf%7bmaxbackuppcnightlyjobs%7d">$Conf{MaxBackupPCNightlyJobs}</A> and <a href="#item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod}</A> can
2118 be used to run several BackupPC_nightly processes in parallel, and
2119 to split its job over several nights.</p>
2120 <p></p></ol>
2121 <p>BackupPC also listens for TCP connections on <a href="#item_%24conf%7bserverport%7d">$Conf{ServerPort}</A>, which
2122 is used by the CGI script BackupPC_Admin for status reporting and
2123 user-initiated backup or backup cancel requests.</p>
2124 <p>
2125 </p>
2126 <h2><a name="storage_layout">Storage layout</a></h2>
2127 <p>BackupPC resides in three directories:</p>
2128 <dl>
2129 <dt><strong><a name="item___installdir__">__INSTALLDIR__</a></strong><br />
2130 </dt>
2131 <dd>
2132 Perl scripts comprising BackupPC reside in __INSTALLDIR__/bin,
2133 libraries are in __INSTALLDIR__/lib and documentation
2134 is in __INSTALLDIR__/doc.
2135 </dd>
2136 <p></p>
2137 <dt><strong><a name="item___cgidir__">__CGIDIR__</a></strong><br />
2138 </dt>
2139 <dd>
2140 The CGI script BackupPC_Admin resides in this cgi binary directory.
2141 </dd>
2142 <p></p>
2143 <dt><strong><a name="item___topdir__">__TOPDIR__</a></strong><br />
2144 </dt>
2145 <dd>
2146 All of BackupPC's data (PC backup images, logs, configuration information)
2147 is stored below this directory.
2148 </dd>
2149 <p></p></dl>
2150 <p>Below __TOPDIR__ are several directories:</p>
2151 <dl>
2152 <dt><strong><a name="item___topdir___2fconf">__TOPDIR__/conf</a></strong><br />
2153 </dt>
2154 <dd>
2155 The directory __TOPDIR__/conf contains:
2156 </dd>
2157 <dl>
2158 <dt><strong><a name="item_config_2epl">config.pl</a></strong><br />
2159 </dt>
2160 <dd>
2161 Configuration file. See <a href="#configuration_file">Configuration file</a>
2162 below for more details.
2163 </dd>
2164 <p></p>
2165 <dt><strong><a name="item_hosts">hosts</a></strong><br />
2166 </dt>
2167 <dd>
2168 Hosts file, which lists all the PCs to backup.
2169 </dd>
2170 <p></p></dl>
2171 <dt><strong><a name="item___topdir___2flog">__TOPDIR__/log</a></strong><br />
2172 </dt>
2173 <dd>
2174 The directory __TOPDIR__/log contains:
2175 </dd>
2176 <dl>
2177 <dt><strong><a name="item_log">LOG</a></strong><br />
2178 </dt>
2179 <dd>
2180 Current (today's) log file output from BackupPC.
2181 </dd>
2182 <p></p>
2183 <dt><strong><a name="item_log_2e0_or_log_2e0_2ez">LOG.0 or LOG.0.z</a></strong><br />
2184 </dt>
2185 <dd>
2186 Yesterday's log file output. Log files are aged daily and compressed
2187 (if compression is enabled), and old LOG files are deleted.
2188 </dd>
2189 <p></p>
2190 <dt><strong><a name="item_backuppc_2epid">BackupPC.pid</a></strong><br />
2191 </dt>
2192 <dd>
2193 Contains BackupPC's process id.
2194 </dd>
2195 <p></p>
2196 <dt><strong><a name="item_status_2epl">status.pl</a></strong><br />
2197 </dt>
2198 <dd>
2199 A summary of BackupPC's status written periodically by BackupPC so
2200 that certain state information can be maintained if BackupPC is
2201 restarted. Should not be edited.
2202 </dd>
2203 <p></p>
2204 <dt><strong><a name="item_useremailinfo_2epl">UserEmailInfo.pl</a></strong><br />
2205 </dt>
2206 <dd>
2207 A summary of what email was last sent to each user, and when the
2208 last email was sent. Should not be edited.
2209 </dd>
2210 <p></p></dl>
2211 <dt><strong><a name="item___topdir___2ftrash">__TOPDIR__/trash</a></strong><br />
2212 </dt>
2213 <dd>
2214 Any directories and files below this directory are periodically deleted
2215 whenever BackupPC_trashClean checks. When a backup is aborted or when an
2216 old backup expires, BackupPC_dump simply moves the directory to
2217 __TOPDIR__/trash for later removal by BackupPC_trashClean.
2218 </dd>
2219 <p></p>
2220 <dt><strong><a name="item___topdir___2fpool">__TOPDIR__/pool</a></strong><br />
2221 </dt>
2222 <dd>
2223 All uncompressed files from PC backups are stored below __TOPDIR__/pool.
2224 Each file's name is based on the MD5 hex digest of the file contents.
2225 Specifically, for files less than 256K, the file length and the entire
2226 file is used. For files up to 1MB, the file length and the first and
2227 last 128K are used. Finally, for files longer than 1MB, the file length,
2228 and the first and eighth 128K chunks for the file are used.
2229 </dd>
2230 <dd>
2231 <p>Each file is stored in a subdirectory X/Y/Z, where X, Y, Z are the
2232 first 3 hex digits of the MD5 digest.</p>
2233 </dd>
2234 <dd>
2235 <p>For example, if a file has an MD5 digest of 123456789abcdef0,
2236 the file is stored in __TOPDIR__/pool/1/2/3/123456789abcdef0.</p>
2237 </dd>
2238 <dd>
2239 <p>The MD5 digest might not be unique (especially since not all the file's
2240 contents are used for files bigger than 256K). Different files that have
2241 the same MD5 digest are stored with a trailing suffix ``_n'' where n is
2242 an incrementing number starting at 0. So, for example, if two additional
2243 files were identical to the first, except the last byte was different,
2244 and assuming the file was larger than 1MB (so the MD5 digests are the
2245 same but the files are actually different), the three files would be
2246 stored as:</p>
2247 </dd>
2248 <dd>
2249 <pre>
2250 __TOPDIR__/pool/1/2/3/123456789abcdef0
2251 __TOPDIR__/pool/1/2/3/123456789abcdef0_0
2252 __TOPDIR__/pool/1/2/3/123456789abcdef0_1</pre>
2253 </dd>
2254 <dd>
2255 <p>Both BackupPC_dump (actually, BackupPC_tarExtract) and BackupPC_link are
2256 responsible for checking newly backed up files against the pool. For
2257 each file, the MD5 digest is used to generate a file name in the pool
2258 directory. If the file exists in the pool, the contents are compared.
2259 If there is no match, additional files ending in ``_n'' are checked.
2260 (Actually, BackupPC_tarExtract compares multiple candidate files in
2261 parallel.) If the file contents exactly match, the file is created by
2262 simply making a hard link to the pool file (this is done by
2263 BackupPC_tarExtract as the backup proceeds). Otherwise,
2264 BackupPC_tarExtract writes the new file to disk and a new hard link is
2265 made in the pool to the file (this is done later by BackupPC_link).</p>
2266 </dd>
2267 <dd>
2268 <p>Therefore, every file in the pool will have at least 2 hard links
2269 (one for the pool file and one for the backup file below __TOPDIR__/pc).
2270 Identical files from different backups or PCs will all be linked to
2271 the same file. When old backups are deleted, some files in the pool
2272 might only have one link. BackupPC_nightly checks the entire pool
2273 and removes all files that have only a single link, thereby recovering
2274 the storage for that file.</p>
2275 </dd>
2276 <dd>
2277 <p>One other issue: zero length files are not pooled, since there are a lot
2278 of these files and on most file systems it doesn't save any disk space
2279 to turn these files into hard links.</p>
2280 </dd>
2281 <p></p>
2282 <dt><strong><a name="item___topdir___2fcpool">__TOPDIR__/cpool</a></strong><br />
2283 </dt>
2284 <dd>
2285 All compressed files from PC backups are stored below __TOPDIR__/cpool.
2286 Its layout is the same as __TOPDIR__/pool, and the hashing function
2287 is the same (and, importantly, based on the uncompressed file, not
2288 the compressed file).
2289 </dd>
2290 <p></p>
2291 <dt><strong><a name="item___topdir___2fpc_2f_24host">__TOPDIR__/pc/$host</a></strong><br />
2292 </dt>
2293 <dd>
2294 For each PC $host, all the backups for that PC are stored below
2295 the directory __TOPDIR__/pc/$host. This directory contains the
2296 following files:
2297 </dd>
2298 <dl>
2299 <dt><strong>LOG</strong><br />
2300 </dt>
2301 <dd>
2302 Current log file for this PC from BackupPC_dump.
2303 </dd>
2304 <p></p>
2305 <dt><strong>LOG.0 or LOG.0.z</strong><br />
2306 </dt>
2307 <dd>
2308 Last month's log file. Log files are aged monthly and compressed
2309 (if compression is enabled), and old LOG files are deleted.
2310 </dd>
2311 <p></p>
2312 <dt><strong><a name="item_xfererr_or_xfererr_2ez">XferERR or XferERR.z</a></strong><br />
2313 </dt>
2314 <dd>
2315 Output from the transport program (ie: smbclient, tar or rsync)
2316 for the most recent failed backup.
2317 </dd>
2318 <p></p>
2319 <dt><strong><a name="item_new">new</a></strong><br />
2320 </dt>
2321 <dd>
2322 Subdirectory in which the current backup is stored. This
2323 directory is renamed if the backup succeeds.
2324 </dd>
2325 <p></p>
2326 <dt><strong><a name="item_xferlog_or_xferlog_2ez">XferLOG or XferLOG.z</a></strong><br />
2327 </dt>
2328 <dd>
2329 Output from the transport program (ie: smbclient, tar or rsync)
2330 for the current backup.
2331 </dd>
2332 <p></p>
2333 <dt><strong><a name="item_nnn">nnn (an integer)</a></strong><br />
2334 </dt>
2335 <dd>
2336 Successful backups are in directories numbered sequentially starting at 0.
2337 </dd>
2338 <p></p>
2339 <dt><strong><a name="item_xferlog_2ennn_or_xferlog_2ennn_2ez">XferLOG.nnn or XferLOG.nnn.z</a></strong><br />
2340 </dt>
2341 <dd>
2342 Output from the transport program (ie: smbclient, tar or rsync)
2343 corresponding to backup number nnn.
2344 </dd>
2345 <p></p>
2346 <dt><strong><a name="item_restoreinfo_2ennn">RestoreInfo.nnn</a></strong><br />
2347 </dt>
2348 <dd>
2349 Information about restore request #nnn including who, what, when, and
2350 why. This file is in Data::Dumper format. (Note that the restore
2351 numbers are not related to the backup number.)
2352 </dd>
2353 <p></p>
2354 <dt><strong><a name="item_restorelog_2ennn_2ez">RestoreLOG.nnn.z</a></strong><br />
2355 </dt>
2356 <dd>
2357 Output from smbclient, tar or rsync during restore #nnn. (Note that the restore
2358 numbers are not related to the backup number.)
2359 </dd>
2360 <p></p>
2361 <dt><strong><a name="item_archiveinfo_2ennn">ArchiveInfo.nnn</a></strong><br />
2362 </dt>
2363 <dd>
2364 Information about archive request #nnn including who, what, when, and
2365 why. This file is in Data::Dumper format. (Note that the archive
2366 numbers are not related to the restore or backup number.)
2367 </dd>
2368 <p></p>
2369 <dt><strong><a name="item_archivelog_2ennn_2ez">ArchiveLOG.nnn.z</a></strong><br />
2370 </dt>
2371 <dd>
2372 Output from archive #nnn. (Note that the archive numbers are not related
2373 to the backup or restore number.)
2374 </dd>
2375 <p></p>
2376 <dt><strong>config.pl</strong><br />
2377 </dt>
2378 <dd>
2379 Optional configuration settings specific to this host. Settings in this
2380 file override the main configuration file.
2381 </dd>
2382 <p></p>
2383 <dt><strong><a name="item_backups">backups</a></strong><br />
2384 </dt>
2385 <dd>
2386 A tab-delimited ascii table listing information about each successful
2387 backup, one per row. The columns are:
2388 </dd>
2389 <dl>
2390 <dt><strong><a name="item_num">num</a></strong><br />
2391 </dt>
2392 <dd>
2393 The backup number, an integer that starts at 0 and increments
2394 for each successive backup. The corresponding backup is stored
2395 in the directory num (eg: if this field is 5, then the backup is
2396 stored in __TOPDIR__/pc/$host/5).
2397 </dd>
2398 <p></p>
2399 <dt><strong><a name="item_type">type</a></strong><br />
2400 </dt>
2401 <dd>
2402 Set to ``full'' or ``incr'' for full or incremental backup.
2403 </dd>
2404 <p></p>
2405 <dt><strong><a name="item_starttime">startTime</a></strong><br />
2406 </dt>
2407 <dd>
2408 Start time of the backup in unix seconds.
2409 </dd>
2410 <p></p>
2411 <dt><strong><a name="item_endtime">endTime</a></strong><br />
2412 </dt>
2413 <dd>
2414 Stop time of the backup in unix seconds.
2415 </dd>
2416 <p></p>
2417 <dt><strong><a name="item_nfiles">nFiles</a></strong><br />
2418 </dt>
2419 <dd>
2420 Number of files backed up (as reported by smbclient, tar or rsync).
2421 </dd>
2422 <p></p>
2423 <dt><strong><a name="item_size">size</a></strong><br />
2424 </dt>
2425 <dd>
2426 Total file size backed up (as reported by smbclient, tar or rsync).
2427 </dd>
2428 <p></p>
2429 <dt><strong><a name="item_nfilesexist">nFilesExist</a></strong><br />
2430 </dt>
2431 <dd>
2432 Number of files that were already in the pool
2433 (as determined by BackupPC_dump and BackupPC_link).
2434 </dd>
2435 <p></p>
2436 <dt><strong><a name="item_sizeexist">sizeExist</a></strong><br />
2437 </dt>
2438 <dd>
2439 Total size of files that were already in the pool
2440 (as determined by BackupPC_dump and BackupPC_link).
2441 </dd>
2442 <p></p>
2443 <dt><strong><a name="item_nfilesnew">nFilesNew</a></strong><br />
2444 </dt>
2445 <dd>
2446 Number of files that were not in the pool
2447 (as determined by BackupPC_link).
2448 </dd>
2449 <p></p>
2450 <dt><strong><a name="item_sizenew">sizeNew</a></strong><br />
2451 </dt>
2452 <dd>
2453 Total size of files that were not in the pool
2454 (as determined by BackupPC_link).
2455 </dd>
2456 <p></p>
2457 <dt><strong><a name="item_xfererrs">xferErrs</a></strong><br />
2458 </dt>
2459 <dd>
2460 Number of errors or warnings from smbclient, tar or rsync.
2461 </dd>
2462 <p></p>
2463 <dt><strong><a name="item_xferbadfile">xferBadFile</a></strong><br />
2464 </dt>
2465 <dd>
2466 Number of errors from smbclient that were bad file errors (zero otherwise).
2467 </dd>
2468 <p></p>
2469 <dt><strong><a name="item_xferbadshare">xferBadShare</a></strong><br />
2470 </dt>
2471 <dd>
2472 Number of errors from smbclient that were bad share errors (zero otherwise).
2473 </dd>
2474 <p></p>
2475 <dt><strong><a name="item_tarerrs">tarErrs</a></strong><br />
2476 </dt>
2477 <dd>
2478 Number of errors from BackupPC_tarExtract.
2479 </dd>
2480 <p></p>
2481 <dt><strong><a name="item_compress">compress</a></strong><br />
2482 </dt>
2483 <dd>
2484 The compression level used on this backup. Zero or empty means no
2485 compression.
2486 </dd>
2487 <p></p>
2488 <dt><strong><a name="item_sizeexistcomp">sizeExistComp</a></strong><br />
2489 </dt>
2490 <dd>
2491 Total compressed size of files that were already in the pool
2492 (as determined by BackupPC_dump and BackupPC_link).
2493 </dd>
2494 <p></p>
2495 <dt><strong><a name="item_sizenewcomp">sizeNewComp</a></strong><br />
2496 </dt>
2497 <dd>
2498 Total compressed size of files that were not in the pool
2499 (as determined by BackupPC_link).
2500 </dd>
2501 <p></p>
2502 <dt><strong><a name="item_nofill">noFill</a></strong><br />
2503 </dt>
2504 <dd>
2505 Set if this backup has not been filled in with the most recent
2506 previous filled or full backup. See <a href="#item_%24conf%7bincrfill%7d">$Conf{IncrFill}</A>.
2507 </dd>
2508 <p></p>
2509 <dt><strong><a name="item_fillfromnum">fillFromNum</a></strong><br />
2510 </dt>
2511 <dd>
2512 If this backup was filled (ie: noFill is 0) then this is the
2513 number of the backup that it was filled from
2514 </dd>
2515 <p></p>
2516 <dt><strong><a name="item_mangle">mangle</a></strong><br />
2517 </dt>
2518 <dd>
2519 Set if this backup has mangled file names and attributes. Always
2520 true for backups in v1.4.0 and above. False for all backups prior
2521 to v1.4.0.
2522 </dd>
2523 <p></p>
2524 <dt><strong><a name="item_xfermethod">xferMethod</a></strong><br />
2525 </dt>
2526 <dd>
2527 Set to the value of <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> when this dump was done.
2528 </dd>
2529 <p></p>
2530 <dt><strong><a name="item_level">level</a></strong><br />
2531 </dt>
2532 <dd>
2533 The level of this dump. A full dump is level 0. Currently incrementals
2534 are 1. But when multi-level incrementals are supported this will reflect
2535 each dump's incremental level.
2536 </dd>
2537 <p></p></dl>
2538 <dt><strong><a name="item_restores">restores</a></strong><br />
2539 </dt>
2540 <dd>
2541 A tab-delimited ascii table listing information about each requested
2542 restore, one per row. The columns are:
2543 </dd>
2544 <dl>
2545 <dt><strong>num</strong><br />
2546 </dt>
2547 <dd>
2548 Restore number (matches the suffix of the RestoreInfo.nnn and
2549 RestoreLOG.nnn.z file), unrelated to the backup number.
2550 </dd>
2551 <p></p>
2552 <dt><strong>startTime</strong><br />
2553 </dt>
2554 <dd>
2555 Start time of the restore in unix seconds.
2556 </dd>
2557 <p></p>
2558 <dt><strong>endTime</strong><br />
2559 </dt>
2560 <dd>
2561 End time of the restore in unix seconds.
2562 </dd>
2563 <p></p>
2564 <dt><strong><a name="item_result">result</a></strong><br />
2565 </dt>
2566 <dd>
2567 Result (ok or failed).
2568 </dd>
2569 <p></p>
2570 <dt><strong><a name="item_errormsg">errorMsg</a></strong><br />
2571 </dt>
2572 <dd>
2573 Error message if restore failed.
2574 </dd>
2575 <p></p>
2576 <dt><strong>nFiles</strong><br />
2577 </dt>
2578 <dd>
2579 Number of files restored.
2580 </dd>
2581 <p></p>
2582 <dt><strong>size</strong><br />
2583 </dt>
2584 <dd>
2585 Size in bytes of the restored files.
2586 </dd>
2587 <p></p>
2588 <dt><strong><a name="item_tarcreateerrs">tarCreateErrs</a></strong><br />
2589 </dt>
2590 <dd>
2591 Number of errors from BackupPC_tarCreate during restore.
2592 </dd>
2593 <p></p>
2594 <dt><strong>xferErrs</strong><br />
2595 </dt>
2596 <dd>
2597 Number of errors from smbclient, tar or rsync during restore.
2598 </dd>
2599 <p></p></dl>
2600 <dt><strong><a name="item_archives">archives</a></strong><br />
2601 </dt>
2602 <dd>
2603 A tab-delimited ascii table listing information about each requested
2604 archive, one per row. The columns are:
2605 </dd>
2606 <dl>
2607 <dt><strong>num</strong><br />
2608 </dt>
2609 <dd>
2610 Archive number (matches the suffix of the ArchiveInfo.nnn and
2611 ArchiveLOG.nnn.z file), unrelated to the backup or restore number.
2612 </dd>
2613 <p></p>
2614 <dt><strong>startTime</strong><br />
2615 </dt>
2616 <dd>
2617 Start time of the restore in unix seconds.
2618 </dd>
2619 <p></p>
2620 <dt><strong>endTime</strong><br />
2621 </dt>
2622 <dd>
2623 End time of the restore in unix seconds.
2624 </dd>
2625 <p></p>
2626 <dt><strong>result</strong><br />
2627 </dt>
2628 <dd>
2629 Result (ok or failed).
2630 </dd>
2631 <p></p>
2632 <dt><strong>errorMsg</strong><br />
2633 </dt>
2634 <dd>
2635 Error message if archive failed.
2636 </dd>
2637 <p></p></dl>
2638 </dl>
2639 </dl>
2640 <p>
2641 </p>
2642 <h2><a name="compressed_file_format">Compressed file format</a></h2>
2643 <p>The compressed file format is as generated by Compress::Zlib::deflate
2644 with one minor, but important, tweak. Since Compress::Zlib::inflate
2645 fully inflates its argument in memory, it could take large amounts of
2646 memory if it was inflating a highly compressed file. For example, a
2647 200MB file of 0x0 bytes compresses to around 200K bytes. If
2648 Compress::Zlib::inflate was called with this single 200K buffer, it
2649 would need to allocate 200MB of memory to return the result.</p>
2650 <p>BackupPC watches how efficiently a file is compressing. If a big file
2651 has very high compression (meaning it will use too much memory when it
2652 is inflated), BackupPC calls the <code>flush()</code> method, which gracefully
2653 completes the current compression. BackupPC then starts another
2654 deflate and simply appends the output file. So the BackupPC compressed
2655 file format is one or more concatenated deflations/flushes. The specific
2656 ratios that BackupPC uses is that if a 6MB chunk compresses to less
2657 than 64K then a flush will be done.</p>
2658 <p>Back to the example of the 200MB file of 0x0 bytes. Adding flushes
2659 every 6MB adds only 200 or so bytes to the 200K output. So the
2660 storage cost of flushing is negligible.</p>
2661 <p>To easily decompress a BackupPC compressed file, the script
2662 BackupPC_zcat can be found in __INSTALLDIR__/bin. For each
2663 file name argument it inflates the file and writes it to stdout.</p>
2664 <p>
2665 </p>
2666 <h2><a name="rsync_checksum_caching">Rsync checksum caching</a></h2>
2667 <p>An incremental backup with rsync compares attributes on the client
2668 with the last full backup. Any files with identical attributes
2669 are skipped. A full backup with rsync sets the --ignore-times
2670 option, which causes every file to be examined independent of
2671 attributes.</p>
2672 <p>Each file is examined by generating block checksums (default 2K
2673 blocks) on the receiving side (that's the BackupPC side), sending
2674 those checksums to the client, where the remote rsync matches those
2675 checksums with the corresponding file. The matching blocks and new
2676 data is sent back, allowing the client file to be reassembled.
2677 A checksum for the entire file is sent to as an extra check the
2678 the reconstructed file is correct.</p>
2679 <p>This results in significant disk IO and computation for BackupPC:
2680 every file in a full backup, or any file with non-matching attributes
2681 in an incremental backup, needs to be uncompressed, block checksums
2682 computed and sent. Then the receiving side reassembles the file and
2683 has to verify the whole-file checksum. Even if the file is identical,
2684 prior to 2.1.0, BackupPC had to read and uncompress the file twice,
2685 once to compute the block checksums and later to verify the whole-file
2686 checksum.</p>
2687 <p>Starting in 2.1.0, BackupPC supports optional checksum caching,
2688 which means the block and file checksums only need to be computed
2689 once for each file. This results in a significant performance
2690 improvement. This only works for compressed pool files.
2691 It is enabled by adding</p>
2692 <pre>
2693 '--checksum-seed=32761',</pre>
2694 <p>to <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A> and <a href="#item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs}</A>.</p>
2695 <p>Rsync versions prior to and including rsync-2.6.2 need a small patch to
2696 add support for the --checksum-seed option. This patch is available in
2697 the cygwin-rsyncd package at <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>.
2698 This patch is already included in rsync CVS, so it will be standard
2699 in future versions of rsync.</p>
2700 <p>When this option is present, BackupPC will add block and file checksums
2701 to the compressed pool file the next time a pool file is used and it
2702 doesn't already have cached checksums. The first time a new file is
2703 written to the pool, the checksums are not appended. The next time
2704 checksums are needed for a file, they are computed and added. So the
2705 full performance benefit of checksum caching won't be noticed until the
2706 third time a pool file is used (eg: the third full backup).</p>
2707 <p>With checksum caching enabled, there is a risk that should a file's contents
2708 in the pool be corrupted due to a disk problem, but the cached checksums
2709 are still correct, the corruption will not be detected by a full backup,
2710 since the file contents are no longer read and compared. To reduce the
2711 chance that this remains undetected, BackupPC can recheck cached checksums
2712 for a fraction of the files. This fraction is set with the
2713 <a href="#item_%24conf%7brsynccsumcacheverifyprob%7d">$Conf{RsyncCsumCacheVerifyProb}</A> setting. The default value of 0.01 means
2714 that 1% of the time a file's checksums are read, the checksums are verified.
2715 This reduces performance slightly, but, over time, ensures that files
2716 contents are in sync with the cached checksums.</p>
2717 <p>The format of the cached checksum data can be discovered by looking at
2718 the code. Basically, the first byte of the compressed file is changed
2719 to denote that checksums are appended. The block and file checksum
2720 data, plus some other information and magic word, are appended to the
2721 compressed file. This allows the cache update to be done in-place.</p>
2722 <p>
2723 </p>
2724 <h2><a name="file_name_mangling">File name mangling</a></h2>
2725 <p>Backup file names are stored in ``mangled'' form. Each node of
2726 a path is preceded by ``f'' (mnemonic: file), and special characters
2727 (\n, \r, % and /) are URI-encoded as ``%xx'', where xx is the ascii
2728 character's hex value. So c:/craig/example.txt is now stored as
2729 fc/fcraig/fexample.txt.</p>
2730 <p>This was done mainly so meta-data could be stored alongside the backup
2731 files without name collisions. In particular, the attributes for the
2732 files in a directory are stored in a file called ``attrib'', and mangling
2733 avoids file name collisions (I discarded the idea of having a duplicate
2734 directory tree for every backup just to store the attributes). Other
2735 meta-data (eg: rsync checksums) could be stored in file names preceded
2736 by, eg, ``c''. There are two other benefits to mangling: the share name
2737 might contain ``/'' (eg: ``/home/craig'' for tar transport), and I wanted
2738 that represented as a single level in the storage tree. Secondly, as
2739 files are written to NewFileList for later processing by BackupPC_link,
2740 embedded newlines in the file's path will cause problems which are
2741 avoided by mangling.</p>
2742 <p>The CGI script undoes the mangling, so it is invisible to the user.
2743 Old (unmangled) backups are still supported by the CGI
2744 interface.</p>
2745 <p>
2746 </p>
2747 <h2><a name="special_files">Special files</a></h2>
2748 <p>Linux/unix file systems support several special file types: symbolic
2749 links, character and block device files, fifos (pipes) and unix-domain
2750 sockets. All except unix-domain sockets are supported by BackupPC
2751 (there's no point in backing up or restoring unix-domain sockets since
2752 they only have meaning after a process creates them). Symbolic links are
2753 stored as a plain file whose contents are the contents of the link (not
2754 the file it points to). This file is compressed and pooled like any
2755 normal file. Character and block device files are also stored as plain
2756 files, whose contents are two integers separated by a comma; the numbers
2757 are the major and minor device number. These files are compressed and
2758 pooled like any normal file. Fifo files are stored as empty plain files
2759 (which are not pooled since they have zero size). In all cases, the
2760 original file type is stored in the attrib file so it can be correctly
2761 restored.</p>
2762 <p>Hardlinks are also supported. When GNU tar first encounters a file with
2763 more than one link (ie: hardlinks) it dumps it as a regular file. When
2764 it sees the second and subsequent hardlinks to the same file, it dumps
2765 just the hardlink information. BackupPC correctly recognizes these
2766 hardlinks and stores them just like symlinks: a regular text file
2767 whose contents is the path of the file linked to. The CGI script
2768 will download the original file when you click on a hardlink.</p>
2769 <p>Also, BackupPC_tarCreate has enough magic to re-create the hardlinks
2770 dynamically based on whether or not the original file and hardlinks
2771 are both included in the tar file. For example, imagine a/b/x is a
2772 hardlink to a/c/y. If you use BackupPC_tarCreate to restore directory
2773 a, then the tar file will include a/b/x as the original file and a/c/y
2774 will be a hardlink to a/b/x. If, instead you restore a/c, then the
2775 tar file will include a/c/y as the original file, not a hardlink.</p>
2776 <p>
2777 </p>
2778 <h2><a name="attribute_file_format">Attribute file format</a></h2>
2779 <p>The unix attributes for the contents of a directory (all the files and
2780 directories in that directory) are stored in a file called attrib.
2781 There is a single attrib file for each directory in a backup.
2782 For example, if c:/craig contains a single file c:/craig/example.txt,
2783 that file would be stored as fc/fcraig/fexample.txt and there would be an
2784 attribute file in fc/fcraig/attrib (and also fc/attrib and ./attrib).
2785 The file fc/fcraig/attrib would contain a single entry containing the
2786 attributes for fc/fcraig/fexample.txt.</p>
2787 <p>The attrib file starts with a magic number, followed by the
2788 concatenation of the following information for each file:</p>
2789 <ul>
2790 <li>
2791 File name length in perl's pack ``w'' format (variable length base 128).
2792 <p></p>
2793 <li>
2794 File name.
2795 <p></p>
2796 <li>
2797 The unix file type, mode, uid, gid and file size divided by 4GB and
2798 file size modulo 4GB (type mode uid gid sizeDiv4GB sizeMod4GB),
2799 in perl's pack ``w'' format (variable length base 128).
2800 <p></p>
2801 <li>
2802 The unix mtime (unix seconds) in perl's pack ``N'' format (32 bit integer).
2803 <p></p></ul>
2804 <p>The attrib file is also compressed if compression is enabled.
2805 See the lib/BackupPC/Attrib.pm module for full details.</p>
2806 <p>Attribute files are pooled just like normal backup files. This saves
2807 space if all the files in a directory have the same attributes across
2808 multiple backups, which is common.</p>
2809 <p>
2810 </p>
2811 <h2><a name="optimizations">Optimizations</a></h2>
2812 <p>BackupPC doesn't care about the access time of files in the pool
2813 since it saves attribute meta-data separate from the files. Since
2814 BackupPC mostly does reads from disk, maintaining the access time of
2815 files generates a lot of unnecessary disk writes. So, provided
2816 BackupPC has a dedicated data disk, you should consider mounting
2817 BackupPC's data directory with the noatime attribute (see mount(1)).</p>
2818 <p>
2819 </p>
2820 <h2><a name="limitations">Limitations</a></h2>
2821 <p>BackupPC isn't perfect (but it is getting better). Please see
2822 <a href="http://backuppc.sourceforge.net/faq/limitations.html">http://backuppc.sourceforge.net/faq/limitations.html</a> for a
2823 discussion of some of BackupPC's limitations.</p>
2824 <p>
2825 </p>
2826 <h2><a name="security_issues">Security issues</a></h2>
2827 <p>Please see <a href="http://backuppc.sourceforge.net/faq/security.html">http://backuppc.sourceforge.net/faq/security.html</a> for a
2828 discussion of some of various security issues.</p>
2829 <p>
2830 <a href="#__index__"><small>Back to Top</small></a>
2831 </p>
2832 <hr />
2833 <h1><a name="configuration_file">Configuration File</a></h1>
2834 <p>The BackupPC configuration file resides in __TOPDIR__/conf/config.pl.
2835 Optional per-PC configuration files reside in __TOPDIR__/pc/$host/config.pl.
2836 This file can be used to override settings just for a particular PC.</p>
2837 <p>
2838 </p>
2839 <h2><a name="modifying_the_main_configuration_file">Modifying the main configuration file</a></h2>
2840 <p>The configuration file is a perl script that is executed by BackupPC, so
2841 you should be careful to preserve the file syntax (punctuation, quotes
2842 etc) when you edit it. It is recommended that you use CVS, RCS or some
2843 other method of source control for changing config.pl.</p>
2844 <p>BackupPC reads or re-reads the main configuration file and
2845 the hosts file in three cases:</p>
2846 <ul>
2847 <li>
2848 Upon startup.
2849 <p></p>
2850 <li>
2851 When BackupPC is sent a HUP (-1) signal. Assuming you installed the
2852 init.d script, you can also do this with ``/etc/init.d/backuppc reload''.
2853 <p></p>
2854 <li>
2855 When the modification time of config.pl file changes. BackupPC
2856 checks the modification time once during each regular wakeup.
2857 <p></p></ul>
2858 <p>Whenever you change the configuration file you can either do
2859 a kill -HUP BackupPC_pid or simply wait until the next regular
2860 wakeup period.</p>
2861 <p>Each time the configuration file is re-read a message is reported in the
2862 LOG file, so you can tail it (or view it via the CGI interface) to make
2863 sure your kill -HUP worked. Errors in parsing the configuration file are
2864 also reported in the LOG file.</p>
2865 <p>The optional per-PC configuration file (__TOPDIR__/pc/$host/config.pl)
2866 is read whenever it is needed by BackupPC_dump, BackupPC_link and others.</p>
2867 <p>
2868 </p>
2869 <h2><a name="configuration_file_includes">Configuration file includes</a></h2>
2870 <p>If you have a heterogeneous set of clients (eg: a variety of WinXX and
2871 linux/unix machines) you will need to create host-specific config.pl files
2872 for some or all of these machines to customize the default settings from
2873 the master config.pl file (at a minimum to set <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A>).</p>
2874 <p>Since the config.pl file is just regular perl code, you can include
2875 one config file from another. For example, imagine you had three general
2876 classes of machines: WinXX desktops, linux machines in the DMZ and
2877 linux desktops. You could create three config files in __TOPDIR__/conf:</p>
2878 <pre>
2879 __TOPDIR__/conf/ConfigWinDesktop.pl
2880 __TOPDIR__/conf/ConfigLinuxDMZ.pl
2881 __TOPDIR__/conf/ConfigLinuxDesktop.pl</pre>
2882 <p>From each client's directory you can either add a symbolic link to
2883 the appropriate config file:</p>
2884 <pre>
2885 cd __TOPDIR__/pc/$host
2886 ln -s ../../conf/ConfigWinDesktop.pl config.pl</pre>
2887 <p>or, better yet, create a config.pl file in __TOPDIR__/pc/$host
2888 that includes the default config.pl file using perl's ``do''
2889 command:</p>
2890 <pre>
2891 do &quot;__TOPDIR__/conf/ConfigWinDesktop.pl&quot;;</pre>
2892 <p>This alternative allows you to set other configuration options
2893 specific to each host after the ``do'' command (perhaps even
2894 overriding the settings in the included file).</p>
2895 <p>Note that you could also include snippets of configuration settings
2896 from the main configuration file. However, be aware that the
2897 modification-time checking that BackupPC does only applies to the
2898 main configuration file: if you change one of the included files,
2899 BackupPC won't notice. You will need to either touch the main
2900 configuration file too, or send BackupPC a HUP (-1) signal.</p>
2901 <p>
2902 <a href="#__index__"><small>Back to Top</small></a>
2903 </p>
2904 <hr />
2905 <h1><a name="configuration_parameters">Configuration Parameters</a></h1>
2906 <p>The configuration parameters are divided into five general groups.
2907 The first group (general server configuration) provides general
2908 configuration for BackupPC. The next two groups describe what to
2909 backup, when to do it, and how long to keep it. The fourth group
2910 are settings for email reminders, and the final group contains
2911 settings for the CGI interface.</p>
2912 <p>All configuration settings in the second through fifth groups can
2913 be overridden by the per-PC config.pl file.</p>
2914 <p>
2915 </p>
2916 <h2><a name="general_server_configuration">General server configuration</a></h2>
2917 <dl>
2918 <dt><strong><a name="item_%24conf%7bserverhost%7d">$Conf{ServerHost} = '';</a></strong><br />
2919 </dt>
2920 <dd>
2921 Host name on which the BackupPC server is running.
2922 </dd>
2923 <p></p>
2924 <dt><strong><a name="item_%24conf%7bserverport%7d">$Conf{ServerPort} = -1;</a></strong><br />
2925 </dt>
2926 <dd>
2927 TCP port number on which the BackupPC server listens for and accepts
2928 connections. Normally this should be disabled (set to -1). The TCP
2929 port is only needed if apache runs on a different machine from BackupPC.
2930 In that case, set this to any spare port number over 1024 (eg: 2359).
2931 If you enable the TCP port, make sure you set <a href="#item_%24conf%7bservermesgsecret%7d">$Conf{ServerMesgSecret}</A>
2932 too!
2933 </dd>
2934 <p></p>
2935 <dt><strong><a name="item_%24conf%7bservermesgsecret%7d">$Conf{ServerMesgSecret} = '';</a></strong><br />
2936 </dt>
2937 <dd>
2938 Shared secret to make the TCP port secure. Set this to a hard to guess
2939 string if you enable the TCP port (ie: <a href="#item_%24conf%7bserverport%7d">$Conf{ServerPort}</A> &gt; 0).
2940 </dd>
2941 <dd>
2942 <p>To avoid possible attacks via the TCP socket interface, every client
2943 message is protected by an MD5 digest. The MD5 digest includes four
2944 items:
2945 - a seed that is sent to the client when the connection opens
2946 - a sequence number that increments for each message
2947 - a shared secret that is stored in <a href="#item_%24conf%7bservermesgsecret%7d">$Conf{ServerMesgSecret}</A>
2948 - the message itself.</p>
2949 </dd>
2950 <dd>
2951 <p>The message is sent in plain text preceded by the MD5 digest. A
2952 snooper can see the plain-text seed sent by BackupPC and plain-text
2953 message from the client, but cannot construct a valid MD5 digest since
2954 the secret <a href="#item_%24conf%7bservermesgsecret%7d">$Conf{ServerMesgSecret}</A> is unknown. A replay attack is
2955 not possible since the seed changes on a per-connection and
2956 per-message basis.</p>
2957 </dd>
2958 <p></p>
2959 <dt><strong><a name="item_%24conf%7bmypath%7d">$Conf{MyPath} = '/bin';</a></strong><br />
2960 </dt>
2961 <dd>
2962 PATH setting for BackupPC. An explicit value is necessary
2963 for taint mode. Value shouldn't matter too much since
2964 all execs use explicit paths. However, taint mode in perl
2965 will complain if this directory is world writable.
2966 </dd>
2967 <p></p>
2968 <dt><strong><a name="item_%24conf%7bumaskmode%7d">$Conf{UmaskMode} = 027;</a></strong><br />
2969 </dt>
2970 <dd>
2971 Permission mask for directories and files created by BackupPC.
2972 Default value prevents any access from group other, and prevents
2973 group write.
2974 </dd>
2975 <p></p>
2976 <dt><strong><a name="item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule} = [1..23];</a></strong><br />
2977 </dt>
2978 <dd>
2979 Times at which we wake up, check all the PCs, and schedule necessary
2980 backups. Times are measured in hours since midnight. Can be
2981 fractional if necessary (eg: 4.25 means 4:15am).
2982 </dd>
2983 <dd>
2984 <p>If the hosts you are backing up are always connected to the network
2985 you might have only one or two wakeups each night. This will keep
2986 the backup activity after hours. On the other hand, if you are backing
2987 up laptops that are only intermittently connected to the network you
2988 will want to have frequent wakeups (eg: hourly) to maximized the chance
2989 that each laptop is backed up.</p>
2990 </dd>
2991 <dd>
2992 <p>Examples:</p>
2993 </dd>
2994 <dd>
2995 <pre>
2996 <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> = [22.5]; # once per day at 10:30 pm.
2997 <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> = [1..23]; # every hour except midnight
2998 <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> = [2,4,6,8,10,12,14,16,18,20,22]; # every 2 hours</pre>
2999 </dd>
3000 <dd>
3001 <p>The default value is every hour except midnight.</p>
3002 </dd>
3003 <dd>
3004 <p>The first entry of <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> is when BackupPC_nightly
3005 is run. No other backups can run while BackupPC_nightly is
3006 running. You might want to re-arrange the entries in
3007 <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> (they don't have to be ascending) so that
3008 the first entry is when you want BackupPC_nightly to run
3009 (eg: when you don't expect a lot of regular backups to run).</p>
3010 </dd>
3011 <p></p>
3012 <dt><strong><a name="item_%24conf%7bmaxbackups%7d">$Conf{MaxBackups} = 4;</a></strong><br />
3013 </dt>
3014 <dd>
3015 Maximum number of simultaneous backups to run. If there
3016 are no user backup requests then this is the maximum number
3017 of simultaneous backups.
3018 </dd>
3019 <p></p>
3020 <dt><strong><a name="item_%24conf%7bmaxuserbackups%7d">$Conf{MaxUserBackups} = 4;</a></strong><br />
3021 </dt>
3022 <dd>
3023 Additional number of simultaneous backups that users can run.
3024 As many as <a href="#item_%24conf%7bmaxbackups%7d">$Conf{MaxBackups}</A> + <a href="#item_%24conf%7bmaxuserbackups%7d">$Conf{MaxUserBackups}</A> requests can
3025 run at the same time.
3026 </dd>
3027 <p></p>
3028 <dt><strong><a name="item_%24conf%7bmaxpendingcmds%7d">$Conf{MaxPendingCmds} = 10;</a></strong><br />
3029 </dt>
3030 <dd>
3031 Maximum number of pending link commands. New backups will only be
3032 started if there are no more than <a href="#item_%24conf%7bmaxpendingcmds%7d">$Conf{MaxPendingCmds}</A> plus
3033 <a href="#item_%24conf%7bmaxbackups%7d">$Conf{MaxBackups}</A> number of pending link commands, plus running jobs.
3034 This limit is to make sure BackupPC doesn't fall too far behind in
3035 running BackupPC_link commands.
3036 </dd>
3037 <p></p>
3038 <dt><strong><a name="item_%24conf%7bmaxbackuppcnightlyjobs%7d">$Conf{MaxBackupPCNightlyJobs} = 2;</a></strong><br />
3039 </dt>
3040 <dd>
3041 How many BackupPC_nightly processes to run in parallel.
3042 </dd>
3043 <dd>
3044 <p>Each night, at the first wakeup listed in <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A>,
3045 BackupPC_nightly is run. Its job is to remove unneeded files
3046 in the pool, ie: files that only have one link. To avoid race
3047 conditions, BackupPC_nightly runs only when there are no backups
3048 running, and no backups will start while it runs.</p>
3049 </dd>
3050 <dd>
3051 <p>So to reduce the elapsed time, you might want to increase this
3052 setting to run several BackupPC_nightly processes in parallel
3053 (eg: 4, or even 8).</p>
3054 </dd>
3055 <p></p>
3056 <dt><strong><a name="item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod} = 1;</a></strong><br />
3057 </dt>
3058 <dd>
3059 How many days (runs) it takes BackupPC_nightly to traverse the
3060 entire pool. Normally this is 1, which means every night it runs,
3061 it does traverse the entire pool removing unused pool files.
3062 </dd>
3063 <dd>
3064 <p>Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
3065 traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
3066 takes 2, 4, 8 or 16 days to completely traverse the pool. The
3067 advantage is that each night the running time of BackupPC_nightly
3068 is reduced roughly in proportion, since the total job is split
3069 over multiple days. The disadvantage is that unused pool files
3070 take longer to get deleted, which will slightly increase disk
3071 usage.</p>
3072 </dd>
3073 <dd>
3074 <p>Note that even when <a href="#item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod}</A> &gt; 1, BackupPC_nightly
3075 still runs every night. It just does less work each time it runs.</p>
3076 </dd>
3077 <dd>
3078 <p>Examples:</p>
3079 </dd>
3080 <dd>
3081 <pre>
3082 <a href="#item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod}</A> = 1; # entire pool is checked every night</pre>
3083 </dd>
3084 <dd>
3085 <pre>
3086 <a href="#item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod}</A> = 2; # two days to complete pool check
3087 # (different half each night)</pre>
3088 </dd>
3089 <dd>
3090 <pre>
3091 <a href="#item_%24conf%7bbackuppcnightlyperiod%7d">$Conf{BackupPCNightlyPeriod}</A> = 4; # four days to complete pool check
3092 # (different quarter each night)</pre>
3093 </dd>
3094 <p></p>
3095 <dt><strong><a name="item_%24conf%7bmaxoldlogfiles%7d">$Conf{MaxOldLogFiles} = 14;</a></strong><br />
3096 </dt>
3097 <dd>
3098 Maximum number of log files we keep around in log directory.
3099 These files are aged nightly. A setting of 14 means the log
3100 directory will contain about 2 weeks of old log files, in
3101 particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
3102 (except today's LOG, these files will have a .z extension if
3103 compression is on).
3104 </dd>
3105 <dd>
3106 <p>If you decrease this number after BackupPC has been running for a
3107 while you will have to manually remove the older log files.</p>
3108 </dd>
3109 <p></p>
3110 <dt><strong><a name="item_%24conf%7bdfpath%7d">$Conf{DfPath} = '/bin/df';</a></strong><br />
3111 </dt>
3112 <dd>
3113 Full path to the df command. Security caution: normal users
3114 should not allowed to write to this file or directory.
3115 </dd>
3116 <p></p>
3117 <dt><strong><a name="item_%24conf%7bdfcmd%7d">$Conf{DfCmd} = '$dfPath $topDir';</a></strong><br />
3118 </dt>
3119 <dd>
3120 Command to run df. The following variables are substituted at run-time:
3121 </dd>
3122 <dd>
3123 <pre>
3124 $dfPath path to df (<a href="#item_%24conf%7bdfpath%7d">$Conf{DfPath}</A>)
3125 $topDir top-level BackupPC data directory</pre>
3126 </dd>
3127 <p></p>
3128 <dt><strong><a name="item_%24conf%7bdfmaxusagepct%7d">$Conf{DfMaxUsagePct} = 95;</a></strong><br />
3129 </dt>
3130 <dd>
3131 Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
3132 If the output from <a href="#item_%24conf%7bdfpath%7d">$Conf{DfPath}</A> reports a percentage larger than
3133 this number then no new regularly scheduled backups will be run.
3134 However, user requested backups (which are usually incremental and
3135 tend to be small) are still performed, independent of disk usage.
3136 Also, currently running backups will not be terminated when the disk
3137 usage exceeds this number.
3138 </dd>
3139 <p></p>
3140 <dt><strong><a name="item_%24conf%7btrashcleansleepsec%7d">$Conf{TrashCleanSleepSec} = 300;</a></strong><br />
3141 </dt>
3142 <dd>
3143 How long BackupPC_trashClean sleeps in seconds between each check
3144 of the trash directory. Once every 5 minutes should be reasonable.
3145 </dd>
3146 <p></p>
3147 <dt><strong><a name="item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges} = [];</a></strong><br />
3148 </dt>
3149 <dd>
3150 List of DHCP address ranges we search looking for PCs to backup.
3151 This is an array of hashes for each class C address range.
3152 This is only needed if hosts in the conf/hosts file have the
3153 dhcp flag set.
3154 </dd>
3155 <dd>
3156 <p>Examples:</p>
3157 </dd>
3158 <dd>
3159 <pre>
3160 # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
3161 <a href="#item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges}</A> = [
3162 {
3163 ipAddrBase =&gt; '192.10.10',
3164 first =&gt; 20,
3165 last =&gt; 250,
3166 },
3167 ];
3168 # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
3169 <a href="#item_%24conf%7bdhcpaddressranges%7d">$Conf{DHCPAddressRanges}</A> = [
3170 {
3171 ipAddrBase =&gt; '192.10.10',
3172 first =&gt; 20,
3173 last =&gt; 250,
3174 },
3175 {
3176 ipAddrBase =&gt; '192.10.11',
3177 first =&gt; 10,
3178 last =&gt; 50,
3179 },
3180 ];</pre>
3181 </dd>
3182 <p></p>
3183 <dt><strong><a name="item_%24conf%7bbackuppcuser%7d">$Conf{BackupPCUser} = '';</a></strong><br />
3184 </dt>
3185 <dt><strong><a name="item_%24conf%7bcgidir%7d">$Conf{CgiDir} = '';</a></strong><br />
3186 </dt>
3187 <dt><strong><a name="item_%24conf%7binstalldir%7d">$Conf{InstallDir} = '';</a></strong><br />
3188 </dt>
3189 <dd>
3190 These configuration settings aren't used by BackupPC, but simply
3191 remember a few settings used by configure.pl during installation.
3192 These are used by configure.pl when upgrading to new versions of
3193 BackupPC.
3194 </dd>
3195 <p></p>
3196 <dt><strong><a name="item_%24conf%7bbackuppcuserverify%7d">$Conf{BackupPCUserVerify} = 1;</a></strong><br />
3197 </dt>
3198 <dd>
3199 Whether BackupPC and the CGI script BackupPC_Admin verify that they
3200 are really running as user <a href="#item_%24conf%7bbackuppcuser%7d">$Conf{BackupPCUser}</A>. If this flag is set
3201 and the effective user id (euid) differs from <a href="#item_%24conf%7bbackuppcuser%7d">$Conf{BackupPCUser}</A>
3202 then both scripts exit with an error. This catches cases where
3203 BackupPC might be accidently started as root or the wrong user,
3204 or if the CGI script is not installed correctly.
3205 </dd>
3206 <p></p>
3207 <dt><strong><a name="item_%24conf%7bhardlinkmax%7d">$Conf{HardLinkMax} = 31999;</a></strong><br />
3208 </dt>
3209 <dd>
3210 Maximum number of hardlinks supported by the $TopDir file system
3211 that BackupPC uses. Most linux or unix file systems should support
3212 at least 32000 hardlinks per file, or 64000 in other cases. If a pool
3213 file already has this number of hardlinks, a new pool file is created
3214 so that new hardlinks can be accommodated. This limit will only
3215 be hit if an identical file appears at least this number of times
3216 across all the backups.
3217 </dd>
3218 <p></p></dl>
3219 <p>
3220 </p>
3221 <h2><a name="what_to_backup_and_when_to_do_it">What to backup and when to do it</a></h2>
3222 <dl>
3223 <dt><strong><a name="item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName} = 'C$';</a></strong><br />
3224 </dt>
3225 <dd>
3226 Name of the host share that is backed up when using SMB. This can be a
3227 string or an array of strings if there are multiple shares per host.
3228 Examples:
3229 </dd>
3230 <dd>
3231 <pre>
3232 <a href="#item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName}</A> = 'c'; # backup 'c' share
3233 <a href="#item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName}</A> = ['c', 'd']; # backup 'c' and 'd' shares</pre>
3234 </dd>
3235 <dd>
3236 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.</p>
3237 </dd>
3238 <p></p>
3239 <dt><strong><a name="item_%24conf%7bsmbshareusername%7d">$Conf{SmbShareUserName} = '';</a></strong><br />
3240 </dt>
3241 <dd>
3242 Smbclient share user name. This is passed to smbclient's -U argument.
3243 </dd>
3244 <dd>
3245 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.</p>
3246 </dd>
3247 <p></p>
3248 <dt><strong><a name="item_%24conf%7bsmbsharepasswd%7d">$Conf{SmbSharePasswd} = '';</a></strong><br />
3249 </dt>
3250 <dd>
3251 Smbclient share password. This is passed to smbclient via its PASSWD
3252 environment variable. There are several ways you can tell BackupPC
3253 the smb share password. In each case you should be very careful about
3254 security. If you put the password here, make sure that this file is
3255 not readable by regular users! See the ``Setting up config.pl'' section
3256 in the documentation for more information.
3257 </dd>
3258 <dd>
3259 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.</p>
3260 </dd>
3261 <p></p>
3262 <dt><strong><a name="item_%24conf%7btarsharename%7d">$Conf{TarShareName} = '/';</a></strong><br />
3263 </dt>
3264 <dd>
3265 Which host directories to backup when using tar transport. This can be a
3266 string or an array of strings if there are multiple directories to
3267 backup per host. Examples:
3268 </dd>
3269 <dd>
3270 <pre>
3271 <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> = '/'; # backup everything
3272 <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> = '/home'; # only backup /home
3273 <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> = ['/home', '/src']; # backup /home and /src</pre>
3274 </dd>
3275 <dd>
3276 <p>The fact this parameter is called 'TarShareName' is for historical
3277 consistency with the Smb transport options. You can use any valid
3278 directory on the client: there is no need for it to correspond to
3279 any Smb share or device mount point.</p>
3280 </dd>
3281 <dd>
3282 <p>Note also that you can also use <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> to specify
3283 a specific list of directories to backup. It's more efficient to
3284 use this option instead of <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> since a new tar is
3285 run for each entry in <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A>.</p>
3286 </dd>
3287 <dd>
3288 <p>On the other hand, if you add --one-file-system to <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A>
3289 you can backup each file system separately, which makes restoring one
3290 bad file system easier. In this case you would list all of the mount
3291 points here, since you can't get the same result with
3292 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A>:</p>
3293 </dd>
3294 <dd>
3295 <pre>
3296 <a href="#item_%24conf%7btarsharename%7d">$Conf{TarShareName}</A> = ['/', '/var', '/data', '/boot'];</pre>
3297 </dd>
3298 <dd>
3299 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'tar'.</p>
3300 </dd>
3301 <p></p>
3302 <dt><strong><a name="item_%24conf%7bfullperiod%7d">$Conf{FullPeriod} = 6.97;</a></strong><br />
3303 </dt>
3304 <dd>
3305 Minimum period in days between full backups. A full dump will only be
3306 done if at least this much time has elapsed since the last full dump,
3307 and at least <a href="#item_%24conf%7bincrperiod%7d">$Conf{IncrPeriod}</A> days has elapsed since the last
3308 successful dump.
3309 </dd>
3310 <dd>
3311 <p>Typically this is set slightly less than an integer number of days. The
3312 time taken for the backup, plus the granularity of <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A>
3313 will make the actual backup interval a bit longer.</p>
3314 </dd>
3315 <dd>
3316 <p>There are two special values for <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>:</p>
3317 </dd>
3318 <dd>
3319 <pre>
3320 -1 Don't do any regular backups on this machine. Manually
3321 requested backups (via the CGI interface) will still occur.</pre>
3322 </dd>
3323 <dd>
3324 <pre>
3325 -2 Don't do any backups on this machine. Manually requested
3326 backups (via the CGI interface) will be ignored.</pre>
3327 </dd>
3328 <dd>
3329 <p>These special settings are useful for a client that is no longer
3330 being backed up (eg: a retired machine), but you wish to keep the
3331 last backups available for browsing or restoring to other machines.</p>
3332 </dd>
3333 <p></p>
3334 <dt><strong><a name="item_%24conf%7bincrperiod%7d">$Conf{IncrPeriod} = 0.97;</a></strong><br />
3335 </dt>
3336 <dd>
3337 Minimum period in days between incremental backups (a user requested
3338 incremental backup will be done anytime on demand).
3339 </dd>
3340 <dd>
3341 <p>Typically this is set slightly less than an integer number of days. The
3342 time taken for the backup, plus the granularity of <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A>
3343 will make the actual backup interval a bit longer.</p>
3344 </dd>
3345 <p></p>
3346 <dt><strong><a name="item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt} = 1;</a></strong><br />
3347 </dt>
3348 <dd>
3349 Number of full backups to keep. Must be &gt;= 1.
3350 </dd>
3351 <dd>
3352 <p>In the steady state, each time a full backup completes successfully
3353 the oldest one is removed. If this number is decreased, the
3354 extra old backups will be removed.</p>
3355 </dd>
3356 <dd>
3357 <p>If filling of incremental dumps is off the oldest backup always
3358 has to be a full (ie: filled) dump. This might mean one or two
3359 extra full dumps are kept until the oldest incremental backups expire.</p>
3360 </dd>
3361 <dd>
3362 <p>Exponential backup expiry is also supported. This allows you to specify:</p>
3363 </dd>
3364 <dd>
3365 <pre>
3366 - num fulls to keep at intervals of 1 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>, followed by
3367 - num fulls to keep at intervals of 2 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>,
3368 - num fulls to keep at intervals of 4 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>,
3369 - num fulls to keep at intervals of 8 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>,
3370 - num fulls to keep at intervals of 16 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>,</pre>
3371 </dd>
3372 <dd>
3373 <p>and so on. This works by deleting every other full as each expiry
3374 boundary is crossed.</p>
3375 </dd>
3376 <dd>
3377 <p>Exponential expiry is specified using an array for <a href="#item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt}</A>:</p>
3378 </dd>
3379 <dd>
3380 <pre>
3381 <a href="#item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt}</A> = [4, 2, 3];</pre>
3382 </dd>
3383 <dd>
3384 <p>Entry #n specifies how many fulls to keep at an interval of
3385 2^n * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A> (ie: 1, 2, 4, 8, 16, 32, ...).</p>
3386 </dd>
3387 <dd>
3388 <p>The example above specifies keeping 4 of the most recent full backups
3389 (1 week interval) two full backups at 2 week intervals, and 3 full
3390 backups at 4 week intervals, eg:</p>
3391 </dd>
3392 <dd>
3393 <pre>
3394 full 0 19 weeks old \
3395 full 1 15 weeks old &gt;--- 3 backups at 4 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3396 full 2 11 weeks old /
3397 full 3 7 weeks old \____ 2 backups at 2 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3398 full 4 5 weeks old /
3399 full 5 3 weeks old \
3400 full 6 2 weeks old \___ 4 backups at 1 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3401 full 7 1 week old /
3402 full 8 current /</pre>
3403 </dd>
3404 <dd>
3405 <p>On a given week the spacing might be less than shown as each backup
3406 ages through each expiry period. For example, one week later, a
3407 new full is completed and the oldest is deleted, giving:</p>
3408 </dd>
3409 <dd>
3410 <pre>
3411 full 0 16 weeks old \
3412 full 1 12 weeks old &gt;--- 3 backups at 4 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3413 full 2 8 weeks old /
3414 full 3 6 weeks old \____ 2 backups at 2 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3415 full 4 4 weeks old /
3416 full 5 3 weeks old \
3417 full 6 2 weeks old \___ 4 backups at 1 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>
3418 full 7 1 week old /
3419 full 8 current /</pre>
3420 </dd>
3421 <dd>
3422 <p>You can specify 0 as a count (except in the first entry), and the
3423 array can be as long as you wish. For example:</p>
3424 </dd>
3425 <dd>
3426 <pre>
3427 <a href="#item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt}</A> = [4, 0, 4, 0, 0, 2];</pre>
3428 </dd>
3429 <dd>
3430 <p>This will keep 10 full dumps, 4 most recent at 1 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A>,
3431 followed by 4 at an interval of 4 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A> (approx 1 month
3432 apart), and then 2 at an interval of 32 * <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A> (approx
3433 7-8 months apart).</p>
3434 </dd>
3435 <dd>
3436 <p>Example: these two settings are equivalent and both keep just
3437 the four most recent full dumps:</p>
3438 </dd>
3439 <dd>
3440 <pre>
3441 <a href="#item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt}</A> = 4;
3442 <a href="#item_%24conf%7bfullkeepcnt%7d">$Conf{FullKeepCnt}</A> = [4];</pre>
3443 </dd>
3444 <p></p>
3445 <dt><strong><a name="item_%24conf%7bfullkeepcntmin%7d">$Conf{FullKeepCntMin} = 1;</a></strong><br />
3446 </dt>
3447 <dt><strong><a name="item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax} = 90;</a></strong><br />
3448 </dt>
3449 <dd>
3450 Very old full backups are removed after <a href="#item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax}</A> days. However,
3451 we keep at least <a href="#item_%24conf%7bfullkeepcntmin%7d">$Conf{FullKeepCntMin}</A> full backups no matter how old
3452 they are.
3453 </dd>
3454 <dd>
3455 <p>Note that <a href="#item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax}</A> will be increased to <a href="#item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax}</A>
3456 times <a href="#item_%24conf%7bfullperiod%7d">$Conf{FullPeriod}</A> if <a href="#item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax}</A> specifies enough
3457 full backups to exceed <a href="#item_%24conf%7bfullagemax%7d">$Conf{FullAgeMax}</A>.</p>
3458 </dd>
3459 <p></p>
3460 <dt><strong><a name="item_%24conf%7bincrkeepcnt%7d">$Conf{IncrKeepCnt} = 6;</a></strong><br />
3461 </dt>
3462 <dd>
3463 Number of incremental backups to keep. Must be &gt;= 1.
3464 </dd>
3465 <dd>
3466 <p>In the steady state, each time an incr backup completes successfully
3467 the oldest one is removed. If this number is decreased, the
3468 extra old backups will be removed.</p>
3469 </dd>
3470 <p></p>
3471 <dt><strong><a name="item_%24conf%7bincrkeepcntmin%7d">$Conf{IncrKeepCntMin} = 1;</a></strong><br />
3472 </dt>
3473 <dt><strong><a name="item_%24conf%7bincragemax%7d">$Conf{IncrAgeMax} = 30;</a></strong><br />
3474 </dt>
3475 <dd>
3476 Very old incremental backups are removed after <a href="#item_%24conf%7bincragemax%7d">$Conf{IncrAgeMax}</A> days.
3477 However, we keep at least <a href="#item_%24conf%7bincrkeepcntmin%7d">$Conf{IncrKeepCntMin}</A> incremental backups no
3478 matter how old they are.
3479 </dd>
3480 <p></p>
3481 <dt><strong><a name="item_%24conf%7bpartialagemax%7d">$Conf{PartialAgeMax} = 3;</a></strong><br />
3482 </dt>
3483 <dd>
3484 A failed full backup is saved as a partial backup. The rsync
3485 XferMethod can take advantage of the partial full when the next
3486 backup is run. This parameter sets the age of the partial full
3487 in days: if the partial backup is older than this number of
3488 days, then rsync will ignore (not use) the partial full when
3489 the next backup is run. If you set this to a negative value
3490 then no partials will be saved. If you set this to 0, partials
3491 will be saved, but will not be used by the next backup.
3492 </dd>
3493 <dd>
3494 <p>The default setting of 3 days means that a partial older than
3495 3 days is ignored when the next full backup is done.</p>
3496 </dd>
3497 <p></p>
3498 <dt><strong><a name="item_%24conf%7bincrfill%7d">$Conf{IncrFill} = 0;</a></strong><br />
3499 </dt>
3500 <dd>
3501 Whether incremental backups are filled. ``Filling'' means that the
3502 most recent full (or filled) dump is merged into the new incremental
3503 dump using hardlinks. This makes an incremental dump look like a
3504 full dump. Prior to v1.03 all incremental backups were filled.
3505 In v1.4.0 and later the default is off.
3506 </dd>
3507 <dd>
3508 <p>BackupPC, and the cgi interface in particular, do the right thing on
3509 un-filled incremental backups. It will correctly display the merged
3510 incremental backup with the most recent filled backup, giving the
3511 un-filled incremental backups a filled appearance. That means it
3512 invisible to the user whether incremental dumps are filled or not.</p>
3513 </dd>
3514 <dd>
3515 <p>Filling backups takes a little extra disk space, and it does cost
3516 some extra disk activity for filling, and later removal. Filling
3517 is no longer useful, since file mangling and compression doesn't
3518 make a filled backup very useful. It's likely the filling option
3519 will be removed from future versions: filling will be delegated to
3520 the display and extraction of backup data.</p>
3521 </dd>
3522 <dd>
3523 <p>If filling is off, BackupPC makes sure that the oldest backup is
3524 a full, otherwise the following incremental backups will be
3525 incomplete. This might mean an extra full backup has to be
3526 kept until the following incremental backups expire.</p>
3527 </dd>
3528 <dd>
3529 <p>The default is off. You can turn this on or off at any
3530 time without affecting existing backups.</p>
3531 </dd>
3532 <p></p>
3533 <dt><strong><a name="item_%24conf%7brestoreinfokeepcnt%7d">$Conf{RestoreInfoKeepCnt} = 10;</a></strong><br />
3534 </dt>
3535 <dd>
3536 Number of restore logs to keep. BackupPC remembers information about
3537 each restore request. This number per client will be kept around before
3538 the oldest ones are pruned.
3539 </dd>
3540 <dd>
3541 <p>Note: files/dirs delivered via Zip or Tar downloads don't count as
3542 restores. Only the first restore option (where the files and dirs
3543 are written to the host) count as restores that are logged.</p>
3544 </dd>
3545 <p></p>
3546 <dt><strong><a name="item_%24conf%7barchiveinfokeepcnt%7d">$Conf{ArchiveInfoKeepCnt} = 10;</a></strong><br />
3547 </dt>
3548 <dd>
3549 Number of archive logs to keep. BackupPC remembers information
3550 about each archive request. This number per archive client will
3551 be kept around before the oldest ones are pruned.
3552 </dd>
3553 <p></p>
3554 <dt><strong><a name="item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly} = undef;</a></strong><br />
3555 </dt>
3556 <dd>
3557 List of directories or files to backup. If this is defined, only these
3558 directories or files will be backed up.
3559 </dd>
3560 <dd>
3561 <p>For Smb, only one of <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> and <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A>
3562 can be specified per share. If both are set for a particular share, then
3563 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> takes precedence and <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A>
3564 is ignored.</p>
3565 </dd>
3566 <dd>
3567 <p>This can be set to a string, an array of strings, or, in the case
3568 of multiple shares, a hash of strings or arrays. A hash is used
3569 to give a list of directories or files to backup for each share
3570 (the share name is the key). If this is set to just a string or
3571 array, and <a href="#item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName}</A> contains multiple share names, then
3572 the setting is assumed to apply all shares.</p>
3573 </dd>
3574 <dd>
3575 <p>Examples:</p>
3576 </dd>
3577 <dd>
3578 <pre>
3579 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> = '/myFiles';
3580 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> = ['/myFiles']; # same as first example
3581 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> = ['/myFiles', '/important'];
3582 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> = {
3583 'c' =&gt; ['/myFiles', '/important'], # these are for 'c' share
3584 'd' =&gt; ['/moreFiles', '/archive'], # these are for 'd' share
3585 };</pre>
3586 </dd>
3587 <p></p>
3588 <dt><strong><a name="item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude} = undef;</a></strong><br />
3589 </dt>
3590 <dd>
3591 List of directories or files to exclude from the backup. For Smb,
3592 only one of <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> and <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A>
3593 can be specified per share. If both are set for a particular share,
3594 then <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A> takes precedence and
3595 <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> is ignored.
3596 </dd>
3597 <dd>
3598 <p>This can be set to a string, an array of strings, or, in the case
3599 of multiple shares, a hash of strings or arrays. A hash is used
3600 to give a list of directories or files to exclude for each share
3601 (the share name is the key). If this is set to just a string or
3602 array, and <a href="#item_%24conf%7bsmbsharename%7d">$Conf{SmbShareName}</A> contains multiple share names, then
3603 the setting is assumed to apply to all shares.</p>
3604 </dd>
3605 <dd>
3606 <p>The exact behavior is determined by the underlying transport program,
3607 smbclient or tar. For smbclient the exlclude file list is passed into
3608 the X option. Simple shell wild-cards using ``*'' or ``?'' are allowed.</p>
3609 </dd>
3610 <dd>
3611 <p>For tar, if the exclude file contains a ``/'' it is assumed to be anchored
3612 at the start of the string. Since all the tar paths start with ``./'',
3613 BackupPC prepends a ``.'' if the exclude file starts with a ``/''. Note
3614 that GNU tar version &gt;= 1.13.7 is required for the exclude option to
3615 work correctly. For linux or unix machines you should add
3616 ``/proc'' to <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> unless you have specified
3617 --one-file-system in <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> or --one-file-system in
3618 <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>. Also, for tar, do not use a trailing ``/'' in
3619 the directory name: a trailing ``/'' causes the name to not match
3620 and the directory will not be excluded.</p>
3621 </dd>
3622 <dd>
3623 <p>Users report that for smbclient you should specify a directory
3624 followed by ``/*'', eg: ``/proc/*'', instead of just ``/proc''.</p>
3625 </dd>
3626 <dd>
3627 <p>Examples:</p>
3628 </dd>
3629 <dd>
3630 <pre>
3631 <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> = '/temp';
3632 <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> = ['/temp']; # same as first example
3633 <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> = ['/temp', '/winnt/tmp'];
3634 <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> = {
3635 'c' =&gt; ['/temp', '/winnt/tmp'], # these are for 'c' share
3636 'd' =&gt; ['/junk', '/dont_back_this_up'], # these are for 'd' share
3637 };</pre>
3638 </dd>
3639 <p></p>
3640 <dt><strong><a name="item_%24conf%7bblackoutbadpinglimit%7d">$Conf{BlackoutBadPingLimit} = 3;</a></strong><br />
3641 </dt>
3642 <dt><strong><a name="item_%24conf%7bblackoutgoodcnt%7d">$Conf{BlackoutGoodCnt} = 7;</a></strong><br />
3643 </dt>
3644 <dd>
3645 PCs that are always or often on the network can be backed up after
3646 hours, to reduce PC, network and server load during working hours. For
3647 each PC a count of consecutive good pings is maintained. Once a PC has
3648 at least <a href="#item_%24conf%7bblackoutgoodcnt%7d">$Conf{BlackoutGoodCnt}</A> consecutive good pings it is subject
3649 to ``blackout'' and not backed up during hours and days specified by
3650 <a href="#item_%24conf%7bblackoutperiods%7d">$Conf{BlackoutPeriods}</A>.
3651 </dd>
3652 <dd>
3653 <p>To allow for periodic rebooting of a PC or other brief periods when a
3654 PC is not on the network, a number of consecutive bad pings is allowed
3655 before the good ping count is reset. This parameter is
3656 <a href="#item_%24conf%7bblackoutbadpinglimit%7d">$Conf{BlackoutBadPingLimit}</A>.</p>
3657 </dd>
3658 <dd>
3659 <p>Note that bad and good pings don't occur with the same interval. If a
3660 machine is always on the network, it will only be pinged roughly once
3661 every <a href="#item_%24conf%7bincrperiod%7d">$Conf{IncrPeriod}</A> (eg: once per day). So a setting for
3662 <a href="#item_%24conf%7bblackoutgoodcnt%7d">$Conf{BlackoutGoodCnt}</A> of 7 means it will take around 7 days for a
3663 machine to be subject to blackout. On the other hand, if a ping is
3664 failed, it will be retried roughly every time BackupPC wakes up, eg,
3665 every one or two hours. So a setting for <a href="#item_%24conf%7bblackoutbadpinglimit%7d">$Conf{BlackoutBadPingLimit}</A> of
3666 3 means that the PC will lose its blackout status after 3-6 hours of
3667 unavailability.</p>
3668 </dd>
3669 <dd>
3670 <p>To disable the blackout feature set <a href="#item_%24conf%7bblackoutgoodcnt%7d">$Conf{BlackoutGoodCnt}</A> to a negative
3671 value. A value of 0 will make all machines subject to blackout. But
3672 if you don't want to do any backups during the day it would be easier
3673 to just set <a href="#item_%24conf%7bwakeupschedule%7d">$Conf{WakeupSchedule}</A> to a restricted schedule.</p>
3674 </dd>
3675 <p></p>
3676 <dt><strong><a name="item_%24conf%7bblackoutperiods%7d">$Conf{BlackoutPeriods} = [ ... ];</a></strong><br />
3677 </dt>
3678 <dd>
3679 One or more blackout periods can be specified. If a client is
3680 subject to blackout then no regular (non-manual) backups will
3681 be started during any of these periods. hourBegin and hourEnd
3682 specify hours fro midnight and weekDays is a list of days of
3683 the week where 0 is Sunday, 1 is Monday etc.
3684 </dd>
3685 <dd>
3686 <p>For example:</p>
3687 </dd>
3688 <dd>
3689 <pre>
3690 <a href="#item_%24conf%7bblackoutperiods%7d">$Conf{BlackoutPeriods}</A> = [
3691 {
3692 hourBegin =&gt; 7.0,
3693 hourEnd =&gt; 19.5,
3694 weekDays =&gt; [1, 2, 3, 4, 5],
3695 },
3696 ];</pre>
3697 </dd>
3698 <dd>
3699 <p>specifies one blackout period from 7:00am to 7:30pm local time
3700 on Mon-Fri.</p>
3701 </dd>
3702 <dd>
3703 <p>The blackout period can also span midnight by setting
3704 hourBegin &gt; hourEnd, eg:</p>
3705 </dd>
3706 <dd>
3707 <pre>
3708 <a href="#item_%24conf%7bblackoutperiods%7d">$Conf{BlackoutPeriods}</A> = [
3709 {
3710 hourBegin =&gt; 7.0,
3711 hourEnd =&gt; 19.5,
3712 weekDays =&gt; [1, 2, 3, 4, 5],
3713 },
3714 {
3715 hourBegin =&gt; 23,
3716 hourEnd =&gt; 5,
3717 weekDays =&gt; [5, 6],
3718 },
3719 ];</pre>
3720 </dd>
3721 <dd>
3722 <p>This specifies one blackout period from 7:00am to 7:30pm local time
3723 on Mon-Fri, and a second period from 11pm to 5am on Friday and
3724 Saturday night.</p>
3725 </dd>
3726 <p></p>
3727 <dt><strong><a name="item_%24conf%7bbackupzerofilesisfatal%7d">$Conf{BackupZeroFilesIsFatal} = 1;</a></strong><br />
3728 </dt>
3729 <dd>
3730 A backup of a share that has zero files is considered fatal. This is
3731 used to catch miscellaneous Xfer errors that result in no files being
3732 backed up. If you have shares that might be empty (and therefore an
3733 empty backup is valid) you should set this flag to 0.
3734 </dd>
3735 <p></p></dl>
3736 <p>
3737 </p>
3738 <h2><a name="general_perpc_configuration_settings">General per-PC configuration settings</a></h2>
3739 <dl>
3740 <dt><strong><a name="item_%24conf%7bxfermethod%7d">$Conf{XferMethod} = 'smb';</a></strong><br />
3741 </dt>
3742 <dd>
3743 What transport method to use to backup each host. If you have
3744 a mixed set of WinXX and linux/unix hosts you will need to override
3745 this in the per-PC config.pl.
3746 </dd>
3747 <dd>
3748 <p>The valid values are:</p>
3749 </dd>
3750 <dd>
3751 <pre>
3752 - 'smb': backup and restore via smbclient and the SMB protocol.
3753 Easiest choice for WinXX.</pre>
3754 </dd>
3755 <dd>
3756 <pre>
3757 - 'rsync': backup and restore via rsync (via rsh or ssh).
3758 Best choice for linux/unix. Good choice also for WinXX.</pre>
3759 </dd>
3760 <dd>
3761 <pre>
3762 - 'rsyncd': backup and restore via rsync daemon on the client.
3763 Best choice for linux/unix if you have rsyncd running on
3764 the client. Good choice also for WinXX.</pre>
3765 </dd>
3766 <dd>
3767 <pre>
3768 - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
3769 Good choice for linux/unix.</pre>
3770 </dd>
3771 <dd>
3772 <pre>
3773 - 'archive': host is a special archive host. Backups are not done.
3774 An archive host is used to archive other host's backups
3775 to permanent media, such as tape, CDR or DVD.</pre>
3776 </dd>
3777 <p></p>
3778 <dt><strong><a name="item_%24conf%7bxferloglevel%7d">$Conf{XferLogLevel} = 1;</a></strong><br />
3779 </dt>
3780 <dd>
3781 Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
3782 will give one line per file, 2 will also show skipped files on
3783 incrementals, higher values give more output.
3784 </dd>
3785 <p></p>
3786 <dt><strong><a name="item_%24conf%7bsmbclientpath%7d">$Conf{SmbClientPath} = '/usr/bin/smbclient';</a></strong><br />
3787 </dt>
3788 <dd>
3789 Full path for smbclient. Security caution: normal users should not
3790 allowed to write to this file or directory.
3791 </dd>
3792 <dd>
3793 <p>smbclient is from the Samba distribution. smbclient is used to
3794 actually extract the incremental or full dump of the share filesystem
3795 from the PC.</p>
3796 </dd>
3797 <dd>
3798 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.</p>
3799 </dd>
3800 <p></p>
3801 <dt><strong><a name="item_%24conf%7bsmbclientfullcmd%7d">$Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' ...</a></strong><br />
3802 </dt>
3803 <dd>
3804 Command to run smbclient for a full dump.
3805 This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.
3806 </dd>
3807 <dd>
3808 <p>The following variables are substituted at run-time:</p>
3809 </dd>
3810 <dd>
3811 <pre>
3812 $smbClientPath same as <a href="#item_%24conf%7bsmbclientpath%7d">$Conf{SmbClientPath}</A>
3813 $host host to backup/restore
3814 $hostIP host IP address
3815 $shareName share name
3816 $userName user name
3817 $fileList list of files to backup (based on exclude/include)
3818 $I_option optional -I option to smbclient
3819 $X_option exclude option (if $fileList is an exclude list)
3820 $timeStampFile start time for incremental dump</pre>
3821 </dd>
3822 <p></p>
3823 <dt><strong><a name="item_%24conf%7bsmbclientincrcmd%7d">$Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' ...</a></strong><br />
3824 </dt>
3825 <dd>
3826 Command to run smbclient for an incremental dump.
3827 This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.
3828 </dd>
3829 <dd>
3830 <p>Same variable substitutions are applied as <a href="#item_%24conf%7bsmbclientfullcmd%7d">$Conf{SmbClientFullCmd}</A>.</p>
3831 </dd>
3832 <p></p>
3833 <dt><strong><a name="item_%24conf%7bsmbclientrestorecmd%7d">$Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' ...</a></strong><br />
3834 </dt>
3835 <dd>
3836 Command to run smbclient for a restore.
3837 This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'smb'.
3838 </dd>
3839 <dd>
3840 <p>Same variable substitutions are applied as <a href="#item_%24conf%7bsmbclientfullcmd%7d">$Conf{SmbClientFullCmd}</A>.</p>
3841 </dd>
3842 <dd>
3843 <p>If your smb share is read-only then direct restores will fail.
3844 You should set <a href="#item_%24conf%7bsmbclientrestorecmd%7d">$Conf{SmbClientRestoreCmd}</A> to undef and the
3845 corresponding CGI restore option will be removed.</p>
3846 </dd>
3847 <p></p>
3848 <dt><strong><a name="item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' ...</a></strong><br />
3849 </dt>
3850 <dd>
3851 Full command to run tar on the client. GNU tar is required. You will
3852 need to fill in the correct paths for ssh2 on the local host (server)
3853 and GNU tar on the client. Security caution: normal users should not
3854 allowed to write to these executable files or directories.
3855 </dd>
3856 <dd>
3857 <p>See the documentation for more information about setting up ssh2 keys.</p>
3858 </dd>
3859 <dd>
3860 <p>If you plan to use NFS then tar just runs locally and ssh2 is not needed.
3861 For example, assuming the client filesystem is mounted below /mnt/hostName,
3862 you could use something like:</p>
3863 </dd>
3864 <dd>
3865 <pre>
3866 <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
3867 . ' --totals';</pre>
3868 </dd>
3869 <dd>
3870 <p>In the case of NFS or rsh you need to make sure BackupPC's privileges
3871 are sufficient to read all the files you want to backup. Also, you
3872 will probably want to add ``/proc'' to <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A>.</p>
3873 </dd>
3874 <dd>
3875 <p>The following variables are substituted at run-time:</p>
3876 </dd>
3877 <dd>
3878 <pre>
3879 $host host name
3880 $hostIP host's IP address
3881 $incrDate newer-than date for incremental backups
3882 $shareName share name to backup (ie: top-level directory path)
3883 $fileList specific files to backup or exclude
3884 $tarPath same as <a href="#item_%24conf%7btarclientpath%7d">$Conf{TarClientPath}</A>
3885 $sshPath same as <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A></pre>
3886 </dd>
3887 <dd>
3888 <p>If a variable is followed by a ``+'' it is shell escaped. This is
3889 necessary for the command part of ssh or rsh, since it ends up
3890 getting passed through the shell.</p>
3891 </dd>
3892 <dd>
3893 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'tar'.</p>
3894 </dd>
3895 <p></p>
3896 <dt><strong><a name="item_%24conf%7btarfullargs%7d">$Conf{TarFullArgs} = '$fileList+';</a></strong><br />
3897 </dt>
3898 <dd>
3899 Extra tar arguments for full backups. Several variables are substituted at
3900 run-time. See <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> for the list of variable substitutions.
3901 </dd>
3902 <dd>
3903 <p>If you are running tar locally (ie: without rsh or ssh) then remove the
3904 ``+'' so that the argument is no longer shell escaped.</p>
3905 </dd>
3906 <dd>
3907 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'tar'.</p>
3908 </dd>
3909 <p></p>
3910 <dt><strong><a name="item_%24conf%7btarincrargs%7d">$Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';</a></strong><br />
3911 </dt>
3912 <dd>
3913 Extra tar arguments for incr backups. Several variables are substituted at
3914 run-time. See <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> for the list of variable substitutions.
3915 </dd>
3916 <dd>
3917 <p>Note that GNU tar has several methods for specifying incremental backups,
3918 including:</p>
3919 </dd>
3920 <dd>
3921 <pre>
3922 --newer-mtime $incrDate+
3923 This causes a file to be included if the modification time is
3924 later than $incrDate (meaning its contents might have changed).
3925 But changes in the ownership or modes will not qualify the
3926 file to be included in an incremental.</pre>
3927 </dd>
3928 <dd>
3929 <pre>
3930 --newer=$incrDate+
3931 This causes the file to be included if any attribute of the
3932 file is later than $incrDate, meaning either attributes or
3933 the modification time. This is the default method. Do
3934 not use --atime-preserve in <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> above,
3935 otherwise resetting the atime (access time) counts as an
3936 attribute change, meaning the file will always be included
3937 in each new incremental dump.</pre>
3938 </dd>
3939 <dd>
3940 <p>If you are running tar locally (ie: without rsh or ssh) then remove the
3941 ``+'' so that the argument is no longer shell escaped.</p>
3942 </dd>
3943 <dd>
3944 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'tar'.</p>
3945 </dd>
3946 <p></p>
3947 <dt><strong><a name="item_%24conf%7btarclientrestorecmd%7d">$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' ...</a></strong><br />
3948 </dt>
3949 <dd>
3950 Full command to run tar for restore on the client. GNU tar is required.
3951 This can be the same as <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A>, with tar's -c replaced by -x
3952 and ssh's -n removed.
3953 </dd>
3954 <dd>
3955 <p>See <a href="#item_%24conf%7btarclientcmd%7d">$Conf{TarClientCmd}</A> for full details.</p>
3956 </dd>
3957 <dd>
3958 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``tar''.</p>
3959 </dd>
3960 <dd>
3961 <p>If you want to disable direct restores using tar, you should set
3962 <a href="#item_%24conf%7btarclientrestorecmd%7d">$Conf{TarClientRestoreCmd}</A> to undef and the corresponding CGI
3963 restore option will be removed.</p>
3964 </dd>
3965 <p></p>
3966 <dt><strong><a name="item_%24conf%7btarclientpath%7d">$Conf{TarClientPath} = '/bin/tar';</a></strong><br />
3967 </dt>
3968 <dd>
3969 Full path for tar on the client. Security caution: normal users should not
3970 allowed to write to this file or directory.
3971 </dd>
3972 <dd>
3973 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'tar'.</p>
3974 </dd>
3975 <p></p>
3976 <dt><strong><a name="item_%24conf%7brsyncclientpath%7d">$Conf{RsyncClientPath} = '/bin/rsync';</a></strong><br />
3977 </dt>
3978 <dd>
3979 Path to rsync executable on the client
3980 </dd>
3981 <p></p>
3982 <dt><strong><a name="item_%24conf%7brsyncclientcmd%7d">$Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';</a></strong><br />
3983 </dt>
3984 <dd>
3985 Full command to run rsync on the client machine. The following variables
3986 are substituted at run-time:
3987 </dd>
3988 <dd>
3989 <pre>
3990 $host host name being backed up
3991 $hostIP host's IP address
3992 $shareName share name to backup (ie: top-level directory path)
3993 $rsyncPath same as <a href="#item_%24conf%7brsyncclientpath%7d">$Conf{RsyncClientPath}</A>
3994 $sshPath same as <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>
3995 $argList argument list, built from <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>,
3996 $shareName, <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> and
3997 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A></pre>
3998 </dd>
3999 <dd>
4000 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'rsync'.</p>
4001 </dd>
4002 <p></p>
4003 <dt><strong><a name="item_%24conf%7brsyncclientrestorecmd%7d">$Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';</a></strong><br />
4004 </dt>
4005 <dd>
4006 Full command to run rsync for restore on the client. The following
4007 variables are substituted at run-time:
4008 </dd>
4009 <dd>
4010 <pre>
4011 $host host name being backed up
4012 $hostIP host's IP address
4013 $shareName share name to backup (ie: top-level directory path)
4014 $rsyncPath same as <a href="#item_%24conf%7brsyncclientpath%7d">$Conf{RsyncClientPath}</A>
4015 $sshPath same as <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>
4016 $argList argument list, built from <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>,
4017 $shareName, <a href="#item_%24conf%7bbackupfilesexclude%7d">$Conf{BackupFilesExclude}</A> and
4018 <a href="#item_%24conf%7bbackupfilesonly%7d">$Conf{BackupFilesOnly}</A></pre>
4019 </dd>
4020 <dd>
4021 <p>This setting only matters if <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = 'rsync'.</p>
4022 </dd>
4023 <p></p>
4024 <dt><strong><a name="item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName} = '/';</a></strong><br />
4025 </dt>
4026 <dd>
4027 Share name to backup. For <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``rsync'' this should
4028 be a file system path, eg '/' or '/home'.
4029 </dd>
4030 <dd>
4031 <p>For <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``rsyncd'' this should be the name of the module
4032 to backup (ie: the name from /etc/rsynd.conf).</p>
4033 </dd>
4034 <dd>
4035 <p>This can also be a list of multiple file system paths or modules.
4036 For example, by adding --one-file-system to <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A> you
4037 can backup each file system separately, which makes restoring one
4038 bad file system easier. In this case you would list all of the mount
4039 points:</p>
4040 </dd>
4041 <dd>
4042 <pre>
4043 <a href="#item_%24conf%7brsyncsharename%7d">$Conf{RsyncShareName}</A> = ['/', '/var', '/data', '/boot'];</pre>
4044 </dd>
4045 <p></p>
4046 <dt><strong><a name="item_%24conf%7brsyncdclientport%7d">$Conf{RsyncdClientPort} = 873;</a></strong><br />
4047 </dt>
4048 <dd>
4049 Rsync daemon port on the client, for <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``rsyncd''.
4050 </dd>
4051 <p></p>
4052 <dt><strong><a name="item_%24conf%7brsyncdusername%7d">$Conf{RsyncdUserName} = '';</a></strong><br />
4053 </dt>
4054 <dd>
4055 Rsync daemon user name on client, for <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``rsyncd''.
4056 The user name and password are stored on the client in whatever file
4057 the ``secrets file'' parameter in rsyncd.conf points to
4058 (eg: /etc/rsyncd.secrets).
4059 </dd>
4060 <p></p>
4061 <dt><strong><a name="item_%24conf%7brsyncdpasswd%7d">$Conf{RsyncdPasswd} = '';</a></strong><br />
4062 </dt>
4063 <dd>
4064 Rsync daemon user name on client, for <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> = ``rsyncd''.
4065 The user name and password are stored on the client in whatever file
4066 the ``secrets file'' parameter in rsyncd.conf points to
4067 (eg: /etc/rsyncd.secrets).
4068 </dd>
4069 <p></p>
4070 <dt><strong><a name="item_%24conf%7brsyncdauthrequired%7d">$Conf{RsyncdAuthRequired} = 1;</a></strong><br />
4071 </dt>
4072 <dd>
4073 Whether authentication is mandatory when connecting to the client's
4074 rsyncd. By default this is on, ensuring that BackupPC will refuse to
4075 connect to an rsyncd on the client that is not password protected.
4076 Turn off at your own risk.
4077 </dd>
4078 <p></p>
4079 <dt><strong><a name="item_%24conf%7brsynccsumcacheverifyprob%7d">$Conf{RsyncCsumCacheVerifyProb} = 0.01;</a></strong><br />
4080 </dt>
4081 <dd>
4082 When rsync checksum caching is enabled (by adding the
4083 --checksum-seed=32761 option to <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A>), the cached
4084 checksums can be occaisonally verified to make sure the file
4085 contents matches the cached checksums. This is to avoid the
4086 risk that disk problems might cause the pool file contents to
4087 get corrupted, but the cached checksums would make BackupPC
4088 think that the file still matches the client.
4089 </dd>
4090 <dd>
4091 <p>This setting is the probability (0 means never and 1 means always)
4092 that a file will be rechecked. Setting it to 0 means the checksums
4093 will not be rechecked (unless there is a phase 0 failure). Setting
4094 it to 1 (ie: 100%) means all files will be checked, but that is
4095 not a desirable setting since you are better off simply turning
4096 caching off (ie: remove the --checksum-seed option).</p>
4097 </dd>
4098 <dd>
4099 <p>The default of 0.01 means 1% (on average) of the files during a full
4100 backup will have their cached checksum re-checked.</p>
4101 </dd>
4102 <dd>
4103 <p>This setting has no effect unless checksum caching is turned on.</p>
4104 </dd>
4105 <p></p>
4106 <dt><strong><a name="item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs} = [ ... ];</a></strong><br />
4107 </dt>
4108 <dd>
4109 Arguments to rsync for backup. Do not edit the first set unless you
4110 have a thorough understanding of how File::RsyncP works.
4111 </dd>
4112 <dd>
4113 <p>Examples of additional arguments that should work are --exclude/--include,
4114 eg:</p>
4115 </dd>
4116 <dd>
4117 <pre>
4118 <a href="#item_%24conf%7brsyncargs%7d">$Conf{RsyncArgs}</A> = [
4119 # original arguments here
4120 '-v',
4121 '--exclude', '/proc',
4122 '--exclude', '*.tmp',
4123 ];</pre>
4124 </dd>
4125 <p></p>
4126 <dt><strong><a name="item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs} = [ ... ];</a></strong><br />
4127 </dt>
4128 <dd>
4129 Arguments to rsync for restore. Do not edit the first set unless you
4130 have a thorough understanding of how File::RsyncP works.
4131 </dd>
4132 <dd>
4133 <p>If you want to disable direct restores using rsync (eg: is the module
4134 is read-only), you should set <a href="#item_%24conf%7brsyncrestoreargs%7d">$Conf{RsyncRestoreArgs}</A> to undef and
4135 the corresponding CGI restore option will be removed.</p>
4136 </dd>
4137 <p></p>
4138 <dt><strong><a name="item_%24conf%7barchivedest%7d">$Conf{ArchiveDest} = '/tmp';</a></strong><br />
4139 </dt>
4140 <dd>
4141 Archive Destination
4142 </dd>
4143 <dd>
4144 <p>The Destination of the archive
4145 e.g. /tmp for file archive or /dev/nst0 for device archive</p>
4146 </dd>
4147 <p></p>
4148 <dt><strong><a name="item_%24conf%7barchivecomp%7d">$Conf{ArchiveComp} = 'gzip';</a></strong><br />
4149 </dt>
4150 <dd>
4151 Archive Compression type
4152 </dd>
4153 <dd>
4154 <p>The valid values are:</p>
4155 </dd>
4156 <dd>
4157 <pre>
4158 - 'none': No Compression</pre>
4159 </dd>
4160 <dd>
4161 <pre>
4162 - 'gzip': Medium Compression. Recommended.</pre>
4163 </dd>
4164 <dd>
4165 <pre>
4166 - 'bzip2': High Compression but takes longer.</pre>
4167 </dd>
4168 <p></p>
4169 <dt><strong><a name="item_%24conf%7barchivepar%7d">$Conf{ArchivePar} = 0;</a></strong><br />
4170 </dt>
4171 <dd>
4172 Archive Parity Files
4173 </dd>
4174 <dd>
4175 <p>The amount of Parity data to generate, as a percentage
4176 of the archive size.
4177 Uses the commandline par2 (par2cmdline) available from
4178 <a href="http://parchive.sourceforge.net">http://parchive.sourceforge.net</a></p>
4179 </dd>
4180 <dd>
4181 <p>Only useful for file dumps.</p>
4182 </dd>
4183 <dd>
4184 <p>Set to 0 to disable this feature.</p>
4185 </dd>
4186 <p></p>
4187 <dt><strong><a name="item_%24conf%7barchivesplit%7d">$Conf{ArchiveSplit} = 0;</a></strong><br />
4188 </dt>
4189 <dd>
4190 Archive Size Split
4191 </dd>
4192 <dd>
4193 <p>Only for file archives. Splits the output into
4194 the specified size * 1,000,000.
4195 e.g. to split into 650,000,000 bytes, specify 650 below.</p>
4196 </dd>
4197 <dd>
4198 <p>If the value is 0, or if <a href="#item_%24conf%7barchivedest%7d">$Conf{ArchiveDest}</A> is an existing file or
4199 device (e.g. a streaming tape drive), this feature is disabled.</p>
4200 </dd>
4201 <p></p>
4202 <dt><strong><a name="item_%24conf%7barchiveclientcmd%7d">$Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost' ...</a></strong><br />
4203 </dt>
4204 <dd>
4205 Archive Command
4206 </dd>
4207 <dd>
4208 <p>This is the command that is called to actually run the archive process
4209 for each host. The following variables are substituted at run-time:</p>
4210 </dd>
4211 <dd>
4212 <pre>
4213 $Installdir The installation directory of BackupPC
4214 $tarCreatePath The path to BackupPC_tarCreate
4215 $splitpath The path to the split program
4216 $parpath The path to the par2 program
4217 $host The host to archive
4218 $backupnumber The backup number of the host to archive
4219 $compression The path to the compression program
4220 $compext The extension assigned to the compression type
4221 $splitsize The number of bytes to split archives into
4222 $archiveloc The location to put the archive
4223 $parfile The amount of parity data to create (percentage)</pre>
4224 </dd>
4225 <p></p>
4226 <dt><strong><a name="item_%24conf%7bsshpath%7d">$Conf{SshPath} = '/usr/bin/ssh';</a></strong><br />
4227 </dt>
4228 <dd>
4229 Full path for ssh. Security caution: normal users should not
4230 allowed to write to this file or directory.
4231 </dd>
4232 <p></p>
4233 <dt><strong><a name="item_%24conf%7bnmblookuppath%7d">$Conf{NmbLookupPath} = '/usr/bin/nmblookup';</a></strong><br />
4234 </dt>
4235 <dd>
4236 Full path for nmblookup. Security caution: normal users should not
4237 allowed to write to this file or directory.
4238 </dd>
4239 <dd>
4240 <p>nmblookup is from the Samba distribution. nmblookup is used to get the
4241 netbios name, necessary for DHCP hosts.</p>
4242 </dd>
4243 <p></p>
4244 <dt><strong><a name="item_%24conf%7bnmblookupcmd%7d">$Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';</a></strong><br />
4245 </dt>
4246 <dd>
4247 NmbLookup command. Given an IP address, does an nmblookup on that
4248 IP address. The following variables are substituted at run-time:
4249 </dd>
4250 <dd>
4251 <pre>
4252 $nmbLookupPath path to nmblookup (<a href="#item_%24conf%7bnmblookuppath%7d">$Conf{NmbLookupPath}</A>)
4253 $host IP address</pre>
4254 </dd>
4255 <dd>
4256 <p>This command is only used for DHCP hosts: given an IP address, this
4257 command should try to find its NetBios name.</p>
4258 </dd>
4259 <p></p>
4260 <dt><strong><a name="item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';</a></strong><br />
4261 </dt>
4262 <dd>
4263 NmbLookup command. Given a netbios name, finds that host by doing
4264 a NetBios lookup. Several variables are substituted at run-time:
4265 </dd>
4266 <dd>
4267 <pre>
4268 $nmbLookupPath path to nmblookup (<a href="#item_%24conf%7bnmblookuppath%7d">$Conf{NmbLookupPath}</A>)
4269 $host NetBios name</pre>
4270 </dd>
4271 <dd>
4272 <p>In some cases you might need to change the broadcast address, for
4273 example if nmblookup uses 192.168.255.255 by default and you find
4274 that doesn't work, try 192.168.1.255 (or your equivalent class C
4275 address) using the -B option:</p>
4276 </dd>
4277 <dd>
4278 <pre>
4279 <a href="#item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd}</A> = '$nmbLookupPath -B 192.168.1.255 $host';</pre>
4280 </dd>
4281 <dd>
4282 <p>If you use a WINS server and your machines don't respond to
4283 multicast NetBios requests you can use this (replace 1.2.3.4
4284 with the IP address of your WINS server):</p>
4285 </dd>
4286 <dd>
4287 <pre>
4288 <a href="#item_%24conf%7bnmblookupfindhostcmd%7d">$Conf{NmbLookupFindHostCmd}</A> = '$nmbLookupPath -R -U 1.2.3.4 $host';</pre>
4289 </dd>
4290 <dd>
4291 <p>This is preferred over multicast since it minimizes network traffic.</p>
4292 </dd>
4293 <dd>
4294 <p>Experiment manually for your site to see what form of nmblookup command
4295 works.</p>
4296 </dd>
4297 <p></p>
4298 <dt><strong><a name="item_%24conf%7bfixedipnetbiosnamecheck%7d">$Conf{FixedIPNetBiosNameCheck} = 0;</a></strong><br />
4299 </dt>
4300 <dd>
4301 For fixed IP address hosts, BackupPC_dump can also verify the netbios
4302 name to ensure it matches the host name. An error is generated if
4303 they do not match. Typically this flag is off. But if you are going
4304 to transition a bunch of machines from fixed host addresses to DHCP,
4305 setting this flag is a great way to verify that the machines have
4306 their netbios name set correctly before turning on DCHP.
4307 </dd>
4308 <p></p>
4309 <dt><strong><a name="item_%24conf%7bpingpath%7d">$Conf{PingPath} = '/bin/ping';</a></strong><br />
4310 </dt>
4311 <dd>
4312 Full path to the ping command. Security caution: normal users
4313 should not be allowed to write to this file or directory.
4314 </dd>
4315 <dd>
4316 <p>If you want to disable ping checking, set this to some program
4317 that exits with 0 status, eg:</p>
4318 </dd>
4319 <dd>
4320 <pre>
4321 <a href="#item_%24conf%7bpingpath%7d">$Conf{PingPath}</A> = '/bin/echo';</pre>
4322 </dd>
4323 <p></p>
4324 <dt><strong><a name="item_%24conf%7bpingcmd%7d">$Conf{PingCmd} = '$pingPath -c 1 $host';</a></strong><br />
4325 </dt>
4326 <dd>
4327 Ping command. The following variables are substituted at run-time:
4328 </dd>
4329 <dd>
4330 <pre>
4331 $pingPath path to ping (<a href="#item_%24conf%7bpingpath%7d">$Conf{PingPath}</A>)
4332 $host host name</pre>
4333 </dd>
4334 <dd>
4335 <p>Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
4336 exit status (0 even on failure). Replace with ``ping $host 1'', which
4337 gets the correct exit status but we don't get the round-trip time.</p>
4338 </dd>
4339 <p></p>
4340 <dt><strong><a name="item_%24conf%7bserverinitdpath%7d">$Conf{ServerInitdPath} = '';</a></strong><br />
4341 </dt>
4342 <dt><strong><a name="item_%24conf%7bserverinitdstartcmd%7d">$Conf{ServerInitdStartCmd} = '';</a></strong><br />
4343 </dt>
4344 <dd>
4345 Path to init.d script and command to use that script to start the
4346 server from the CGI interface. The following variables are substituted
4347 at run-time:
4348 </dd>
4349 <dd>
4350 <pre>
4351 $sshPath path to ssh (<a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>)
4352 $serverHost same as <a href="#item_%24conf%7bserverhost%7d">$Conf{ServerHost}</A>
4353 $serverInitdPath path to init.d script (<a href="#item_%24conf%7bserverinitdpath%7d">$Conf{ServerInitdPath}</A>)</pre>
4354 </dd>
4355 <dd>
4356 <p>Example:</p>
4357 </dd>
4358 <dd>
4359 <p><a href="#item_%24conf%7bserverinitdpath%7d">$Conf{ServerInitdPath}</A> = '/etc/init.d/backuppc';
4360 <a href="#item_%24conf%7bserverinitdstartcmd%7d">$Conf{ServerInitdStartCmd}</A> = '$sshPath -q -x -l root $serverHost'
4361 . ' $serverInitdPath start'
4362 . ' &lt; /dev/null &gt;&amp; /dev/null';</p>
4363 </dd>
4364 <p></p>
4365 <dt><strong><a name="item_%24conf%7bcompresslevel%7d">$Conf{CompressLevel} = 0;</a></strong><br />
4366 </dt>
4367 <dd>
4368 Compression level to use on files. 0 means no compression. Compression
4369 levels can be from 1 (least cpu time, slightly worse compression) to
4370 9 (most cpu time, slightly better compression). The recommended value
4371 is 3. Changing to 5, for example, will take maybe 20% more cpu time
4372 and will get another 2-3% additional compression. See the zlib
4373 documentation for more information about compression levels.
4374 </dd>
4375 <dd>
4376 <p>Changing compression on or off after backups have already been done
4377 will require both compressed and uncompressed pool files to be stored.
4378 This will increase the pool storage requirements, at least until all
4379 the old backups expire and are deleted.</p>
4380 </dd>
4381 <dd>
4382 <p>It is ok to change the compression value (from one non-zero value to
4383 another non-zero value) after dumps are already done. Since BackupPC
4384 matches pool files by comparing the uncompressed versions, it will still
4385 correctly match new incoming files against existing pool files. The
4386 new compression level will take effect only for new files that are
4387 newly compressed and added to the pool.</p>
4388 </dd>
4389 <dd>
4390 <p>If compression was off and you are enabling compression for the first
4391 time you can use the BackupPC_compressPool utility to compress the
4392 pool. This avoids having the pool grow to accommodate both compressed
4393 and uncompressed backups. See the documentation for more information.</p>
4394 </dd>
4395 <dd>
4396 <p>Note: compression needs the Compress::Zlib perl library. If the
4397 Compress::Zlib library can't be found then <a href="#item_%24conf%7bcompresslevel%7d">$Conf{CompressLevel}</A> is
4398 forced to 0 (compression off).</p>
4399 </dd>
4400 <p></p>
4401 <dt><strong><a name="item_%24conf%7bpingmaxmsec%7d">$Conf{PingMaxMsec} = 20;</a></strong><br />
4402 </dt>
4403 <dd>
4404 Maximum round-trip ping time in milliseconds. This threshold is set
4405 to avoid backing up PCs that are remotely connected through WAN or
4406 dialup connections. The output from ping -s (assuming it is supported
4407 on your system) is used to check the round-trip packet time. On your
4408 local LAN round-trip times should be much less than 20msec. On most
4409 WAN or dialup connections the round-trip time will be typically more
4410 than 20msec. Tune if necessary.
4411 </dd>
4412 <p></p>
4413 <dt><strong><a name="item_%24conf%7bclienttimeout%7d">$Conf{ClientTimeout} = 72000;</a></strong><br />
4414 </dt>
4415 <dd>
4416 Timeout in seconds when listening for the transport program's
4417 (smbclient, tar etc) stdout. If no output is received during this
4418 time, then it is assumed that something has wedged during a backup,
4419 and the backup is terminated.
4420 </dd>
4421 <dd>
4422 <p>Note that stdout buffering combined with huge files being backed up
4423 could cause longish delays in the output from smbclient that
4424 BackupPC_dump sees, so in rare cases you might want to increase
4425 this value.</p>
4426 </dd>
4427 <dd>
4428 <p>Despite the name, this parameter sets the timeout for all transport
4429 methods (tar, smb etc).</p>
4430 </dd>
4431 <p></p>
4432 <dt><strong><a name="item_%24conf%7bmaxoldperpclogfiles%7d">$Conf{MaxOldPerPCLogFiles} = 12;</a></strong><br />
4433 </dt>
4434 <dd>
4435 Maximum number of log files we keep around in each PC's directory
4436 (ie: pc/$host). These files are aged monthly. A setting of 12
4437 means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
4438 in the pc/$host directory (ie: about a years worth). (Except this
4439 month's LOG, these files will have a .z extension if compression
4440 is on).
4441 </dd>
4442 <dd>
4443 <p>If you decrease this number after BackupPC has been running for a
4444 while you will have to manually remove the older log files.</p>
4445 </dd>
4446 <p></p>
4447 <dt><strong><a name="item_%24conf%7bdumppreusercmd%7d">$Conf{DumpPreUserCmd} = undef;</a></strong><br />
4448 </dt>
4449 <dt><strong><a name="item_%24conf%7bdumppostusercmd%7d">$Conf{DumpPostUserCmd} = undef;</a></strong><br />
4450 </dt>
4451 <dt><strong><a name="item_%24conf%7brestorepreusercmd%7d">$Conf{RestorePreUserCmd} = undef;</a></strong><br />
4452 </dt>
4453 <dt><strong><a name="item_%24conf%7brestorepostusercmd%7d">$Conf{RestorePostUserCmd} = undef;</a></strong><br />
4454 </dt>
4455 <dt><strong><a name="item_%24conf%7barchivepreusercmd%7d">$Conf{ArchivePreUserCmd} = undef;</a></strong><br />
4456 </dt>
4457 <dt><strong><a name="item_%24conf%7barchivepostusercmd%7d">$Conf{ArchivePostUserCmd} = undef;</a></strong><br />
4458 </dt>
4459 <dd>
4460 Optional commands to run before and after dumps and restores.
4461 Stdout from these commands will be written to the Xfer (or Restore)
4462 log file. One example of using these commands would be to
4463 shut down and restart a database server, or to dump a database
4464 to files for backup. Example:
4465 </dd>
4466 <dd>
4467 <pre>
4468 <a href="#item_%24conf%7bdumppreusercmd%7d">$Conf{DumpPreUserCmd}</A> = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';</pre>
4469 </dd>
4470 <dd>
4471 <p>The following variable substitutions are made at run time for
4472 <a href="#item_%24conf%7bdumppreusercmd%7d">$Conf{DumpPreUserCmd}</A> and <a href="#item_%24conf%7bdumppostusercmd%7d">$Conf{DumpPostUserCmd}</A>:</p>
4473 </dd>
4474 <dd>
4475 <pre>
4476 $type type of dump (incr or full)
4477 $xferOK 1 if the dump succeeded, 0 if it didn't
4478 $client client name being backed up
4479 $host host name (could be different from client name if
4480 <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> is set)
4481 $hostIP IP address of host
4482 $user user name from the hosts file
4483 $moreUsers list of additional users from the hosts file
4484 $share the first share name
4485 $shares list of all the share names
4486 $XferMethod value of <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> (eg: tar, rsync, smb)
4487 $sshPath value of <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>,
4488 $cmdType set to DumpPreUserCmd or DumpPostUserCmd</pre>
4489 </dd>
4490 <dd>
4491 <p>The following variable substitutions are made at run time for
4492 <a href="#item_%24conf%7brestorepreusercmd%7d">$Conf{RestorePreUserCmd}</A> and <a href="#item_%24conf%7brestorepostusercmd%7d">$Conf{RestorePostUserCmd}</A>:</p>
4493 </dd>
4494 <dd>
4495 <pre>
4496 $client client name being backed up
4497 $xferOK 1 if the restore succeeded, 0 if it didn't
4498 $host host name (could be different from client name if
4499 <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> is set)
4500 $hostIP IP address of host
4501 $user user name from the hosts file
4502 $moreUsers list of additional users from the hosts file
4503 $share the first share name
4504 $XferMethod value of <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> (eg: tar, rsync, smb)
4505 $sshPath value of <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>,
4506 $type set to &quot;restore&quot;
4507 $bkupSrcHost host name of the restore source
4508 $bkupSrcShare share name of the restore source
4509 $bkupSrcNum backup number of the restore source
4510 $pathHdrSrc common starting path of restore source
4511 $pathHdrDest common starting path of destination
4512 $fileList list of files being restored
4513 $cmdType set to RestorePreUserCmd or RestorePostUserCmd</pre>
4514 </dd>
4515 <dd>
4516 <p>The following variable substitutions are made at run time for
4517 <a href="#item_%24conf%7barchivepreusercmd%7d">$Conf{ArchivePreUserCmd}</A> and <a href="#item_%24conf%7barchivepostusercmd%7d">$Conf{ArchivePostUserCmd}</A>:</p>
4518 </dd>
4519 <dd>
4520 <pre>
4521 $client client name being backed up
4522 $xferOK 1 if the archive succeeded, 0 if it didn't
4523 $host Name of the archive host
4524 $user user name from the hosts file
4525 $share the first share name
4526 $XferMethod value of <a href="#item_%24conf%7bxfermethod%7d">$Conf{XferMethod}</A> (eg: tar, rsync, smb)
4527 $HostList list of hosts being archived
4528 $BackupList list of backup numbers for the hosts being archived
4529 $archiveloc location where the archive is sent to
4530 $parfile amount of parity data being generated (percentage)
4531 $compression compression program being used (eg: cat, gzip, bzip2)
4532 $compext extension used for compression type (eg: raw, gz, bz2)
4533 $splitsize size of the files that the archive creates
4534 $sshPath value of <a href="#item_%24conf%7bsshpath%7d">$Conf{SshPath}</A>,
4535 $type set to &quot;archive&quot;
4536 $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd</pre>
4537 </dd>
4538 <p></p>
4539 <dt><strong><a name="item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias} = undef;</a></strong><br />
4540 </dt>
4541 <dd>
4542 Override the client's host name. This allows multiple clients
4543 to all refer to the same physical host. This should only be
4544 set in the per-PC config file and is only used by BackupPC at
4545 the last moment prior to generating the command used to backup
4546 that machine (ie: the value of <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> is invisible
4547 everywhere else in BackupPC). The setting can be a host name or
4548 IP address, eg:
4549 </dd>
4550 <dd>
4551 <pre>
4552 <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> = 'realHostName';
4553 <a href="#item_%24conf%7bclientnamealias%7d">$Conf{ClientNameAlias}</A> = '192.1.1.15';</pre>
4554 </dd>
4555 <dd>
4556 <p>will cause the relevant smb/tar/rsync backup/restore commands to be
4557 directed to realHostName, not the client name.</p>
4558 </dd>
4559 <dd>
4560 <p>Note: this setting doesn't work for hosts with DHCP set to 1.</p>
4561 </dd>
4562 <p></p>
4563 <dt><strong><a name="item_%24conf%7bperlmoduleload%7d">$Conf{PerlModuleLoad} = undef;</a></strong><br />
4564 </dt>
4565 <dd>
4566 Advanced option for asking BackupPC to load additional perl modules.
4567 Can be a list (array ref) of module names to load at startup.
4568 </dd>
4569 <p></p></dl>
4570 <p>
4571 </p>
4572 <h2><a name="email_reminders__status_and_messages">Email reminders, status and messages</a></h2>
4573 <dl>
4574 <dt><strong><a name="item_%24conf%7bsendmailpath%7d">$Conf{SendmailPath} = '/usr/sbin/sendmail';</a></strong><br />
4575 </dt>
4576 <dd>
4577 Full path to the sendmail command. Security caution: normal users
4578 should not allowed to write to this file or directory.
4579 </dd>
4580 <p></p>
4581 <dt><strong><a name="item_%24conf%7bemailnotifymindays%7d">$Conf{EMailNotifyMinDays} = 2.5;</a></strong><br />
4582 </dt>
4583 <dd>
4584 Minimum period between consecutive emails to a single user.
4585 This tries to keep annoying email to users to a reasonable
4586 level. Email checks are done nightly, so this number is effectively
4587 rounded up (ie: 2.5 means a user will never receive email more
4588 than once every 3 days).
4589 </dd>
4590 <p></p>
4591 <dt><strong><a name="item_%24conf%7bemailfromusername%7d">$Conf{EMailFromUserName} = '';</a></strong><br />
4592 </dt>
4593 <dd>
4594 Name to use as the ``from'' name for email. Depending upon your mail
4595 handler this is either a plain name (eg: ``admin'') or a fully-qualified
4596 name (eg: <a href="mailto:``admin@mydomain.com'').">``admin@mydomain.com'').</a>
4597 </dd>
4598 <p></p>
4599 <dt><strong><a name="item_%24conf%7bemailadminusername%7d">$Conf{EMailAdminUserName} = '';</a></strong><br />
4600 </dt>
4601 <dd>
4602 Destination address to an administrative user who will receive a
4603 nightly email with warnings and errors. If there are no warnings
4604 or errors then no email will be sent. Depending upon your mail
4605 handler this is either a plain name (eg: ``admin'') or a fully-qualified
4606 name (eg: <a href="mailto:``admin@mydomain.com'').">``admin@mydomain.com'').</a>
4607 </dd>
4608 <p></p>
4609 <dt><strong><a name="item_%24conf%7bemailuserdestdomain%7d">$Conf{EMailUserDestDomain} = '';</a></strong><br />
4610 </dt>
4611 <dd>
4612 Destination domain name for email sent to users. By default
4613 this is empty, meaning email is sent to plain, unqualified
4614 addresses. Otherwise, set it to the destintation domain, eg:
4615 </dd>
4616 <dd>
4617 <pre>
4618 $Cong{EMailUserDestDomain} = '@mydomain.com';</pre>
4619 </dd>
4620 <dd>
4621 <p>With this setting user email will be set to <a href="mailto:'user@mydomain.com'.">'user@mydomain.com'.</a></p>
4622 </dd>
4623 <p></p>
4624 <dt><strong><a name="item_%24conf%7bemailnobackupeversubj%7d">$Conf{EMailNoBackupEverSubj} = undef;</a></strong><br />
4625 </dt>
4626 <dt><strong><a name="item_%24conf%7bemailnobackupevermesg%7d">$Conf{EMailNoBackupEverMesg} = undef;</a></strong><br />
4627 </dt>
4628 <dd>
4629 This subject and message is sent to a user if their PC has never been
4630 backed up.
4631 </dd>
4632 <dd>
4633 <p>These values are language-dependent. The default versions can be
4634 found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
4635 need to change the message, copy it here and edit it, eg:</p>
4636 </dd>
4637 <dd>
4638 <pre>
4639 <a href="#item_%24conf%7bemailnobackupevermesg%7d">$Conf{EMailNoBackupEverMesg}</A> = &lt;&lt;'EOF';
4640 To: $user$domain
4641 cc:
4642 Subject: $subj
4643 $headers
4644 Dear $userName,</pre>
4645 </dd>
4646 <dd>
4647 <pre>
4648 This is a site-specific email message.
4649 EOF</pre>
4650 </dd>
4651 <p></p>
4652 <dt><strong><a name="item_%24conf%7bemailnotifyoldbackupdays%7d">$Conf{EMailNotifyOldBackupDays} = 7.0;</a></strong><br />
4653 </dt>
4654 <dd>
4655 How old the most recent backup has to be before notifying user.
4656 When there have been no backups in this number of days the user
4657 is sent an email.
4658 </dd>
4659 <p></p>
4660 <dt><strong><a name="item_%24conf%7bemailnobackuprecentsubj%7d">$Conf{EMailNoBackupRecentSubj} = undef;</a></strong><br />
4661 </dt>
4662 <dt><strong><a name="item_%24conf%7bemailnobackuprecentmesg%7d">$Conf{EMailNoBackupRecentMesg} = undef;</a></strong><br />
4663 </dt>
4664 <dd>
4665 This subject and message is sent to a user if their PC has not recently
4666 been backed up (ie: more than <a href="#item_%24conf%7bemailnotifyoldbackupdays%7d">$Conf{EMailNotifyOldBackupDays}</A> days ago).
4667 </dd>
4668 <dd>
4669 <p>These values are language-dependent. The default versions can be
4670 found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
4671 need to change the message, copy it here and edit it, eg:</p>
4672 </dd>
4673 <dd>
4674 <pre>
4675 <a href="#item_%24conf%7bemailnobackuprecentmesg%7d">$Conf{EMailNoBackupRecentMesg}</A> = &lt;&lt;'EOF';
4676 To: $user$domain
4677 cc:
4678 Subject: $subj
4679 $headers
4680 Dear $userName,</pre>
4681 </dd>
4682 <dd>
4683 <pre>
4684 This is a site-specific email message.
4685 EOF</pre>
4686 </dd>
4687 <p></p>
4688 <dt><strong><a name="item_%24conf%7bemailnotifyoldoutlookdays%7d">$Conf{EMailNotifyOldOutlookDays} = 5.0;</a></strong><br />
4689 </dt>
4690 <dd>
4691 How old the most recent backup of Outlook files has to be before
4692 notifying user.
4693 </dd>
4694 <p></p>
4695 <dt><strong><a name="item_%24conf%7bemailoutlookbackupsubj%7d">$Conf{EMailOutlookBackupSubj} = undef;</a></strong><br />
4696 </dt>
4697 <dt><strong><a name="item_%24conf%7bemailoutlookbackupmesg%7d">$Conf{EMailOutlookBackupMesg} = undef;</a></strong><br />
4698 </dt>
4699 <dd>
4700 This subject and message is sent to a user if their Outlook files have
4701 not recently been backed up (ie: more than <a href="#item_%24conf%7bemailnotifyoldoutlookdays%7d">$Conf{EMailNotifyOldOutlookDays}</A>
4702 days ago).
4703 </dd>
4704 <dd>
4705 <p>These values are language-dependent. The default versions can be
4706 found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
4707 need to change the message, copy it here and edit it, eg:</p>
4708 </dd>
4709 <dd>
4710 <pre>
4711 <a href="#item_%24conf%7bemailoutlookbackupmesg%7d">$Conf{EMailOutlookBackupMesg}</A> = &lt;&lt;'EOF';
4712 To: $user$domain
4713 cc:
4714 Subject: $subj
4715 $headers
4716 Dear $userName,</pre>
4717 </dd>
4718 <dd>
4719 <pre>
4720 This is a site-specific email message.
4721 EOF</pre>
4722 </dd>
4723 <p></p></dl>
4724 <p>
4725 </p>
4726 <h2><a name="cgi_user_interface_configuration_settings">CGI user interface configuration settings</a></h2>
4727 <dl>
4728 <dt><strong><a name="item_%24conf%7bcgiadminusergroup%7d">$Conf{CgiAdminUserGroup} = '';</a></strong><br />
4729 </dt>
4730 <dt><strong><a name="item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers} = '';</a></strong><br />
4731 </dt>
4732 <dd>
4733 Normal users can only access information specific to their host.
4734 They can start/stop/browse/restore backups.
4735 </dd>
4736 <dd>
4737 <p>Administrative users have full access to all hosts, plus overall
4738 status and log information.</p>
4739 </dd>
4740 <dd>
4741 <p>The administrative users are the union of the unix/linux group
4742 <a href="#item_%24conf%7bcgiadminusergroup%7d">$Conf{CgiAdminUserGroup}</A> and the manual list of users, separated
4743 by spaces, in <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A>. If you don't want a group or
4744 manual list of users set the corresponding configuration setting
4745 to undef or an empty string.</p>
4746 </dd>
4747 <dd>
4748 <p>If you want every user to have admin privileges (careful!), set
4749 <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A> = '*'.</p>
4750 </dd>
4751 <dd>
4752 <p>Examples:</p>
4753 </dd>
4754 <dd>
4755 <pre>
4756 <a href="#item_%24conf%7bcgiadminusergroup%7d">$Conf{CgiAdminUserGroup}</A> = 'admin';
4757 <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A> = 'craig celia';
4758 --&gt; administrative users are the union of group admin, plus
4759 craig and celia.</pre>
4760 </dd>
4761 <dd>
4762 <pre>
4763 <a href="#item_%24conf%7bcgiadminusergroup%7d">$Conf{CgiAdminUserGroup}</A> = '';
4764 <a href="#item_%24conf%7bcgiadminusers%7d">$Conf{CgiAdminUsers}</A> = 'craig celia';
4765 --&gt; administrative users are only craig and celia'.</pre>
4766 </dd>
4767 <p></p>
4768 <dt><strong><a name="item_%24conf%7bcgiurl%7d">$Conf{CgiURL} = undef;</a></strong><br />
4769 </dt>
4770 <dd>
4771 URL of the BackupPC_Admin CGI script. Used for email messages.
4772 </dd>
4773 <p></p>
4774 <dt><strong><a name="item_%24conf%7blanguage%7d">$Conf{Language} = 'en';</a></strong><br />
4775 </dt>
4776 <dd>
4777 Language to use. See lib/BackupPC/Lang for the list of supported
4778 languages, which include English (en), French (fr), Spanish (es),
4779 German (de), Italian (it) and Dutch (nl).
4780 </dd>
4781 <dd>
4782 <p>Currently the Language setting applies to the CGI interface and email
4783 messages sent to users. Log files and other text are still in English.</p>
4784 </dd>
4785 <p></p>
4786 <dt><strong><a name="item_%24conf%7bcgiuserhomepagecheck%7d">$Conf{CgiUserHomePageCheck} = '';</a></strong><br />
4787 </dt>
4788 <dt><strong><a name="item_%24conf%7bcgiuserurlcreate%7d">$Conf{CgiUserUrlCreate} = 'mailto:%s';</a></strong><br />
4789 </dt>
4790 <dd>
4791 User names that are rendered by the CGI interface can be turned
4792 into links into their home page or other information about the
4793 user. To set this up you need to create two <code>sprintf()</code> strings,
4794 that each contain a single '%s' that will be replaced by the user
4795 name. The default is a mailto: link.
4796 </dd>
4797 <dd>
4798 <p><a href="#item_%24conf%7bcgiuserhomepagecheck%7d">$Conf{CgiUserHomePageCheck}</A> should be an absolute file path that
4799 is used to check (via ``-f'') that the user has a valid home page.
4800 Set this to undef or an empty string to turn off this check.</p>
4801 </dd>
4802 <dd>
4803 <p><a href="#item_%24conf%7bcgiuserurlcreate%7d">$Conf{CgiUserUrlCreate}</A> should be a full URL that points to the
4804 user's home page. Set this to undef or an empty string to turn
4805 off generation of URLs for user names.</p>
4806 </dd>
4807 <dd>
4808 <p>Example:</p>
4809 </dd>
4810 <dd>
4811 <pre>
4812 <a href="#item_%24conf%7bcgiuserhomepagecheck%7d">$Conf{CgiUserHomePageCheck}</A> = '/var/www/html/users/%s.html';
4813 <a href="#item_%24conf%7bcgiuserurlcreate%7d">$Conf{CgiUserUrlCreate}</A> = '<a href="http://myhost/users/%s.html">http://myhost/users/%s.html</a>';
4814 --&gt; if /var/www/html/users/craig.html exists, then 'craig' will
4815 be rendered as a link to <a href="http://myhost/users/craig.html">http://myhost/users/craig.html</a>.</pre>
4816 </dd>
4817 <p></p>
4818 <dt><strong><a name="item_%24conf%7bcgidateformatmmdd%7d">$Conf{CgiDateFormatMMDD} = 1;</a></strong><br />
4819 </dt>
4820 <dd>
4821 Date display format for CGI interface. True for US-style dates (MM/DD)
4822 and zero for international dates (DD/MM).
4823 </dd>
4824 <p></p>
4825 <dt><strong><a name="item_%24conf%7bcginavbaradminallhosts%7d">$Conf{CgiNavBarAdminAllHosts} = 1;</a></strong><br />
4826 </dt>
4827 <dd>
4828 If set, the complete list of hosts appears in the left navigation
4829 bar pull-down for administrators. Otherwise, just the hosts for which
4830 the user is listed in the host file (as either the user or in moreUsers)
4831 are displayed.
4832 </dd>
4833 <p></p>
4834 <dt><strong><a name="item_%24conf%7bcgisearchboxenable%7d">$Conf{CgiSearchBoxEnable} = 1;</a></strong><br />
4835 </dt>
4836 <dd>
4837 Enable/disable the search box in the navigation bar.
4838 </dd>
4839 <p></p>
4840 <dt><strong><a name="item_%24conf%7bcginavbarlinks%7d">$Conf{CgiNavBarLinks} = [ ... ];</a></strong><br />
4841 </dt>
4842 <dd>
4843 Additional navigation bar links. These appear for both regular users
4844 and administrators. This is a list of hashes giving the link (URL)
4845 and the text (name) for the link. Specifying lname instead of name
4846 uses the language specific string (ie: $Lang-&gt;{lname}) instead of
4847 just literally displaying name.
4848 </dd>
4849 <p></p>
4850 <dt><strong><a name="item_%24conf%7bcgistatushilightcolor%7d">$Conf{CgiStatusHilightColor} = { ...</a></strong><br />
4851 </dt>
4852 <dd>
4853 Hilight colors based on status that are used in the PC summary page.
4854 </dd>
4855 <p></p>
4856 <dt><strong><a name="item_%24conf%7bcgiheaders%7d">$Conf{CgiHeaders} = '&lt;meta http-equiv=``pragma'' content=``no-cache''&gt;';</a></strong><br />
4857 </dt>
4858 <dd>
4859 Additional CGI header text.
4860 </dd>
4861 <p></p>
4862 <dt><strong><a name="item_%24conf%7bcgiimagedir%7d">$Conf{CgiImageDir} = '';</a></strong><br />
4863 </dt>
4864 <dd>
4865 Directory where images are stored. This directory should be below
4866 Apache's DocumentRoot. This value isn't used by BackupPC but is
4867 used by configure.pl when you upgrade BackupPC.
4868 </dd>
4869 <dd>
4870 <p>Example:</p>
4871 </dd>
4872 <dd>
4873 <pre>
4874 <a href="#item_%24conf%7bcgiimagedir%7d">$Conf{CgiImageDir}</A> = '/usr/local/apache/htdocs/BackupPC';</pre>
4875 </dd>
4876 <p></p>
4877 <dt><strong><a name="item_%24conf%7bcgiext2contenttype%7d">$Conf{CgiExt2ContentType} = { };</a></strong><br />
4878 </dt>
4879 <dd>
4880 Additional mappings of file name extenions to Content-Type for
4881 individual file restore. See $Ext2ContentType in BackupPC_Admin
4882 for the default setting. You can add additional settings here,
4883 or override any default settings. Example:
4884 </dd>
4885 <dd>
4886 <pre>
4887 <a href="#item_%24conf%7bcgiext2contenttype%7d">$Conf{CgiExt2ContentType}</A> = {
4888 'pl' =&gt; 'text/plain',
4889 };</pre>
4890 </dd>
4891 <p></p>
4892 <dt><strong><a name="item_%24conf%7bcgiimagedirurl%7d">$Conf{CgiImageDirURL} = '';</a></strong><br />
4893 </dt>
4894 <dd>
4895 URL (without the leading <a href="http://host)">http://host)</a> for BackupPC's image directory.
4896 The CGI script uses this value to serve up image files.
4897 </dd>
4898 <dd>
4899 <p>Example:</p>
4900 </dd>
4901 <dd>
4902 <pre>
4903 <a href="#item_%24conf%7bcgiimagedirurl%7d">$Conf{CgiImageDirURL}</A> = '/BackupPC';</pre>
4904 </dd>
4905 <p></p>
4906 <dt><strong><a name="item_%24conf%7bcgicssfile%7d">$Conf{CgiCSSFile} = 'BackupPC_stnd.css';</a></strong><br />
4907 </dt>
4908 <dd>
4909 CSS stylesheet for the CGI interface. It is stored in the
4910 <a href="#item_%24conf%7bcgiimagedir%7d">$Conf{CgiImageDir}</A> directory and accessed via the
4911 <a href="#item_%24conf%7bcgiimagedirurl%7d">$Conf{CgiImageDirURL}</A> URL.
4912 </dd>
4913 <p></p></dl>
4914 <p>
4915 <a href="#__index__"><small>Back to Top</small></a>
4916 </p>
4917 <hr />
4918 <h1><a name="version_numbers">Version Numbers</a></h1>
4919 <p>Starting with v1.4.0 BackupPC uses a X.Y.Z version numbering system,
4920 instead of X.0Y. The first digit is for major new releases, the middle
4921 digit is for significant feature releases and improvements (most of
4922 the releases have been in this category), and the last digit is for
4923 bug fixes. You should think of the old 1.00, 1.01, 1.02 and 1.03 as
4924 1..0, 1.1.0, 1.2.0 and 1.3.0.</p>
4925 <p>Additionally, patches might be made available. A patched version
4926 number is of the form X.Y.ZplN (eg: 2.1.0pl2), where N is the
4927 patch level.</p>
4928 <p>
4929 <a href="#__index__"><small>Back to Top</small></a>
4930 </p>
4931 <hr />
4932 <h1><a name="author">Author</a></h1>
4933 <p>Craig Barratt &lt;<a href="mailto:cbarratt@users.sourceforge.net">cbarratt@users.sourceforge.net</a>&gt;</p>
4934 <p>See <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>.</p>
4935 <p>
4936 <a href="#__index__"><small>Back to Top</small></a>
4937 </p>
4938 <hr />
4939 <h1><a name="copyright">Copyright</a></h1>
4940 <p>Copyright (C) 2001-2005 Craig Barratt</p>
4941 <p>
4942 <a href="#__index__"><small>Back to Top</small></a>
4943 </p>
4944 <hr />
4945 <h1><a name="credits">Credits</a></h1>
4946 <p>Ryan Kucera contributed the directory navigation code and images
4947 for v1.5.0. He contributed the first skeleton of BackupPC_restore.
4948 He also added a significant revision to the CGI interface, including
4949 CSS tags, in v2.1.0, and designed the BackupPC logo.</p>
4950 <p>Xavier Nicollet, with additions from Guillaume Filion, added the
4951 internationalization (i18n) support to the CGI interface for v2.0.0.
4952 Xavier provided the French translation fr.pm, with additions from
4953 Guillaume.</p>
4954 <p>Guillaume Filion wrote BackupPC_zipCreate and added the CGI support
4955 for zip download, in addition to some CGI cleanup, for v1.5.0.
4956 Guillaume continues to support fr.pm updates for each new version.</p>
4957 <p>Josh Marshall implemented the Archive feature in v2.1.0.</p>
4958 <p>Ludovic Drolez supports the BackupPC Debian package.</p>
4959 <p>Javier Gonzalez provided the Spanish translation, es.pm for v2.0.0.</p>
4960 <p>Manfred Herrmann provided the German translation, de.pm for v2.0.0.
4961 Manfred continues to support de.pm updates for each new version,
4962 together with some help frmo Ralph Paßgang.</p>
4963 <p>Lorenzo Cappelletti provided the Italian translation, it.pm for v2.1.0.</p>
4964 <p>Lieven Bridts provided the Dutch translation, nl.pm, for v2.1.0,
4965 with some tweaks from Guus Houtzager.</p>
4966 <p>Many people have reported bugs, made useful suggestions and helped
4967 with testing; see the ChangeLog and the mail lists.</p>
4968 <p>Your name could appear here in the next version!</p>
4969 <p>
4970 <a href="#__index__"><small>Back to Top</small></a>
4971 </p>
4972 <hr />
4973 <h1><a name="license">License</a></h1>
4974 <p>This program is free software; you can redistribute it and/or modify it
4975 under the terms of the GNU General Public License as published by the
4976 Free Software Foundation; either version 2 of the License, or (at your
4977 option) any later version.</p>
4978 <p>This program is distributed in the hope that it will be useful,
4979 but WITHOUT ANY WARRANTY; without even the implied warranty of
4980 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4981 General Public License for more details.</p>
4982 <p>You should have received a copy of the GNU General Public License in the
4983 LICENSE file along with this program; if not, write to the Free Software
4984 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.</p>
4985 <p><a href="#__index__"><small>Back to Top</small></a></p>
4986 <table border="0" width="100%" cellspacing="0" cellpadding="3">
4987 <tr><td class="block" style="background-color: #cccccc" valign="middle">
4988 <big><strong><span class="block">&nbsp;BackupPC</span></strong></big>
4989 </td></tr>
4990 </table>
4991
4992 </body>
4993
4994 </html>

  ViewVC Help
Powered by ViewVC 1.1.26