Merge lp:~louis/ubuntu/trusty/backuppc/backuppc-merge into lp:ubuntu/trusty/backuppc
- Trusty (14.04)
- backuppc-merge
- Merge into trusty
Status: | Needs review |
---|---|
Proposed branch: | lp:~louis/ubuntu/trusty/backuppc/backuppc-merge |
Merge into: | lp:ubuntu/trusty/backuppc |
Diff against target: |
15395 lines (+8182/-4378) 96 files modified
ChangeLog (+67/-1) README (+7/-7) bin/BackupPC (+2/-2) bin/BackupPC_archive (+2/-2) bin/BackupPC_archiveHost (+3/-3) bin/BackupPC_archiveStart (+2/-2) bin/BackupPC_attribPrint (+2/-2) bin/BackupPC_dump (+3/-3) bin/BackupPC_fixupBackupSummary (+2/-2) bin/BackupPC_link (+2/-2) bin/BackupPC_nightly (+2/-2) bin/BackupPC_restore (+2/-2) bin/BackupPC_sendEmail (+3/-4) bin/BackupPC_serverMesg (+2/-2) bin/BackupPC_tarCreate (+2/-2) bin/BackupPC_tarExtract (+2/-2) bin/BackupPC_tarPCCopy (+2/-2) bin/BackupPC_trashClean (+2/-2) bin/BackupPC_zcat (+2/-2) bin/BackupPC_zipCreate (+13/-5) cgi-bin/BackupPC_Admin (+2/-2) conf/BackupPC_stnd.css (+2/-2) conf/BackupPC_stnd_orig.css (+2/-2) conf/config.pl (+8/-5) conf/hosts (+1/-1) configure.pl (+8/-5) debian/README.Debian (+10/-0) debian/backuppc.default (+2/-0) debian/backuppc.init (+3/-0) debian/backuppc.templates (+1/-1) debian/changelog (+50/-0) debian/patches/config.pl.diff (+0/-27) debian/postinst (+16/-3) debian/postrm (+11/-2) debian/rules (+2/-0) doc/BackupPC.html (+3114/-4060) doc/BackupPC.pod (+35/-25) init.d/src/debian-backuppc (+1/-1) init.d/src/gentoo-backuppc (+1/-1) init.d/src/linux-backuppc (+1/-1) init.d/src/slackware-backuppc (+1/-1) init.d/src/solaris-backuppc (+1/-1) init.d/src/suse-backuppc (+1/-1) lib/BackupPC/Attrib.pm (+2/-2) lib/BackupPC/CGI/AdminOptions.pm (+2/-2) lib/BackupPC/CGI/Archive.pm (+2/-2) lib/BackupPC/CGI/ArchiveInfo.pm (+2/-2) lib/BackupPC/CGI/Browse.pm (+32/-8) lib/BackupPC/CGI/DirHistory.pm (+28/-7) lib/BackupPC/CGI/EditConfig.pm (+2/-2) lib/BackupPC/CGI/EmailSummary.pm (+2/-2) lib/BackupPC/CGI/GeneralInfo.pm (+2/-2) lib/BackupPC/CGI/HostInfo.pm (+7/-4) lib/BackupPC/CGI/LOGlist.pm (+2/-2) lib/BackupPC/CGI/Lib.pm (+22/-5) lib/BackupPC/CGI/Queue.pm (+2/-2) lib/BackupPC/CGI/RSS.pm (+4/-3) lib/BackupPC/CGI/ReloadServer.pm (+2/-2) lib/BackupPC/CGI/Restore.pm (+30/-4) lib/BackupPC/CGI/RestoreFile.pm (+12/-3) lib/BackupPC/CGI/RestoreInfo.pm (+2/-2) lib/BackupPC/CGI/StartServer.pm (+2/-2) lib/BackupPC/CGI/StartStopBackup.pm (+2/-2) lib/BackupPC/CGI/StopServer.pm (+2/-2) lib/BackupPC/CGI/Summary.pm (+2/-2) lib/BackupPC/CGI/View.pm (+5/-5) lib/BackupPC/Config/Meta.pm (+3/-3) lib/BackupPC/FileZIO.pm (+2/-2) lib/BackupPC/Lang/cz.pm (+13/-7) lib/BackupPC/Lang/de.pm (+13/-7) lib/BackupPC/Lang/en.pm (+13/-7) lib/BackupPC/Lang/es.pm (+13/-7) lib/BackupPC/Lang/fr.pm (+13/-7) lib/BackupPC/Lang/it.pm (+13/-7) lib/BackupPC/Lang/ja.pm (+1462/-0) lib/BackupPC/Lang/nl.pm (+13/-7) lib/BackupPC/Lang/pl.pm (+13/-7) lib/BackupPC/Lang/pt_br.pm (+13/-7) lib/BackupPC/Lang/ru.pm (+1480/-0) lib/BackupPC/Lang/uk.pm (+1479/-0) lib/BackupPC/Lang/zh_CN.pm (+13/-7) lib/BackupPC/Lib.pm (+31/-14) lib/BackupPC/PoolWrite.pm (+2/-2) lib/BackupPC/Storage.pm (+2/-2) lib/BackupPC/Storage/Text.pm (+3/-3) lib/BackupPC/View.pm (+2/-2) lib/BackupPC/Xfer.pm (+2/-2) lib/BackupPC/Xfer/Archive.pm (+2/-2) lib/BackupPC/Xfer/Ftp.pm (+1/-1) lib/BackupPC/Xfer/Protocol.pm (+2/-2) lib/BackupPC/Xfer/Rsync.pm (+2/-2) lib/BackupPC/Xfer/RsyncDigest.pm (+2/-2) lib/BackupPC/Xfer/RsyncFileIO.pm (+2/-2) lib/BackupPC/Xfer/Smb.pm (+2/-2) lib/BackupPC/Xfer/Tar.pm (+2/-2) lib/BackupPC/Zip/FileMember.pm (+2/-2) |
To merge this branch: | bzr merge lp:~louis/ubuntu/trusty/backuppc/backuppc-merge |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris J Arges | Approve | ||
Dimitri John Ledkov | Pending | ||
Review via email: mp+200536@code.launchpad.net |
Commit message
Description of the change
- Merged upstream debian
- Edited debian/
- Fixed double entry in debian/control Depends:
- fixed doc/BackupPC.pod according to previous version
Unmerged revisions
- 41. By Louis Bouchard
-
* Merge from Debian unstable. Remaining changes:
- debian/backuppc. init, debian/rules, debian/postinst: Do not call init
script on shutdown and reboot (TearDown) (Debian #488660).
- debian/control:
+ Remove estraneous libtime-modules- perl (Debian #734356).
+ Depend on default-mta | mail-transport-agent, instead of enumerating a
long list of alternative MTAs.
* New upstream release. Closes: #716824
* Fix Typo in kill signal name (ALRM vs ARLM). Closes: #698441
* Enable Apache2 (2.4) configuration by default. Closes: #718550 #710956
* Non-maintainer upload.
* Patch BackupPC.pod for POD errors with Perl 5.18
pod2man has become more strict with perl 5.18. The applied patch
converts the non-7-bit clean character into UTF-8 and declares the
file's encoding as such.
Thanks to Dominic Hargreaves <email address hidden> (Closes: #719827)
* Non-maintainer upload.
* Do not ship /etc/backuppc/config. pl as a conffile; it is handled
by ucf already (Closes: #706315)
* Added libtime-modules- perl dependency. Closes: #525395
* Remove /var/lib/backuppc/ pc/localhost if it's empty
Closes: #672372
* Added stuff to support Apache 2.4. Closes: #669765
* Added NICE support in /etc/default/backuppc. Closes: #639102
* Changed the default display date format. Closes: #663975
Preview Diff
1 | === modified file 'ChangeLog' (properties changed: +x to -x) | |||
2 | --- ChangeLog 2011-09-19 00:55:51 +0000 | |||
3 | +++ ChangeLog 2014-01-06 14:04:46 +0000 | |||
4 | @@ -11,13 +11,79 @@ | |||
5 | 11 | # | 11 | # |
6 | 12 | #======================================================================== | 12 | #======================================================================== |
7 | 13 | # | 13 | # |
9 | 14 | # Version 3.2.1, released 24 Apr 2011. | 14 | # Version 3.3.0, released 14 Apr 2013. |
10 | 15 | # | 15 | # |
11 | 16 | # See http://backuppc.sourceforge.net. | 16 | # See http://backuppc.sourceforge.net. |
12 | 17 | # | 17 | # |
13 | 18 | #======================================================================== | 18 | #======================================================================== |
14 | 19 | 19 | ||
15 | 20 | #------------------------------------------------------------------------ | 20 | #------------------------------------------------------------------------ |
16 | 21 | # Version 3.3.0, 14 Apr 2013 | ||
17 | 22 | #------------------------------------------------------------------------ | ||
18 | 23 | |||
19 | 24 | * Changed restore file name from restore.{zip|tar} to restore_$host_YYYY-MM-DD.{zip|tar}, | ||
20 | 25 | where the date is the start date of the backup. Originally suggested by Brad Alexander, | ||
21 | 26 | with a healthy debate among Les, Holger, Jeffrey, Adam, Carl and others. | ||
22 | 27 | |||
23 | 28 | * Changed the timeStamp2 function in lib/BackupPC/CGI/Lib.pm so that times more than 330 | ||
24 | 29 | days ago also include the year. More recent times continue to use just the day of month | ||
25 | 30 | and month. | ||
26 | 31 | |||
27 | 32 | * Made the directory path display (when browsing backups or history) a sequence of links, | ||
28 | 33 | allowing any parent directory to be quick selected. | ||
29 | 34 | |||
30 | 35 | * Added Japanese language file lib/BackupPC/Lang/ja.pm submitted by Rikiya | ||
31 | 36 | Yamamoto. | ||
32 | 37 | |||
33 | 38 | * Added Ukrainian language file lib/BackupPC/Lang/uk.pm submitted by Serhiy Yakimchuck. | ||
34 | 39 | |||
35 | 40 | * Added Russian language file lib/BackupPC/Lang/ru.pm submitted by Sergei Butakov. | ||
36 | 41 | |||
37 | 42 | * Patch from Alexander Moisseev that fixed file name encodings in zip files. | ||
38 | 43 | The default charset is now utf8. Added a menu option to override the codepage. | ||
39 | 44 | |||
40 | 45 | * Removed -N option from smbclient command in conf/config.pl to remain compatible | ||
41 | 46 | with more recent versions (3.2.3 and later) of smbclient. Reported and discussed | ||
42 | 47 | by various people on the mail list, most recently by Jeff Boyce, Les Mikesell and | ||
43 | 48 | Holger Parplies. Alexander Moisseev also submitted a patch. | ||
44 | 49 | |||
45 | 50 | Using smbclient >= 3.2.3 with the -N option will give a "tree connect failed: | ||
46 | 51 | NT_STATUS_ACCESS_DENIED" error. | ||
47 | 52 | |||
48 | 53 | * Reapplied a patch from Tyler Wagner for lib/BackupPC/CGI/HostInfo.pl so that | ||
49 | 54 | empty email status info doesn't appear. Somehow this missed 3.2.1. | ||
50 | 55 | |||
51 | 56 | * Fixed check on $parfile in bin/BackupPC_archiveHost since it is numeric. | ||
52 | 57 | Fix submitted by Tim Massey. | ||
53 | 58 | |||
54 | 59 | * Ensure $num is numeric in lib/BackupPC/CGI/View.pm error message | ||
55 | 60 | to avoid XSS attack. Report and patch by Jamie Strandboge. | ||
56 | 61 | |||
57 | 62 | * Ensure $num and $share in lib/BackupPC/CGI/RestoreFile.pm error messages | ||
58 | 63 | are escaped, to avoid XSS vulnerability. Report and patch by Jamie Strandboge. | ||
59 | 64 | Also added some additional error checking and tweaked the handling of the | ||
60 | 65 | invalid number error message. | ||
61 | 66 | |||
62 | 67 | * Fixed qw(...) deprecated syntax warnings in lib/BackupPC/Storage/Text.pm | ||
63 | 68 | and lib/BackupPC/Lib.pm. Patch supplied by Juergen Harms. Also got a | ||
64 | 69 | patch from Alexander Moisseev and report from Richard Shaw. | ||
65 | 70 | |||
66 | 71 | * Fixed error in bin/BackupPC_sendEmail that caused accumulation of | ||
67 | 72 | per-host errors in the admin email to be skipped if a host's user | ||
68 | 73 | is not defined. Reported by Marco Dalla Via. | ||
69 | 74 | |||
70 | 75 | * Fixed lib/BackupPC/CGI/RSS.pm so that the base_url is correct for https. | ||
71 | 76 | Report and fix by Samuel Monsarrat. | ||
72 | 77 | |||
73 | 78 | * Added more careful checking that IO::Dirent returns valid inodes and file types. | ||
74 | 79 | Suggested by Daniel Harvey. | ||
75 | 80 | |||
76 | 81 | * Removed redundant setting of $Lang{CfgEdit_Title_Other} from all the Lang files. | ||
77 | 82 | |||
78 | 83 | * Applied couple of fixes to Lib.pm suggested by Jeffrey Kosowsky for special case of where | ||
79 | 84 | configuration commands are fragments of perl code. | ||
80 | 85 | |||
81 | 86 | #------------------------------------------------------------------------ | ||
82 | 21 | # Version 3.2.1, 24 Apr 2011 | 87 | # Version 3.2.1, 24 Apr 2011 |
83 | 22 | #------------------------------------------------------------------------ | 88 | #------------------------------------------------------------------------ |
84 | 23 | 89 | ||
85 | 24 | 90 | ||
86 | === modified file 'LICENSE' (properties changed: +x to -x) | |||
87 | === modified file 'README' (properties changed: +x to -x) | |||
88 | --- README 2011-09-19 00:55:51 +0000 | |||
89 | +++ README 2014-01-06 14:04:46 +0000 | |||
90 | @@ -1,11 +1,11 @@ | |||
91 | 1 | 1 | ||
92 | 2 | BackupPC | 2 | BackupPC |
93 | 3 | 3 | ||
99 | 4 | Version 3.2.1 | 4 | Version 3.3.0 |
100 | 5 | 5 | ||
101 | 6 | 24 Apr 2011 | 6 | 14 Apr 2013 |
102 | 7 | 7 | ||
103 | 8 | Copyright (C) 2001-2010 Craig Barratt. All rights reserved. | 8 | Copyright (C) 2001-2013 Craig Barratt. All rights reserved. |
104 | 9 | 9 | ||
105 | 10 | This program is free software; you can redistribute it and/or | 10 | This program is free software; you can redistribute it and/or |
106 | 11 | modify it under the terms of the GNU General Public License. | 11 | modify it under the terms of the GNU General Public License. |
107 | @@ -28,8 +28,8 @@ | |||
108 | 28 | 28 | ||
109 | 29 | To install BackupPC run these commands as root: | 29 | To install BackupPC run these commands as root: |
110 | 30 | 30 | ||
113 | 31 | tar zxf BackupPC-3.2.1.tar.gz | 31 | tar zxf BackupPC-3.3.0.tar.gz |
114 | 32 | cd BackupPC-3.2.1 | 32 | cd BackupPC-3.3.0 |
115 | 33 | perl configure.pl | 33 | perl configure.pl |
116 | 34 | 34 | ||
117 | 35 | This will automatically determine some system information and prompt you | 35 | This will automatically determine some system information and prompt you |
118 | 36 | 36 | ||
119 | === modified file 'bin/BackupPC' | |||
120 | --- bin/BackupPC 2011-09-19 00:55:51 +0000 | |||
121 | +++ bin/BackupPC 2014-01-06 14:04:46 +0000 | |||
122 | @@ -29,7 +29,7 @@ | |||
123 | 29 | # Craig Barratt <cbarratt@users.sourceforge.net> | 29 | # Craig Barratt <cbarratt@users.sourceforge.net> |
124 | 30 | # | 30 | # |
125 | 31 | # COPYRIGHT | 31 | # COPYRIGHT |
127 | 32 | # Copyright (C) 2001-2009 Craig Barratt | 32 | # Copyright (C) 2001-2013 Craig Barratt |
128 | 33 | # | 33 | # |
129 | 34 | # This program is free software; you can redistribute it and/or modify | 34 | # This program is free software; you can redistribute it and/or modify |
130 | 35 | # it under the terms of the GNU General Public License as published by | 35 | # it under the terms of the GNU General Public License as published by |
131 | @@ -47,7 +47,7 @@ | |||
132 | 47 | # | 47 | # |
133 | 48 | #======================================================================== | 48 | #======================================================================== |
134 | 49 | # | 49 | # |
136 | 50 | # Version 3.2.1, released 24 Apr 2011. | 50 | # Version 3.3.0, released 14 Apr 2013. |
137 | 51 | # | 51 | # |
138 | 52 | # See http://backuppc.sourceforge.net. | 52 | # See http://backuppc.sourceforge.net. |
139 | 53 | # | 53 | # |
140 | 54 | 54 | ||
141 | === modified file 'bin/BackupPC_archive' | |||
142 | --- bin/BackupPC_archive 2011-09-19 00:55:51 +0000 | |||
143 | +++ bin/BackupPC_archive 2014-01-06 14:04:46 +0000 | |||
144 | @@ -11,7 +11,7 @@ | |||
145 | 11 | # Josh Marshall | 11 | # Josh Marshall |
146 | 12 | # | 12 | # |
147 | 13 | # COPYRIGHT | 13 | # COPYRIGHT |
149 | 14 | # Copyright (C) 2001-2009 Craig Barratt | 14 | # Copyright (C) 2001-2013 Craig Barratt |
150 | 15 | # | 15 | # |
151 | 16 | # This program is free software; you can redistribute it and/or modify | 16 | # This program is free software; you can redistribute it and/or modify |
152 | 17 | # it under the terms of the GNU General Public License as published by | 17 | # it under the terms of the GNU General Public License as published by |
153 | @@ -29,7 +29,7 @@ | |||
154 | 29 | # | 29 | # |
155 | 30 | #======================================================================== | 30 | #======================================================================== |
156 | 31 | # | 31 | # |
158 | 32 | # Version 3.2.1, released 24 Apr 2011. | 32 | # Version 3.3.0, released 14 Apr 2013. |
159 | 33 | # | 33 | # |
160 | 34 | # See http://backuppc.sourceforge.net. | 34 | # See http://backuppc.sourceforge.net. |
161 | 35 | # | 35 | # |
162 | 36 | 36 | ||
163 | === modified file 'bin/BackupPC_archiveHost' | |||
164 | --- bin/BackupPC_archiveHost 2011-09-19 00:55:51 +0000 | |||
165 | +++ bin/BackupPC_archiveHost 2014-01-06 14:04:46 +0000 | |||
166 | @@ -20,7 +20,7 @@ | |||
167 | 20 | # Josh Marshall | 20 | # Josh Marshall |
168 | 21 | # | 21 | # |
169 | 22 | # COPYRIGHT | 22 | # COPYRIGHT |
171 | 23 | # Copyright (C) 2001-2009 Craig Barratt | 23 | # Copyright (C) 2001-2013 Craig Barratt |
172 | 24 | # | 24 | # |
173 | 25 | # This program is free software; you can redistribute it and/or modify | 25 | # This program is free software; you can redistribute it and/or modify |
174 | 26 | # it under the terms of the GNU General Public License as published by | 26 | # it under the terms of the GNU General Public License as published by |
175 | @@ -38,7 +38,7 @@ | |||
176 | 38 | # | 38 | # |
177 | 39 | #======================================================================== | 39 | #======================================================================== |
178 | 40 | # | 40 | # |
180 | 41 | # Version 3.2.1, released 24 Apr 2011. | 41 | # Version 3.3.0, released 14 Apr 2013. |
181 | 42 | # | 42 | # |
182 | 43 | # See http://backuppc.sourceforge.net. | 43 | # See http://backuppc.sourceforge.net. |
183 | 44 | # | 44 | # |
184 | @@ -154,7 +154,7 @@ | |||
185 | 154 | # ie: not a tape device). | 154 | # ie: not a tape device). |
186 | 155 | # | 155 | # |
187 | 156 | if ( -d $outLoc && -x $parPath ) { | 156 | if ( -d $outLoc && -x $parPath ) { |
189 | 157 | if ( length($parfile) ) { | 157 | if ( length($parfile) && $parfile != 0 ) { |
190 | 158 | print("Running $parPath to create parity files\n"); | 158 | print("Running $parPath to create parity files\n"); |
191 | 159 | my $parCmd = "$parPath c -r$parfile $outLocE/$host.$bkupNum.tar$fileExt.par2 $outLocE/$host.$bkupNum.tar$fileExt*"; | 159 | my $parCmd = "$parPath c -r$parfile $outLocE/$host.$bkupNum.tar$fileExt.par2 $outLocE/$host.$bkupNum.tar$fileExt*"; |
192 | 160 | $ret = system($parCmd); | 160 | $ret = system($parCmd); |
193 | 161 | 161 | ||
194 | === modified file 'bin/BackupPC_archiveStart' | |||
195 | --- bin/BackupPC_archiveStart 2011-09-19 00:55:51 +0000 | |||
196 | +++ bin/BackupPC_archiveStart 2014-01-06 14:04:46 +0000 | |||
197 | @@ -17,7 +17,7 @@ | |||
198 | 17 | # Craig Barratt <cbarratt@users.sourceforge.net> | 17 | # Craig Barratt <cbarratt@users.sourceforge.net> |
199 | 18 | # | 18 | # |
200 | 19 | # COPYRIGHT | 19 | # COPYRIGHT |
202 | 20 | # Copyright (C) 2007-2009 Craig Barratt | 20 | # Copyright (C) 2007-2013 Craig Barratt |
203 | 21 | # | 21 | # |
204 | 22 | # This program is free software; you can redistribute it and/or modify | 22 | # This program is free software; you can redistribute it and/or modify |
205 | 23 | # it under the terms of the GNU General Public License as published by | 23 | # it under the terms of the GNU General Public License as published by |
206 | @@ -35,7 +35,7 @@ | |||
207 | 35 | # | 35 | # |
208 | 36 | #======================================================================== | 36 | #======================================================================== |
209 | 37 | # | 37 | # |
211 | 38 | # Version 3.2.1, released 24 Apr 2011. | 38 | # Version 3.3.0, released 14 Apr 2013. |
212 | 39 | # | 39 | # |
213 | 40 | # See http://backuppc.sourceforge.net. | 40 | # See http://backuppc.sourceforge.net. |
214 | 41 | # | 41 | # |
215 | 42 | 42 | ||
216 | === modified file 'bin/BackupPC_attribPrint' | |||
217 | --- bin/BackupPC_attribPrint 2011-09-19 00:55:51 +0000 | |||
218 | +++ bin/BackupPC_attribPrint 2014-01-06 14:04:46 +0000 | |||
219 | @@ -13,7 +13,7 @@ | |||
220 | 13 | # Craig Barratt <cbarratt@users.sourceforge.net> | 13 | # Craig Barratt <cbarratt@users.sourceforge.net> |
221 | 14 | # | 14 | # |
222 | 15 | # COPYRIGHT | 15 | # COPYRIGHT |
224 | 16 | # Copyright (C) 2005-2009 Craig Barratt | 16 | # Copyright (C) 2005-2013 Craig Barratt |
225 | 17 | # | 17 | # |
226 | 18 | # This program is free software; you can redistribute it and/or modify | 18 | # This program is free software; you can redistribute it and/or modify |
227 | 19 | # it under the terms of the GNU General Public License as published by | 19 | # it under the terms of the GNU General Public License as published by |
228 | @@ -31,7 +31,7 @@ | |||
229 | 31 | # | 31 | # |
230 | 32 | #======================================================================== | 32 | #======================================================================== |
231 | 33 | # | 33 | # |
233 | 34 | # Version 3.2.1, released 24 Apr 2011. | 34 | # Version 3.3.0, released 14 Apr 2013. |
234 | 35 | # | 35 | # |
235 | 36 | # See http://backuppc.sourceforge.net. | 36 | # See http://backuppc.sourceforge.net. |
236 | 37 | # | 37 | # |
237 | 38 | 38 | ||
238 | === modified file 'bin/BackupPC_dump' | |||
239 | --- bin/BackupPC_dump 2011-09-19 00:55:51 +0000 | |||
240 | +++ bin/BackupPC_dump 2014-01-06 14:04:46 +0000 | |||
241 | @@ -59,7 +59,7 @@ | |||
242 | 59 | # Craig Barratt <cbarratt@users.sourceforge.net> | 59 | # Craig Barratt <cbarratt@users.sourceforge.net> |
243 | 60 | # | 60 | # |
244 | 61 | # COPYRIGHT | 61 | # COPYRIGHT |
246 | 62 | # Copyright (C) 2001-2009 Craig Barratt | 62 | # Copyright (C) 2001-2013 Craig Barratt |
247 | 63 | # | 63 | # |
248 | 64 | # This program is free software; you can redistribute it and/or modify | 64 | # This program is free software; you can redistribute it and/or modify |
249 | 65 | # it under the terms of the GNU General Public License as published by | 65 | # it under the terms of the GNU General Public License as published by |
250 | @@ -77,7 +77,7 @@ | |||
251 | 77 | # | 77 | # |
252 | 78 | #======================================================================== | 78 | #======================================================================== |
253 | 79 | # | 79 | # |
255 | 80 | # Version 3.2.1, released 24 Apr 2011. | 80 | # Version 3.3.0, released 14 Apr 2013. |
256 | 81 | # | 81 | # |
257 | 82 | # See http://backuppc.sourceforge.net. | 82 | # See http://backuppc.sourceforge.net. |
258 | 83 | # | 83 | # |
259 | @@ -1066,7 +1066,7 @@ | |||
260 | 1066 | # Send ALRMs to BackupPC_tarExtract if we are using it | 1066 | # Send ALRMs to BackupPC_tarExtract if we are using it |
261 | 1067 | # | 1067 | # |
262 | 1068 | if ( $tarPid > 0 ) { | 1068 | if ( $tarPid > 0 ) { |
264 | 1069 | kill($bpc->sigName2num("ARLM"), $tarPid); | 1069 | kill($bpc->sigName2num("ALRM"), $tarPid); |
265 | 1070 | } | 1070 | } |
266 | 1071 | 1071 | ||
267 | 1072 | # | 1072 | # |
268 | 1073 | 1073 | ||
269 | === modified file 'bin/BackupPC_fixupBackupSummary' | |||
270 | --- bin/BackupPC_fixupBackupSummary 2011-09-19 00:55:51 +0000 | |||
271 | +++ bin/BackupPC_fixupBackupSummary 2014-01-06 14:04:46 +0000 | |||
272 | @@ -12,7 +12,7 @@ | |||
273 | 12 | # Craig Barratt <cbarratt@users.sourceforge.net> | 12 | # Craig Barratt <cbarratt@users.sourceforge.net> |
274 | 13 | # | 13 | # |
275 | 14 | # COPYRIGHT | 14 | # COPYRIGHT |
277 | 15 | # Copyright (C) 2005-2009 Craig Barratt | 15 | # Copyright (C) 2005-2013 Craig Barratt |
278 | 16 | # | 16 | # |
279 | 17 | # This program is free software; you can redistribute it and/or modify | 17 | # This program is free software; you can redistribute it and/or modify |
280 | 18 | # it under the terms of the GNU General Public License as published by | 18 | # it under the terms of the GNU General Public License as published by |
281 | @@ -30,7 +30,7 @@ | |||
282 | 30 | # | 30 | # |
283 | 31 | #======================================================================== | 31 | #======================================================================== |
284 | 32 | # | 32 | # |
286 | 33 | # Version 3.2.1, released 24 Apr 2011. | 33 | # Version 3.3.0, released 14 Apr 2013. |
287 | 34 | # | 34 | # |
288 | 35 | # See http://backuppc.sourceforge.net. | 35 | # See http://backuppc.sourceforge.net. |
289 | 36 | # | 36 | # |
290 | 37 | 37 | ||
291 | === modified file 'bin/BackupPC_link' | |||
292 | --- bin/BackupPC_link 2011-09-19 00:55:51 +0000 | |||
293 | +++ bin/BackupPC_link 2014-01-06 14:04:46 +0000 | |||
294 | @@ -21,7 +21,7 @@ | |||
295 | 21 | # Craig Barratt <cbarratt@users.sourceforge.net> | 21 | # Craig Barratt <cbarratt@users.sourceforge.net> |
296 | 22 | # | 22 | # |
297 | 23 | # COPYRIGHT | 23 | # COPYRIGHT |
299 | 24 | # Copyright (C) 2001-2009 Craig Barratt | 24 | # Copyright (C) 2001-2013 Craig Barratt |
300 | 25 | # | 25 | # |
301 | 26 | # This program is free software; you can redistribute it and/or modify | 26 | # This program is free software; you can redistribute it and/or modify |
302 | 27 | # it under the terms of the GNU General Public License as published by | 27 | # it under the terms of the GNU General Public License as published by |
303 | @@ -39,7 +39,7 @@ | |||
304 | 39 | # | 39 | # |
305 | 40 | #======================================================================== | 40 | #======================================================================== |
306 | 41 | # | 41 | # |
308 | 42 | # Version 3.2.1, released 24 Apr 2011. | 42 | # Version 3.3.0, released 14 Apr 2013. |
309 | 43 | # | 43 | # |
310 | 44 | # See http://backuppc.sourceforge.net. | 44 | # See http://backuppc.sourceforge.net. |
311 | 45 | # | 45 | # |
312 | 46 | 46 | ||
313 | === modified file 'bin/BackupPC_nightly' | |||
314 | --- bin/BackupPC_nightly 2011-09-19 00:55:51 +0000 | |||
315 | +++ bin/BackupPC_nightly 2014-01-06 14:04:46 +0000 | |||
316 | @@ -37,7 +37,7 @@ | |||
317 | 37 | # Craig Barratt <cbarratt@users.sourceforge.net> | 37 | # Craig Barratt <cbarratt@users.sourceforge.net> |
318 | 38 | # | 38 | # |
319 | 39 | # COPYRIGHT | 39 | # COPYRIGHT |
321 | 40 | # Copyright (C) 2001-2009 Craig Barratt | 40 | # Copyright (C) 2001-2013 Craig Barratt |
322 | 41 | # | 41 | # |
323 | 42 | # This program is free software; you can redistribute it and/or modify | 42 | # This program is free software; you can redistribute it and/or modify |
324 | 43 | # it under the terms of the GNU General Public License as published by | 43 | # it under the terms of the GNU General Public License as published by |
325 | @@ -55,7 +55,7 @@ | |||
326 | 55 | # | 55 | # |
327 | 56 | #======================================================================== | 56 | #======================================================================== |
328 | 57 | # | 57 | # |
330 | 58 | # Version 3.2.1, released 24 Apr 2011. | 58 | # Version 3.3.0, released 14 Apr 2013. |
331 | 59 | # | 59 | # |
332 | 60 | # See http://backuppc.sourceforge.net. | 60 | # See http://backuppc.sourceforge.net. |
333 | 61 | # | 61 | # |
334 | 62 | 62 | ||
335 | === modified file 'bin/BackupPC_restore' | |||
336 | --- bin/BackupPC_restore 2011-09-19 00:55:51 +0000 | |||
337 | +++ bin/BackupPC_restore 2014-01-06 14:04:46 +0000 | |||
338 | @@ -11,7 +11,7 @@ | |||
339 | 11 | # Craig Barratt <cbarratt@users.sourceforge.net> | 11 | # Craig Barratt <cbarratt@users.sourceforge.net> |
340 | 12 | # | 12 | # |
341 | 13 | # COPYRIGHT | 13 | # COPYRIGHT |
343 | 14 | # Copyright (C) 2001-2009 Craig Barratt | 14 | # Copyright (C) 2001-2013 Craig Barratt |
344 | 15 | # | 15 | # |
345 | 16 | # This program is free software; you can redistribute it and/or modify | 16 | # This program is free software; you can redistribute it and/or modify |
346 | 17 | # it under the terms of the GNU General Public License as published by | 17 | # it under the terms of the GNU General Public License as published by |
347 | @@ -29,7 +29,7 @@ | |||
348 | 29 | # | 29 | # |
349 | 30 | #======================================================================== | 30 | #======================================================================== |
350 | 31 | # | 31 | # |
352 | 32 | # Version 3.2.1, released 24 Apr 2011. | 32 | # Version 3.3.0, released 14 Apr 2013. |
353 | 33 | # | 33 | # |
354 | 34 | # See http://backuppc.sourceforge.net. | 34 | # See http://backuppc.sourceforge.net. |
355 | 35 | # | 35 | # |
356 | 36 | 36 | ||
357 | === modified file 'bin/BackupPC_sendEmail' | |||
358 | --- bin/BackupPC_sendEmail 2011-09-19 00:55:51 +0000 | |||
359 | +++ bin/BackupPC_sendEmail 2014-01-06 14:04:46 +0000 | |||
360 | @@ -13,7 +13,7 @@ | |||
361 | 13 | # Craig Barratt <cbarratt@users.sourceforge.net> | 13 | # Craig Barratt <cbarratt@users.sourceforge.net> |
362 | 14 | # | 14 | # |
363 | 15 | # COPYRIGHT | 15 | # COPYRIGHT |
365 | 16 | # Copyright (C) 2001-2009 Craig Barratt | 16 | # Copyright (C) 2001-2013 Craig Barratt |
366 | 17 | # | 17 | # |
367 | 18 | # This program is free software; you can redistribute it and/or modify | 18 | # This program is free software; you can redistribute it and/or modify |
368 | 19 | # it under the terms of the GNU General Public License as published by | 19 | # it under the terms of the GNU General Public License as published by |
369 | @@ -31,7 +31,7 @@ | |||
370 | 31 | # | 31 | # |
371 | 32 | #======================================================================== | 32 | #======================================================================== |
372 | 33 | # | 33 | # |
374 | 34 | # Version 3.2.1, released 24 Apr 2011. | 34 | # Version 3.3.0, released 14 Apr 2013. |
375 | 35 | # | 35 | # |
376 | 36 | # See http://backuppc.sourceforge.net. | 36 | # See http://backuppc.sourceforge.net. |
377 | 37 | # | 37 | # |
378 | @@ -186,8 +186,6 @@ | |||
379 | 186 | %Conf = $bpc->Conf(); | 186 | %Conf = $bpc->Conf(); |
380 | 187 | my $user = $Hosts->{$host}{user}; | 187 | my $user = $Hosts->{$host}{user}; |
381 | 188 | 188 | ||
382 | 189 | next if ( $user eq "" ); | ||
383 | 190 | |||
384 | 191 | # | 189 | # |
385 | 192 | # Accumulate host errors for the admin email below | 190 | # Accumulate host errors for the admin email below |
386 | 193 | # | 191 | # |
387 | @@ -204,6 +202,7 @@ | |||
388 | 204 | || $Conf{XferMethod} eq "archive" | 202 | || $Conf{XferMethod} eq "archive" |
389 | 205 | || $Conf{BackupsDisable} | 203 | || $Conf{BackupsDisable} |
390 | 206 | || $Hosts->{$host}{user} eq "" | 204 | || $Hosts->{$host}{user} eq "" |
391 | 205 | || $user eq "" | ||
392 | 207 | ); | 206 | ); |
393 | 208 | my @Backups = $bpc->BackupInfoRead($host); | 207 | my @Backups = $bpc->BackupInfoRead($host); |
394 | 209 | my $numBackups = @Backups; | 208 | my $numBackups = @Backups; |
395 | 210 | 209 | ||
396 | === modified file 'bin/BackupPC_serverMesg' | |||
397 | --- bin/BackupPC_serverMesg 2011-09-19 00:55:51 +0000 | |||
398 | +++ bin/BackupPC_serverMesg 2014-01-06 14:04:46 +0000 | |||
399 | @@ -25,7 +25,7 @@ | |||
400 | 25 | # Craig Barratt <cbarratt@users.sourceforge.net> | 25 | # Craig Barratt <cbarratt@users.sourceforge.net> |
401 | 26 | # | 26 | # |
402 | 27 | # COPYRIGHT | 27 | # COPYRIGHT |
404 | 28 | # Copyright (C) 2001-2009 Craig Barratt | 28 | # Copyright (C) 2001-2013 Craig Barratt |
405 | 29 | # | 29 | # |
406 | 30 | # This program is free software; you can redistribute it and/or modify | 30 | # This program is free software; you can redistribute it and/or modify |
407 | 31 | # it under the terms of the GNU General Public License as published by | 31 | # it under the terms of the GNU General Public License as published by |
408 | @@ -43,7 +43,7 @@ | |||
409 | 43 | # | 43 | # |
410 | 44 | #======================================================================== | 44 | #======================================================================== |
411 | 45 | # | 45 | # |
413 | 46 | # Version 3.2.1, released 24 Apr 2011. | 46 | # Version 3.3.0, released 14 Apr 2013. |
414 | 47 | # | 47 | # |
415 | 48 | # See http://backuppc.sourceforge.net. | 48 | # See http://backuppc.sourceforge.net. |
416 | 49 | # | 49 | # |
417 | 50 | 50 | ||
418 | === modified file 'bin/BackupPC_tarCreate' | |||
419 | --- bin/BackupPC_tarCreate 2011-09-19 00:55:51 +0000 | |||
420 | +++ bin/BackupPC_tarCreate 2014-01-06 14:04:46 +0000 | |||
421 | @@ -37,7 +37,7 @@ | |||
422 | 37 | # Craig Barratt <cbarratt@users.sourceforge.net> | 37 | # Craig Barratt <cbarratt@users.sourceforge.net> |
423 | 38 | # | 38 | # |
424 | 39 | # COPYRIGHT | 39 | # COPYRIGHT |
426 | 40 | # Copyright (C) 2001-2009 Craig Barratt | 40 | # Copyright (C) 2001-2013 Craig Barratt |
427 | 41 | # | 41 | # |
428 | 42 | # This program is free software; you can redistribute it and/or modify | 42 | # This program is free software; you can redistribute it and/or modify |
429 | 43 | # it under the terms of the GNU General Public License as published by | 43 | # it under the terms of the GNU General Public License as published by |
430 | @@ -55,7 +55,7 @@ | |||
431 | 55 | # | 55 | # |
432 | 56 | #======================================================================== | 56 | #======================================================================== |
433 | 57 | # | 57 | # |
435 | 58 | # Version 3.2.1, released 24 Apr 2011. | 58 | # Version 3.3.0, released 14 Apr 2013. |
436 | 59 | # | 59 | # |
437 | 60 | # See http://backuppc.sourceforge.net. | 60 | # See http://backuppc.sourceforge.net. |
438 | 61 | # | 61 | # |
439 | 62 | 62 | ||
440 | === modified file 'bin/BackupPC_tarExtract' | |||
441 | --- bin/BackupPC_tarExtract 2011-09-19 00:55:51 +0000 | |||
442 | +++ bin/BackupPC_tarExtract 2014-01-06 14:04:46 +0000 | |||
443 | @@ -9,7 +9,7 @@ | |||
444 | 9 | # Craig Barratt <cbarratt@users.sourceforge.net> | 9 | # Craig Barratt <cbarratt@users.sourceforge.net> |
445 | 10 | # | 10 | # |
446 | 11 | # COPYRIGHT | 11 | # COPYRIGHT |
448 | 12 | # Copyright (C) 2001-2009 Craig Barratt | 12 | # Copyright (C) 2001-2013 Craig Barratt |
449 | 13 | # | 13 | # |
450 | 14 | # This program is free software; you can redistribute it and/or modify | 14 | # This program is free software; you can redistribute it and/or modify |
451 | 15 | # it under the terms of the GNU General Public License as published by | 15 | # it under the terms of the GNU General Public License as published by |
452 | @@ -27,7 +27,7 @@ | |||
453 | 27 | # | 27 | # |
454 | 28 | #======================================================================== | 28 | #======================================================================== |
455 | 29 | # | 29 | # |
457 | 30 | # Version 3.2.1, released 24 Apr 2011. | 30 | # Version 3.3.0, released 14 Apr 2013. |
458 | 31 | # | 31 | # |
459 | 32 | # See http://backuppc.sourceforge.net. | 32 | # See http://backuppc.sourceforge.net. |
460 | 33 | # | 33 | # |
461 | 34 | 34 | ||
462 | === modified file 'bin/BackupPC_tarPCCopy' | |||
463 | --- bin/BackupPC_tarPCCopy 2011-09-19 00:55:51 +0000 | |||
464 | +++ bin/BackupPC_tarPCCopy 2014-01-06 14:04:46 +0000 | |||
465 | @@ -20,7 +20,7 @@ | |||
466 | 20 | # Craig Barratt <cbarratt@users.sourceforge.net> | 20 | # Craig Barratt <cbarratt@users.sourceforge.net> |
467 | 21 | # | 21 | # |
468 | 22 | # COPYRIGHT | 22 | # COPYRIGHT |
470 | 23 | # Copyright (C) 2005-2009 Craig Barratt | 23 | # Copyright (C) 2005-2013 Craig Barratt |
471 | 24 | # | 24 | # |
472 | 25 | # This program is free software; you can redistribute it and/or modify | 25 | # This program is free software; you can redistribute it and/or modify |
473 | 26 | # it under the terms of the GNU General Public License as published by | 26 | # it under the terms of the GNU General Public License as published by |
474 | @@ -38,7 +38,7 @@ | |||
475 | 38 | # | 38 | # |
476 | 39 | #======================================================================== | 39 | #======================================================================== |
477 | 40 | # | 40 | # |
479 | 41 | # Version 3.2.1, released 24 Apr 2011. | 41 | # Version 3.3.0, released 14 Apr 2013. |
480 | 42 | # | 42 | # |
481 | 43 | # See http://backuppc.sourceforge.net. | 43 | # See http://backuppc.sourceforge.net. |
482 | 44 | # | 44 | # |
483 | 45 | 45 | ||
484 | === modified file 'bin/BackupPC_trashClean' | |||
485 | --- bin/BackupPC_trashClean 2011-09-19 00:55:51 +0000 | |||
486 | +++ bin/BackupPC_trashClean 2014-01-06 14:04:46 +0000 | |||
487 | @@ -11,7 +11,7 @@ | |||
488 | 11 | # Craig Barratt <cbarratt@users.sourceforge.net> | 11 | # Craig Barratt <cbarratt@users.sourceforge.net> |
489 | 12 | # | 12 | # |
490 | 13 | # COPYRIGHT | 13 | # COPYRIGHT |
492 | 14 | # Copyright (C) 2001-2009 Craig Barratt | 14 | # Copyright (C) 2001-2013 Craig Barratt |
493 | 15 | # | 15 | # |
494 | 16 | # This program is free software; you can redistribute it and/or modify | 16 | # This program is free software; you can redistribute it and/or modify |
495 | 17 | # it under the terms of the GNU General Public License as published by | 17 | # it under the terms of the GNU General Public License as published by |
496 | @@ -29,7 +29,7 @@ | |||
497 | 29 | # | 29 | # |
498 | 30 | #======================================================================== | 30 | #======================================================================== |
499 | 31 | # | 31 | # |
501 | 32 | # Version 3.2.1, released 24 Apr 2011. | 32 | # Version 3.3.0, released 14 Apr 2013. |
502 | 33 | # | 33 | # |
503 | 34 | # See http://backuppc.sourceforge.net. | 34 | # See http://backuppc.sourceforge.net. |
504 | 35 | # | 35 | # |
505 | 36 | 36 | ||
506 | === modified file 'bin/BackupPC_zcat' | |||
507 | --- bin/BackupPC_zcat 2011-09-19 00:55:51 +0000 | |||
508 | +++ bin/BackupPC_zcat 2014-01-06 14:04:46 +0000 | |||
509 | @@ -14,7 +14,7 @@ | |||
510 | 14 | # Craig Barratt <cbarratt@users.sourceforge.net> | 14 | # Craig Barratt <cbarratt@users.sourceforge.net> |
511 | 15 | # | 15 | # |
512 | 16 | # COPYRIGHT | 16 | # COPYRIGHT |
514 | 17 | # Copyright (C) 2001-2009 Craig Barratt | 17 | # Copyright (C) 2001-2013 Craig Barratt |
515 | 18 | # | 18 | # |
516 | 19 | # This program is free software; you can redistribute it and/or modify | 19 | # This program is free software; you can redistribute it and/or modify |
517 | 20 | # it under the terms of the GNU General Public License as published by | 20 | # it under the terms of the GNU General Public License as published by |
518 | @@ -32,7 +32,7 @@ | |||
519 | 32 | # | 32 | # |
520 | 33 | #======================================================================== | 33 | #======================================================================== |
521 | 34 | # | 34 | # |
523 | 35 | # Version 3.2.1, released 24 Apr 2011. | 35 | # Version 3.3.0, released 14 Apr 2013. |
524 | 36 | # | 36 | # |
525 | 37 | # See http://backuppc.sourceforge.net. | 37 | # See http://backuppc.sourceforge.net. |
526 | 38 | # | 38 | # |
527 | 39 | 39 | ||
528 | === modified file 'bin/BackupPC_zipCreate' | |||
529 | --- bin/BackupPC_zipCreate 2011-09-19 00:55:51 +0000 | |||
530 | +++ bin/BackupPC_zipCreate 2014-01-06 14:04:46 +0000 | |||
531 | @@ -21,7 +21,7 @@ | |||
532 | 21 | # -r pathRemove path prefix that will be replaced with pathAdd | 21 | # -r pathRemove path prefix that will be replaced with pathAdd |
533 | 22 | # -p pathAdd new path prefix | 22 | # -p pathAdd new path prefix |
534 | 23 | # -c level compression level (default is 0, no compression) | 23 | # -c level compression level (default is 0, no compression) |
536 | 24 | # -e charset charset for encoding file names (default: cp1252) | 24 | # -e charset charset for encoding file names (default: utf8) |
537 | 25 | # | 25 | # |
538 | 26 | # The -h, -n and -s options specify which dump is used to generate | 26 | # The -h, -n and -s options specify which dump is used to generate |
539 | 27 | # the zip archive. The -r and -p options can be used to relocate | 27 | # the zip archive. The -r and -p options can be used to relocate |
540 | @@ -33,7 +33,7 @@ | |||
541 | 33 | # Based on Backup_tarCreate by Craig Barratt <cbarratt@users.sourceforge.net> | 33 | # Based on Backup_tarCreate by Craig Barratt <cbarratt@users.sourceforge.net> |
542 | 34 | # | 34 | # |
543 | 35 | # COPYRIGHT | 35 | # COPYRIGHT |
545 | 36 | # Copyright (C) 2002-2009 Craig Barratt and Guillaume Filion | 36 | # Copyright (C) 2002-2013 Craig Barratt and Guillaume Filion |
546 | 37 | # | 37 | # |
547 | 38 | # This program is free software; you can redistribute it and/or modify | 38 | # This program is free software; you can redistribute it and/or modify |
548 | 39 | # it under the terms of the GNU General Public License as published by | 39 | # it under the terms of the GNU General Public License as published by |
549 | @@ -51,7 +51,7 @@ | |||
550 | 51 | # | 51 | # |
551 | 52 | #======================================================================== | 52 | #======================================================================== |
552 | 53 | # | 53 | # |
554 | 54 | # Version 3.2.1, released 24 Apr 2011. | 54 | # Version 3.3.0, released 14 Apr 2013. |
555 | 55 | # | 55 | # |
556 | 56 | # See http://backuppc.sourceforge.net. | 56 | # See http://backuppc.sourceforge.net. |
557 | 57 | # | 57 | # |
558 | @@ -93,7 +93,7 @@ | |||
559 | 93 | -r pathRemove path prefix that will be replaced with pathAdd | 93 | -r pathRemove path prefix that will be replaced with pathAdd |
560 | 94 | -p pathAdd new path prefix | 94 | -p pathAdd new path prefix |
561 | 95 | -c level compression level (default is 0, no compression) | 95 | -c level compression level (default is 0, no compression) |
563 | 96 | -e charset charset for encoding file names (default: cp1252) | 96 | -e charset charset for encoding file names (default: utf8) |
564 | 97 | EOF | 97 | EOF |
565 | 98 | exit(1); | 98 | exit(1); |
566 | 99 | } | 99 | } |
567 | @@ -135,7 +135,7 @@ | |||
568 | 135 | exit(1); | 135 | exit(1); |
569 | 136 | } | 136 | } |
570 | 137 | 137 | ||
572 | 138 | my $Charset = "cp1252"; | 138 | my $Charset = ""; # default: utf8 |
573 | 139 | $Charset = $opts{e} if ( $opts{e} ne "" ); | 139 | $Charset = $opts{e} if ( $opts{e} ne "" ); |
574 | 140 | 140 | ||
575 | 141 | my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ ); | 141 | my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ ); |
576 | @@ -311,6 +311,14 @@ | |||
577 | 311 | # Specify the compression level for this member | 311 | # Specify the compression level for this member |
578 | 312 | $zipmember->desiredCompressionLevel($compLevel) if ($compLevel =~ /[0-9]/); | 312 | $zipmember->desiredCompressionLevel($compLevel) if ($compLevel =~ /[0-9]/); |
579 | 313 | 313 | ||
580 | 314 | if ( $Charset =~ /^(?:utf[-_]?8)?$/i ) { | ||
581 | 315 | # Set general purpose bit 11 for UTF-8 code page | ||
582 | 316 | $zipmember->{bitFlag} = $zipmember->{bitFlag} | 0x0800 ; | ||
583 | 317 | } elsif ( $Charset =~ /^cp(?:437|720|737|775|85[02578]|86[069]|874|93[26]|949|950)$/i ) { | ||
584 | 318 | # Set "version made by" field to 0 (MS-DOS) for OEM code pages | ||
585 | 319 | $zipmember->fileAttributeFormat('FA_MSDOS'); | ||
586 | 320 | } | ||
587 | 321 | |||
588 | 314 | # Finally Zip the member | 322 | # Finally Zip the member |
589 | 315 | $zipfh->addMember($zipmember); | 323 | $zipfh->addMember($zipmember); |
590 | 316 | } | 324 | } |
591 | 317 | 325 | ||
592 | === modified file 'cgi-bin/BackupPC_Admin' | |||
593 | --- cgi-bin/BackupPC_Admin 2011-09-19 00:55:51 +0000 | |||
594 | +++ cgi-bin/BackupPC_Admin 2014-01-06 14:04:46 +0000 | |||
595 | @@ -21,7 +21,7 @@ | |||
596 | 21 | # Craig Barratt <cbarratt@users.sourceforge.net> | 21 | # Craig Barratt <cbarratt@users.sourceforge.net> |
597 | 22 | # | 22 | # |
598 | 23 | # COPYRIGHT | 23 | # COPYRIGHT |
600 | 24 | # Copyright (C) 2001-2009 Craig Barratt | 24 | # Copyright (C) 2001-2013 Craig Barratt |
601 | 25 | # | 25 | # |
602 | 26 | # This program is free software; you can redistribute it and/or modify | 26 | # This program is free software; you can redistribute it and/or modify |
603 | 27 | # it under the terms of the GNU General Public License as published by | 27 | # it under the terms of the GNU General Public License as published by |
604 | @@ -39,7 +39,7 @@ | |||
605 | 39 | # | 39 | # |
606 | 40 | #======================================================================== | 40 | #======================================================================== |
607 | 41 | # | 41 | # |
609 | 42 | # Version 3.2.1, released 24 Apr 2011. | 42 | # Version 3.3.0, released 14 Apr 2013. |
610 | 43 | # | 43 | # |
611 | 44 | # See http://backuppc.sourceforge.net. | 44 | # See http://backuppc.sourceforge.net. |
612 | 45 | # | 45 | # |
613 | 46 | 46 | ||
614 | === modified file 'conf/BackupPC_stnd.css' | |||
615 | --- conf/BackupPC_stnd.css 2011-09-19 00:55:51 +0000 | |||
616 | +++ conf/BackupPC_stnd.css 2014-01-06 14:04:46 +0000 | |||
617 | @@ -1,7 +1,7 @@ | |||
618 | 1 | /* | 1 | /* |
619 | 2 | * BackupPC standard CSS definitions | 2 | * BackupPC standard CSS definitions |
620 | 3 | * | 3 | * |
622 | 4 | * Version 3.2.1, released 24 Apr 2011. | 4 | * Version 3.3.0, released 14 Apr 2013. |
623 | 5 | * | 5 | * |
624 | 6 | * See http://backuppc.sourceforge.net. | 6 | * See http://backuppc.sourceforge.net. |
625 | 7 | * | 7 | * |
626 | @@ -9,7 +9,7 @@ | |||
627 | 9 | * Craig Barratt <cbarratt@users.sourceforge.net> | 9 | * Craig Barratt <cbarratt@users.sourceforge.net> |
628 | 10 | * | 10 | * |
629 | 11 | * COPYRIGHT | 11 | * COPYRIGHT |
631 | 12 | * Copyright (C) 2004-2009 Craig Barratt | 12 | * Copyright (C) 2004-2013 Craig Barratt |
632 | 13 | */ | 13 | */ |
633 | 14 | 14 | ||
634 | 15 | body { | 15 | body { |
635 | 16 | 16 | ||
636 | === modified file 'conf/BackupPC_stnd_orig.css' | |||
637 | --- conf/BackupPC_stnd_orig.css 2011-09-19 00:55:51 +0000 | |||
638 | +++ conf/BackupPC_stnd_orig.css 2014-01-06 14:04:46 +0000 | |||
639 | @@ -1,7 +1,7 @@ | |||
640 | 1 | /* | 1 | /* |
641 | 2 | * BackupPC standard CSS definitions | 2 | * BackupPC standard CSS definitions |
642 | 3 | * | 3 | * |
644 | 4 | * Version 3.2.1, released 24 Apr 2011. | 4 | * Version 3.3.0, released 14 Apr 2013. |
645 | 5 | * | 5 | * |
646 | 6 | * See http://backuppc.sourceforge.net. | 6 | * See http://backuppc.sourceforge.net. |
647 | 7 | * | 7 | * |
648 | @@ -9,7 +9,7 @@ | |||
649 | 9 | * Craig Barratt <cbarratt@users.sourceforge.net> | 9 | * Craig Barratt <cbarratt@users.sourceforge.net> |
650 | 10 | * | 10 | * |
651 | 11 | * COPYRIGHT | 11 | * COPYRIGHT |
653 | 12 | * Copyright (C) 2004-2009 Craig Barratt | 12 | * Copyright (C) 2004-2013 Craig Barratt |
654 | 13 | */ | 13 | */ |
655 | 14 | 14 | ||
656 | 15 | body { | 15 | body { |
657 | 16 | 16 | ||
658 | === modified file 'conf/config.pl' | |||
659 | --- conf/config.pl 2011-03-07 11:35:50 +0000 | |||
660 | +++ conf/config.pl 2014-01-06 14:04:46 +0000 | |||
661 | @@ -29,7 +29,7 @@ | |||
662 | 29 | # Craig Barratt <cbarratt@users.sourceforge.net> | 29 | # Craig Barratt <cbarratt@users.sourceforge.net> |
663 | 30 | # | 30 | # |
664 | 31 | # COPYRIGHT | 31 | # COPYRIGHT |
666 | 32 | # Copyright (C) 2001-2009 Craig Barratt | 32 | # Copyright (C) 2001-2013 Craig Barratt |
667 | 33 | # | 33 | # |
668 | 34 | # See http://backuppc.sourceforge.net. | 34 | # See http://backuppc.sourceforge.net. |
669 | 35 | # | 35 | # |
670 | @@ -976,7 +976,7 @@ | |||
671 | 976 | # redirection and pipes; put that in a script if you need it. | 976 | # redirection and pipes; put that in a script if you need it. |
672 | 977 | # | 977 | # |
673 | 978 | $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' | 978 | $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' |
675 | 979 | . ' $I_option -U $userName -E -N -d 1' | 979 | . ' $I_option -U $userName -E -d 1' |
676 | 980 | . ' -c tarmode\\ full -Tc$X_option - $fileList'; | 980 | . ' -c tarmode\\ full -Tc$X_option - $fileList'; |
677 | 981 | 981 | ||
678 | 982 | # | 982 | # |
679 | @@ -990,7 +990,7 @@ | |||
680 | 990 | # redirection and pipes; put that in a script if you need it. | 990 | # redirection and pipes; put that in a script if you need it. |
681 | 991 | # | 991 | # |
682 | 992 | $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' | 992 | $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' |
684 | 993 | . ' $I_option -U $userName -E -N -d 1' | 993 | . ' $I_option -U $userName -E -d 1' |
685 | 994 | . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; | 994 | . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; |
686 | 995 | 995 | ||
687 | 996 | # | 996 | # |
688 | @@ -1008,7 +1008,7 @@ | |||
689 | 1008 | # redirection and pipes; put that in a script if you need it. | 1008 | # redirection and pipes; put that in a script if you need it. |
690 | 1009 | # | 1009 | # |
691 | 1010 | $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' | 1010 | $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' |
693 | 1011 | . ' $I_option -U $userName -E -N -d 1' | 1011 | . ' $I_option -U $userName -E -d 1' |
694 | 1012 | . ' -c tarmode\\ full -Tx -'; | 1012 | . ' -c tarmode\\ full -Tx -'; |
695 | 1013 | 1013 | ||
696 | 1014 | ########################################################################### | 1014 | ########################################################################### |
697 | @@ -1047,11 +1047,14 @@ | |||
698 | 1047 | $Conf{TarShareName} = '/'; | 1047 | $Conf{TarShareName} = '/'; |
699 | 1048 | 1048 | ||
700 | 1049 | # | 1049 | # |
702 | 1050 | # Full command to run tar on the client. GNU tar is required. You will | 1050 | # Command to run tar on the client. GNU tar is required. You will |
703 | 1051 | # need to fill in the correct paths for ssh2 on the local host (server) | 1051 | # need to fill in the correct paths for ssh2 on the local host (server) |
704 | 1052 | # and GNU tar on the client. Security caution: normal users should not | 1052 | # and GNU tar on the client. Security caution: normal users should not |
705 | 1053 | # allowed to write to these executable files or directories. | 1053 | # allowed to write to these executable files or directories. |
706 | 1054 | # | 1054 | # |
707 | 1055 | # $Conf{TarClientCmd} is appended with with either $Conf{TarFullArgs} or | ||
708 | 1056 | # $Conf{TarIncrArgs} to create the final command that is run. | ||
709 | 1057 | # | ||
710 | 1055 | # See the documentation for more information about setting up ssh2 keys. | 1058 | # See the documentation for more information about setting up ssh2 keys. |
711 | 1056 | # | 1059 | # |
712 | 1057 | # If you plan to use NFS then tar just runs locally and ssh2 is not needed. | 1060 | # If you plan to use NFS then tar just runs locally and ssh2 is not needed. |
713 | 1058 | 1061 | ||
714 | === modified file 'conf/hosts' | |||
715 | --- conf/hosts 2010-11-21 14:59:53 +0000 | |||
716 | +++ conf/hosts 2014-01-06 14:04:46 +0000 | |||
717 | @@ -41,7 +41,7 @@ | |||
718 | 41 | # Craig Barratt <craig@arraycomm.com> | 41 | # Craig Barratt <craig@arraycomm.com> |
719 | 42 | # | 42 | # |
720 | 43 | # COPYRIGHT | 43 | # COPYRIGHT |
722 | 44 | # Copyright (C) 2001-2009 Craig Barratt | 44 | # Copyright (C) 2001-2013 Craig Barratt |
723 | 45 | # | 45 | # |
724 | 46 | # See http://backuppc.sourceforge.net. | 46 | # See http://backuppc.sourceforge.net. |
725 | 47 | # | 47 | # |
726 | 48 | 48 | ||
727 | === modified file 'configure.pl' (properties changed: +x to -x) | |||
728 | --- configure.pl 2011-09-19 00:55:51 +0000 | |||
729 | +++ configure.pl 2014-01-06 14:04:46 +0000 | |||
730 | @@ -19,7 +19,7 @@ | |||
731 | 19 | # Craig Barratt <cbarratt@users.sourceforge.net> | 19 | # Craig Barratt <cbarratt@users.sourceforge.net> |
732 | 20 | # | 20 | # |
733 | 21 | # COPYRIGHT | 21 | # COPYRIGHT |
735 | 22 | # Copyright (C) 2001-2010 Craig Barratt | 22 | # Copyright (C) 2001-2013 Craig Barratt |
736 | 23 | # | 23 | # |
737 | 24 | # This program is free software; you can redistribute it and/or modify | 24 | # This program is free software; you can redistribute it and/or modify |
738 | 25 | # it under the terms of the GNU General Public License as published by | 25 | # it under the terms of the GNU General Public License as published by |
739 | @@ -37,7 +37,7 @@ | |||
740 | 37 | # | 37 | # |
741 | 38 | #======================================================================== | 38 | #======================================================================== |
742 | 39 | # | 39 | # |
744 | 40 | # Version 3.2.1, released 24 Apr 2011. | 40 | # Version 3.3.0, released 14 Apr 2013. |
745 | 41 | # | 41 | # |
746 | 42 | # See http://backuppc.sourceforge.net. | 42 | # See http://backuppc.sourceforge.net. |
747 | 43 | # | 43 | # |
748 | @@ -72,7 +72,7 @@ | |||
749 | 72 | BackupPC distribution. This probably means you did not cd to the | 72 | BackupPC distribution. This probably means you did not cd to the |
750 | 73 | unpacked BackupPC distribution before running configure.pl, eg: | 73 | unpacked BackupPC distribution before running configure.pl, eg: |
751 | 74 | 74 | ||
753 | 75 | cd BackupPC-3.2.1 | 75 | cd BackupPC-3.3.0 |
754 | 76 | ./configure.pl | 76 | ./configure.pl |
755 | 77 | 77 | ||
756 | 78 | Please try again. | 78 | Please try again. |
757 | @@ -642,9 +642,12 @@ | |||
758 | 642 | lib/BackupPC/Lang/es.pm | 642 | lib/BackupPC/Lang/es.pm |
759 | 643 | lib/BackupPC/Lang/fr.pm | 643 | lib/BackupPC/Lang/fr.pm |
760 | 644 | lib/BackupPC/Lang/it.pm | 644 | lib/BackupPC/Lang/it.pm |
761 | 645 | lib/BackupPC/Lang/ja.pm | ||
762 | 645 | lib/BackupPC/Lang/nl.pm | 646 | lib/BackupPC/Lang/nl.pm |
763 | 646 | lib/BackupPC/Lang/pl.pm | 647 | lib/BackupPC/Lang/pl.pm |
764 | 647 | lib/BackupPC/Lang/pt_br.pm | 648 | lib/BackupPC/Lang/pt_br.pm |
765 | 649 | lib/BackupPC/Lang/ru.pm | ||
766 | 650 | lib/BackupPC/Lang/uk.pm | ||
767 | 648 | lib/BackupPC/Lang/zh_CN.pm | 651 | lib/BackupPC/Lang/zh_CN.pm |
768 | 649 | lib/BackupPC/Storage/Text.pm | 652 | lib/BackupPC/Storage/Text.pm |
769 | 650 | lib/BackupPC/Xfer.pm | 653 | lib/BackupPC/Xfer.pm |
770 | @@ -673,7 +676,7 @@ | |||
771 | 673 | # | 676 | # |
772 | 674 | # Install new CSS file, making a backup copy if necessary | 677 | # Install new CSS file, making a backup copy if necessary |
773 | 675 | # | 678 | # |
775 | 676 | my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-3.2.1"; | 679 | my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-3.3.0"; |
776 | 677 | if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) { | 680 | if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) { |
777 | 678 | rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup); | 681 | rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup); |
778 | 679 | } | 682 | } |
779 | @@ -893,7 +896,7 @@ | |||
780 | 893 | # | 896 | # |
781 | 894 | # Now backup and write the config file | 897 | # Now backup and write the config file |
782 | 895 | # | 898 | # |
784 | 896 | my $confCopy = "$dest.pre-3.2.1"; | 899 | my $confCopy = "$dest.pre-3.3.0"; |
785 | 897 | if ( -f $dest && !-f $confCopy ) { | 900 | if ( -f $dest && !-f $confCopy ) { |
786 | 898 | # | 901 | # |
787 | 899 | # Make copy of config file, preserving ownership and modes | 902 | # Make copy of config file, preserving ownership and modes |
788 | 900 | 903 | ||
789 | === modified file 'debian/README.Debian' | |||
790 | --- debian/README.Debian 2011-01-14 11:02:06 +0000 | |||
791 | +++ debian/README.Debian 2014-01-06 14:04:46 +0000 | |||
792 | @@ -105,5 +105,15 @@ | |||
793 | 105 | - Data directory is /var/lib/backuppc/ | 105 | - Data directory is /var/lib/backuppc/ |
794 | 106 | 106 | ||
795 | 107 | 107 | ||
796 | 108 | /etc/default/backuppc | ||
797 | 109 | --------------------- | ||
798 | 110 | |||
799 | 111 | You can change the nice value by adding a line like 'NICE=10' to | ||
800 | 112 | /etc/default/backuppc | ||
801 | 113 | |||
802 | 114 | |||
803 | 115 | |||
804 | 116 | |||
805 | 117 | |||
806 | 108 | 118 | ||
807 | 109 | -- Ludovic Drolez <ldrolez@debian.org>, Mon, 16 Jun 2004 10:43:48 +0200 | 119 | -- Ludovic Drolez <ldrolez@debian.org>, Mon, 16 Jun 2004 10:43:48 +0200 |
808 | 110 | 120 | ||
809 | === added file 'debian/backuppc.default' | |||
810 | --- debian/backuppc.default 1970-01-01 00:00:00 +0000 | |||
811 | +++ debian/backuppc.default 2014-01-06 14:04:46 +0000 | |||
812 | @@ -0,0 +1,2 @@ | |||
813 | 1 | # Nice BackupPC daemon value | ||
814 | 2 | NICE=0 | ||
815 | 0 | 3 | ||
816 | === modified file 'debian/backuppc.init' | |||
817 | --- debian/backuppc.init 2013-01-06 03:04:32 +0000 | |||
818 | +++ debian/backuppc.init 2014-01-06 14:04:46 +0000 | |||
819 | @@ -23,6 +23,9 @@ | |||
820 | 23 | DATADIR=/var/lib/backuppc | 23 | DATADIR=/var/lib/backuppc |
821 | 24 | USER=backuppc | 24 | USER=backuppc |
822 | 25 | NICE=0 | 25 | NICE=0 |
823 | 26 | |||
824 | 27 | test -f /etc/default/backuppc && . /etc/default/backuppc | ||
825 | 28 | |||
826 | 26 | # | 29 | # |
827 | 27 | NAME=backuppc | 30 | NAME=backuppc |
828 | 28 | DAEMON=BackupPC | 31 | DAEMON=BackupPC |
829 | 29 | 32 | ||
830 | === modified file 'debian/backuppc.templates' | |||
831 | --- debian/backuppc.templates 2009-12-18 10:44:41 +0000 | |||
832 | +++ debian/backuppc.templates 2014-01-06 14:04:46 +0000 | |||
833 | @@ -11,7 +11,7 @@ | |||
834 | 11 | Template: backuppc/reconfigure-webserver | 11 | Template: backuppc/reconfigure-webserver |
835 | 12 | Type: multiselect | 12 | Type: multiselect |
836 | 13 | Choices: apache2 | 13 | Choices: apache2 |
838 | 14 | Default: | 14 | Default: apache2 |
839 | 15 | _Description: Which web server would you like to reconfigure automatically: | 15 | _Description: Which web server would you like to reconfigure automatically: |
840 | 16 | BackupPC supports any web server with CGI enabled, but this automatic | 16 | BackupPC supports any web server with CGI enabled, but this automatic |
841 | 17 | configuration process only supports Apache. | 17 | configuration process only supports Apache. |
842 | 18 | 18 | ||
843 | === modified file 'debian/changelog' | |||
844 | --- debian/changelog 2013-12-20 02:17:32 +0000 | |||
845 | +++ debian/changelog 2014-01-06 14:04:46 +0000 | |||
846 | @@ -1,3 +1,53 @@ | |||
847 | 1 | backuppc (3.3.0-1ubuntu1) trusty-proposed; urgency=low | ||
848 | 2 | |||
849 | 3 | * Merge from Debian unstable. Remaining changes: | ||
850 | 4 | - debian/backuppc.init, debian/rules, debian/postinst: Do not call init | ||
851 | 5 | script on shutdown and reboot (TearDown) (Debian #488660). | ||
852 | 6 | - debian/control: | ||
853 | 7 | + Remove estraneous libtime-modules-perl (Debian #734356). | ||
854 | 8 | + Depend on default-mta | mail-transport-agent, instead of enumerating a | ||
855 | 9 | long list of alternative MTAs. | ||
856 | 10 | |||
857 | 11 | -- Louis Bouchard <louis.bouchard@ubuntu.com> Mon, 06 Jan 2014 13:26:25 +0100 | ||
858 | 12 | |||
859 | 13 | backuppc (3.3.0-1) unstable; urgency=low | ||
860 | 14 | |||
861 | 15 | * New upstream release. Closes: #716824 | ||
862 | 16 | * Fix Typo in kill signal name (ALRM vs ARLM). Closes: #698441 | ||
863 | 17 | * Enable Apache2 (2.4) configuration by default. Closes: #718550 #710956 | ||
864 | 18 | |||
865 | 19 | -- Ludovic Drolez <ldrolez@debian.org> Thu, 12 Sep 2013 6:13:50 +0200 | ||
866 | 20 | |||
867 | 21 | backuppc (3.2.1-5.2) unstable; urgency=low | ||
868 | 22 | |||
869 | 23 | * Non-maintainer upload. | ||
870 | 24 | * Patch BackupPC.pod for POD errors with Perl 5.18 | ||
871 | 25 | pod2man has become more strict with perl 5.18. The applied patch | ||
872 | 26 | converts the non-7-bit clean character into UTF-8 and declares the | ||
873 | 27 | file's encoding as such. | ||
874 | 28 | Thanks to Dominic Hargreaves <dom@earth.li> (Closes: #719827) | ||
875 | 29 | |||
876 | 30 | -- Salvatore Bonaccorso <carnil@debian.org> Sat, 24 Aug 2013 15:29:57 +0200 | ||
877 | 31 | |||
878 | 32 | backuppc (3.2.1-5.1) unstable; urgency=low | ||
879 | 33 | |||
880 | 34 | * Non-maintainer upload. | ||
881 | 35 | * Do not ship /etc/backuppc/config.pl as a conffile; it is handled | ||
882 | 36 | by ucf already (Closes: #706315) | ||
883 | 37 | |||
884 | 38 | -- Jonathan Wiltshire <jmw@tiger-computing.co.uk> Fri, 07 Jun 2013 11:42:08 +0100 | ||
885 | 39 | |||
886 | 40 | backuppc (3.2.1-5) unstable; urgency=low | ||
887 | 41 | |||
888 | 42 | * Added libtime-modules-perl dependency. Closes: #525395 | ||
889 | 43 | * Remove /var/lib/backuppc/pc/localhost if it's empty | ||
890 | 44 | Closes: #672372 | ||
891 | 45 | * Added stuff to support Apache 2.4. Closes: #669765 | ||
892 | 46 | * Added NICE support in /etc/default/backuppc. Closes: #639102 | ||
893 | 47 | * Changed the default display date format. Closes: #663975 | ||
894 | 48 | |||
895 | 49 | -- Ludovic Drolez <ldrolez@debian.org> Thu, 03 Jan 2013 17:27:35 +0100 | ||
896 | 50 | |||
897 | 1 | backuppc (3.2.1-4ubuntu2) trusty; urgency=medium | 51 | backuppc (3.2.1-4ubuntu2) trusty; urgency=medium |
898 | 2 | 52 | ||
899 | 3 | * Specify pod2man encoding. | 53 | * Specify pod2man encoding. |
900 | 4 | 54 | ||
901 | === modified file 'debian/patches/config.pl.diff' | |||
902 | --- debian/patches/config.pl.diff 2011-03-07 11:35:50 +0000 | |||
903 | +++ debian/patches/config.pl.diff 2014-01-06 14:04:46 +0000 | |||
904 | @@ -21,33 +21,6 @@ | |||
905 | 21 | $Conf{CatPath} = '/bin/cat'; | 21 | $Conf{CatPath} = '/bin/cat'; |
906 | 22 | $Conf{GzipPath} = '/bin/gzip'; | 22 | $Conf{GzipPath} = '/bin/gzip'; |
907 | 23 | $Conf{Bzip2Path} = '/bin/bzip2'; | 23 | $Conf{Bzip2Path} = '/bin/bzip2'; |
908 | 24 | @@ -952,7 +952,7 @@ | ||
909 | 25 | # redirection and pipes; put that in a script if you need it. | ||
910 | 26 | # | ||
911 | 27 | $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' | ||
912 | 28 | - . ' $I_option -U $userName -E -N -d 1' | ||
913 | 29 | + . ' $I_option -U $userName -E -d 1' | ||
914 | 30 | . ' -c tarmode\\ full -Tc$X_option - $fileList'; | ||
915 | 31 | |||
916 | 32 | # | ||
917 | 33 | @@ -966,7 +966,7 @@ | ||
918 | 34 | # redirection and pipes; put that in a script if you need it. | ||
919 | 35 | # | ||
920 | 36 | $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' | ||
921 | 37 | - . ' $I_option -U $userName -E -N -d 1' | ||
922 | 38 | + . ' $I_option -U $userName -E -d 1' | ||
923 | 39 | . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; | ||
924 | 40 | |||
925 | 41 | # | ||
926 | 42 | @@ -984,7 +984,7 @@ | ||
927 | 43 | # redirection and pipes; put that in a script if you need it. | ||
928 | 44 | # | ||
929 | 45 | $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' | ||
930 | 46 | - . ' $I_option -U $userName -E -N -d 1' | ||
931 | 47 | + . ' $I_option -U $userName -E -d 1' | ||
932 | 48 | . ' -c tarmode\\ full -Tx -'; | ||
933 | 49 | |||
934 | 50 | # | ||
935 | 51 | @@ -1462,7 +1462,7 @@ | 24 | @@ -1462,7 +1462,7 @@ |
936 | 52 | # Full path for ssh. Security caution: normal users should not | 25 | # Full path for ssh. Security caution: normal users should not |
937 | 53 | # allowed to write to this file or directory. | 26 | # allowed to write to this file or directory. |
938 | 54 | 27 | ||
939 | === modified file 'debian/postinst' | |||
940 | --- debian/postinst 2011-06-15 16:28:41 +0000 | |||
941 | +++ debian/postinst 2014-01-06 14:04:46 +0000 | |||
942 | @@ -52,6 +52,19 @@ | |||
943 | 52 | > /etc/$webserver/httpd.conf | 52 | > /etc/$webserver/httpd.conf |
944 | 53 | fi | 53 | fi |
945 | 54 | # add new links | 54 | # add new links |
946 | 55 | |||
947 | 56 | # Apache 2.4 | ||
948 | 57 | if [ -d /etc/$webserver/conf-available -a ! -f /etc/$webserver/conf-available/backuppc.conf -a ! -h /etc/$webserver/conf-available/backuppc.conf ]; then | ||
949 | 58 | ln -s /etc/backuppc/apache.conf /etc/$webserver/conf-available/backuppc.conf | ||
950 | 59 | [ -f /etc/$webserver/conf.d/backuppc.conf ] && rm /etc/$webserver/conf.d/backuppc.conf | ||
951 | 60 | |||
952 | 61 | if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then | ||
953 | 62 | . /usr/share/apache2/apache2-maintscript-helper | ||
954 | 63 | apache2_invoke enconf backuppc.conf | ||
955 | 64 | fi | ||
956 | 65 | fi | ||
957 | 66 | |||
958 | 67 | # Apache < 2.4 | ||
959 | 55 | newfile=false | 68 | newfile=false |
960 | 56 | if [ -d /etc/$webserver/conf.d -a ! -f /etc/$webserver/conf.d/backuppc.conf -a ! -h /etc/$webserver/conf.d/backuppc.conf ]; then | 69 | if [ -d /etc/$webserver/conf.d -a ! -f /etc/$webserver/conf.d/backuppc.conf -a ! -h /etc/$webserver/conf.d/backuppc.conf ]; then |
961 | 57 | ln -s /etc/backuppc/apache.conf /etc/$webserver/conf.d/backuppc.conf | 70 | ln -s /etc/backuppc/apache.conf /etc/$webserver/conf.d/backuppc.conf |
962 | @@ -59,10 +72,10 @@ | |||
963 | 59 | if [ "$webservers_rst" = "true" ]; then | 72 | if [ "$webservers_rst" = "true" ]; then |
964 | 60 | # restart | 73 | # restart |
965 | 61 | if [ -x /usr/sbin/invoke-rc.d ]; then | 74 | if [ -x /usr/sbin/invoke-rc.d ]; then |
967 | 62 | invoke-rc.d $webserver restart | 75 | invoke-rc.d $webserver reload |
968 | 63 | else | 76 | else |
971 | 64 | /etc/init.d/$webserver restart | 77 | /etc/init.d/$webserver reload |
972 | 65 | fi | 78 | fi |
973 | 66 | fi | 79 | fi |
974 | 67 | fi | 80 | fi |
975 | 68 | ;; | 81 | ;; |
976 | 69 | 82 | ||
977 | === modified file 'debian/postrm' | |||
978 | --- debian/postrm 2011-06-15 16:28:41 +0000 | |||
979 | +++ debian/postrm 2014-01-06 14:04:46 +0000 | |||
980 | @@ -43,9 +43,9 @@ | |||
981 | 43 | if [ "$webservers_rst" = "true" ]; then | 43 | if [ "$webservers_rst" = "true" ]; then |
982 | 44 | # restart | 44 | # restart |
983 | 45 | if [ -x /usr/sbin/invoke-rc.d ]; then | 45 | if [ -x /usr/sbin/invoke-rc.d ]; then |
985 | 46 | invoke-rc.d $webserver restart | 46 | invoke-rc.d $webserver reload |
986 | 47 | else | 47 | else |
988 | 48 | /etc/init.d/$webserver restart | 48 | /etc/init.d/$webserver reload |
989 | 49 | fi | 49 | fi |
990 | 50 | fi | 50 | fi |
991 | 51 | fi | 51 | fi |
992 | @@ -54,6 +54,14 @@ | |||
993 | 54 | done | 54 | done |
994 | 55 | fi | 55 | fi |
995 | 56 | 56 | ||
996 | 57 | if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then | ||
997 | 58 | . /usr/share/apache2/apache2-maintscript-helper | ||
998 | 59 | apache2_invoke disconf backuppc.conf | ||
999 | 60 | fi | ||
1000 | 61 | |||
1001 | 62 | if [ -h /etc/apache2/conf-available/backuppc.conf ]; then | ||
1002 | 63 | rm -f /etc/apache2/conf-available/backuppc.conf | ||
1003 | 64 | fi | ||
1004 | 57 | 65 | ||
1005 | 58 | dpkg-statoverride --remove --force /usr/share/backuppc/cgi-bin/index.cgi | 66 | dpkg-statoverride --remove --force /usr/share/backuppc/cgi-bin/index.cgi |
1006 | 59 | dpkg-statoverride --remove --force /usr/lib/backuppc/cgi-bin/index.cgi | 67 | dpkg-statoverride --remove --force /usr/lib/backuppc/cgi-bin/index.cgi |
1007 | @@ -61,6 +69,7 @@ | |||
1008 | 61 | if [ -x "/usr/bin/ucf" ]; then | 69 | if [ -x "/usr/bin/ucf" ]; then |
1009 | 62 | ucf --purge /etc/backuppc/config.pl | 70 | ucf --purge /etc/backuppc/config.pl |
1010 | 63 | fi | 71 | fi |
1011 | 72 | rmdir --ignore-fail-on-non-empty /var/lib/backuppc/pc/localhost/ | ||
1012 | 64 | 73 | ||
1013 | 65 | ;; | 74 | ;; |
1014 | 66 | remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | 75 | remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
1015 | 67 | 76 | ||
1016 | === modified file 'debian/rules' | |||
1017 | --- debian/rules 2011-06-15 16:28:41 +0000 | |||
1018 | +++ debian/rules 2014-01-06 14:04:46 +0000 | |||
1019 | @@ -51,6 +51,7 @@ | |||
1020 | 51 | dh_installdirs | 51 | dh_installdirs |
1021 | 52 | 52 | ||
1022 | 53 | # Add here commands to install the package into debian/backuppc. | 53 | # Add here commands to install the package into debian/backuppc. |
1023 | 54 | chmod 755 ./configure.pl | ||
1024 | 54 | ./configure.pl --batch --no-fhs --hostname XXXXXX --uid-ignore \ | 55 | ./configure.pl --batch --no-fhs --hostname XXXXXX --uid-ignore \ |
1025 | 55 | --install-dir /usr/share/backuppc --dest-dir $(CURDIR)/debian/backuppc/ \ | 56 | --install-dir /usr/share/backuppc --dest-dir $(CURDIR)/debian/backuppc/ \ |
1026 | 56 | --data-dir /var/lib/backuppc --cgi-dir /usr/share/backuppc/cgi-bin \ | 57 | --data-dir /var/lib/backuppc --cgi-dir /usr/share/backuppc/cgi-bin \ |
1027 | @@ -73,6 +74,7 @@ | |||
1028 | 73 | (cd debian/backuppc/usr/share/backuppc/cgi-bin; ln -s ../image; ln -s /usr/lib/backuppc/cgi-bin/index.cgi ) | 74 | (cd debian/backuppc/usr/share/backuppc/cgi-bin; ln -s ../image; ln -s /usr/lib/backuppc/cgi-bin/index.cgi ) |
1029 | 74 | patch --no-backup-if-mismatch -p0 < debian/patches/config.pl.diff | 75 | patch --no-backup-if-mismatch -p0 < debian/patches/config.pl.diff |
1030 | 75 | install --mode=644 debian/backuppc/etc/backuppc/config.pl debian/backuppc/usr/share/backuppc/conf | 76 | install --mode=644 debian/backuppc/etc/backuppc/config.pl debian/backuppc/usr/share/backuppc/conf |
1031 | 77 | rm -rf debian/backuppc/etc/backuppc/config.pl | ||
1032 | 76 | 78 | ||
1033 | 77 | # Build architecture-independent files here. | 79 | # Build architecture-independent files here. |
1034 | 78 | binary-indep: build install | 80 | binary-indep: build install |
1035 | 79 | 81 | ||
1036 | === modified file 'doc/BackupPC.html' | |||
1037 | --- doc/BackupPC.html 2011-09-19 00:55:51 +0000 | |||
1038 | +++ doc/BackupPC.html 2014-01-06 14:04:46 +0000 | |||
1039 | @@ -4,1267 +4,854 @@ | |||
1040 | 4 | <head> | 4 | <head> |
1041 | 5 | <title>BackupPC</title> | 5 | <title>BackupPC</title> |
1042 | 6 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | 6 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
1044 | 7 | <link rev="made" href="mailto:rurban@x-ray.at" /> | 7 | <link rev="made" href="mailto:craig@craigs-macbook-pro.local" /> |
1045 | 8 | </head> | 8 | </head> |
1046 | 9 | 9 | ||
1047 | 10 | <body style="background-color: white"> | 10 | <body style="background-color: white"> |
1048 | 11 | <table border="0" width="100%" cellspacing="0" cellpadding="3"> | 11 | <table border="0" width="100%" cellspacing="0" cellpadding="3"> |
1051 | 12 | <tr><td class="block" style="background-color: #cccccc" valign="middle"> | 12 | <tr><td class="_podblock_" style="background-color: #cccccc" valign="middle"> |
1052 | 13 | <big><strong><span class="block"> BackupPC</span></strong></big> | 13 | <big><strong><span class="_podblock_"> BackupPC</span></strong></big> |
1053 | 14 | </td></tr> | 14 | </td></tr> |
1054 | 15 | </table> | 15 | </table> |
1055 | 16 | 16 | ||
1056 | 17 | 17 | ||
1157 | 18 | <!-- INDEX BEGIN --> | 18 | |
1158 | 19 | <div name="index"> | 19 | <ul id="index"> |
1159 | 20 | <p><a name="__index__"></a></p> | 20 | <li><a href="#BackupPC-Introduction">BackupPC Introduction</a> |
1160 | 21 | 21 | <ul> | |
1161 | 22 | <ul> | 22 | <li><a href="#Overview">Overview</a></li> |
1162 | 23 | 23 | <li><a href="#Backup-basics">Backup basics</a></li> | |
1163 | 24 | <li><a href="#backuppc_introduction">BackupPC Introduction</a></li> | 24 | <li><a href="#Resources">Resources</a></li> |
1164 | 25 | <ul> | 25 | <li><a href="#Road-map">Road map</a></li> |
1165 | 26 | 26 | <li><a href="#You-can-help">You can help</a></li> | |
1166 | 27 | <li><a href="#overview">Overview</a></li> | 27 | </ul> |
1167 | 28 | <li><a href="#backup_basics">Backup basics</a></li> | 28 | </li> |
1168 | 29 | <li><a href="#resources">Resources</a></li> | 29 | <li><a href="#Installing-BackupPC">Installing BackupPC</a> |
1169 | 30 | <li><a href="#road_map">Road map</a></li> | 30 | <ul> |
1170 | 31 | <li><a href="#you_can_help">You can help</a></li> | 31 | <li><a href="#Requirements">Requirements</a></li> |
1171 | 32 | </ul> | 32 | <li><a href="#What-type-of-storage-space-do-I-need-">What type of storage space do I need?</a></li> |
1172 | 33 | 33 | <li><a href="#How-much-disk-space-do-I-need-">How much disk space do I need?</a></li> | |
1173 | 34 | <li><a href="#installing_backuppc">Installing BackupPC</a></li> | 34 | <li><a href="#Step-1:-Getting-BackupPC">Step 1: Getting BackupPC</a></li> |
1174 | 35 | <ul> | 35 | <li><a href="#Step-2:-Installing-the-distribution">Step 2: Installing the distribution</a></li> |
1175 | 36 | 36 | <li><a href="#Step-3:-Setting-up-config.pl">Step 3: Setting up config.pl</a></li> | |
1176 | 37 | <li><a href="#requirements">Requirements</a></li> | 37 | <li><a href="#Step-4:-Setting-up-the-hosts-file">Step 4: Setting up the hosts file</a></li> |
1177 | 38 | <li><a href="#what_type_of_storage_space_do_i_need">What type of storage space do I need?</a></li> | 38 | <li><a href="#Step-5:-Client-Setup">Step 5: Client Setup</a></li> |
1178 | 39 | <li><a href="#how_much_disk_space_do_i_need">How much disk space do I need?</a></li> | 39 | <li><a href="#Step-6:-Running-BackupPC">Step 6: Running BackupPC</a></li> |
1179 | 40 | <li><a href="#step_1__getting_backuppc">Step 1: Getting BackupPC</a></li> | 40 | <li><a href="#Step-7:-Talking-to-BackupPC">Step 7: Talking to BackupPC</a></li> |
1180 | 41 | <li><a href="#step_2__installing_the_distribution">Step 2: Installing the distribution</a></li> | 41 | <li><a href="#Step-8:-Checking-email-delivery">Step 8: Checking email delivery</a></li> |
1181 | 42 | <li><a href="#step_3__setting_up_config_pl">Step 3: Setting up config.pl</a></li> | 42 | <li><a href="#Step-9:-CGI-interface">Step 9: CGI interface</a></li> |
1182 | 43 | <li><a href="#step_4__setting_up_the_hosts_file">Step 4: Setting up the hosts file</a></li> | 43 | <li><a href="#How-BackupPC-Finds-Hosts">How BackupPC Finds Hosts</a></li> |
1183 | 44 | <li><a href="#step_5__client_setup">Step 5: Client Setup</a></li> | 44 | <li><a href="#Other-installation-topics">Other installation topics</a></li> |
1184 | 45 | <li><a href="#step_6__running_backuppc">Step 6: Running BackupPC</a></li> | 45 | <li><a href="#Fixing-installation-problems">Fixing installation problems</a></li> |
1185 | 46 | <li><a href="#step_7__talking_to_backuppc">Step 7: Talking to BackupPC</a></li> | 46 | </ul> |
1186 | 47 | <li><a href="#step_8__checking_email_delivery">Step 8: Checking email delivery</a></li> | 47 | </li> |
1187 | 48 | <li><a href="#step_9__cgi_interface">Step 9: CGI interface</a></li> | 48 | <li><a href="#Restore-functions">Restore functions</a> |
1188 | 49 | <li><a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a></li> | 49 | <ul> |
1189 | 50 | <li><a href="#other_installation_topics">Other installation topics</a></li> | 50 | <li><a href="#CGI-restore-options">CGI restore options</a></li> |
1190 | 51 | <li><a href="#fixing_installation_problems">Fixing installation problems</a></li> | 51 | <li><a href="#Command-line-restore-options">Command-line restore options</a></li> |
1191 | 52 | </ul> | 52 | </ul> |
1192 | 53 | 53 | </li> | |
1193 | 54 | <li><a href="#restore_functions">Restore functions</a></li> | 54 | <li><a href="#Archive-functions">Archive functions</a> |
1194 | 55 | <ul> | 55 | <ul> |
1195 | 56 | 56 | <li><a href="#Configuring-an-Archive-Host">Configuring an Archive Host</a></li> | |
1196 | 57 | <li><a href="#cgi_restore_options">CGI restore options</a></li> | 57 | <li><a href="#Starting-an-Archive">Starting an Archive</a></li> |
1197 | 58 | <li><a href="#command_line_restore_options">Command-line restore options</a></li> | 58 | <li><a href="#Starting-an-Archive-from-the-command-line">Starting an Archive from the command line</a></li> |
1198 | 59 | </ul> | 59 | </ul> |
1199 | 60 | 60 | </li> | |
1200 | 61 | <li><a href="#archive_functions">Archive functions</a></li> | 61 | <li><a href="#Other-CGI-Functions">Other CGI Functions</a> |
1201 | 62 | <ul> | 62 | <ul> |
1202 | 63 | 63 | <li><a href="#Configuration-and-Host-Editor">Configuration and Host Editor</a></li> | |
1203 | 64 | <li><a href="#configuring_an_archive_host">Configuring an Archive Host</a></li> | 64 | <li><a href="#RSS">RSS</a></li> |
1204 | 65 | <li><a href="#starting_an_archive">Starting an Archive</a></li> | 65 | </ul> |
1205 | 66 | <li><a href="#starting_an_archive_from_the_command_line">Starting an Archive from the command line</a></li> | 66 | </li> |
1206 | 67 | </ul> | 67 | <li><a href="#BackupPC-Design">BackupPC Design</a> |
1207 | 68 | 68 | <ul> | |
1208 | 69 | <li><a href="#other_cgi_functions">Other CGI Functions</a></li> | 69 | <li><a href="#Some-design-issues">Some design issues</a></li> |
1209 | 70 | <ul> | 70 | <li><a href="#BackupPC-operation">BackupPC operation</a></li> |
1210 | 71 | 71 | <li><a href="#Storage-layout">Storage layout</a></li> | |
1211 | 72 | <li><a href="#configuration_and_host_editor">Configuration and Host Editor</a></li> | 72 | <li><a href="#Compressed-file-format">Compressed file format</a></li> |
1212 | 73 | <li><a href="#rss">RSS</a></li> | 73 | <li><a href="#Rsync-checksum-caching">Rsync checksum caching</a></li> |
1213 | 74 | </ul> | 74 | <li><a href="#File-name-mangling">File name mangling</a></li> |
1214 | 75 | 75 | <li><a href="#Special-files">Special files</a></li> | |
1215 | 76 | <li><a href="#backuppc_design">BackupPC Design</a></li> | 76 | <li><a href="#Attribute-file-format">Attribute file format</a></li> |
1216 | 77 | <ul> | 77 | <li><a href="#Optimizations">Optimizations</a></li> |
1217 | 78 | 78 | <li><a href="#Limitations">Limitations</a></li> | |
1218 | 79 | <li><a href="#some_design_issues">Some design issues</a></li> | 79 | <li><a href="#Security-issues">Security issues</a></li> |
1219 | 80 | <li><a href="#backuppc_operation">BackupPC operation</a></li> | 80 | </ul> |
1220 | 81 | <li><a href="#storage_layout">Storage layout</a></li> | 81 | </li> |
1221 | 82 | <li><a href="#compressed_file_format">Compressed file format</a></li> | 82 | <li><a href="#Configuration-File">Configuration File</a> |
1222 | 83 | <li><a href="#rsync_checksum_caching">Rsync checksum caching</a></li> | 83 | <ul> |
1223 | 84 | <li><a href="#file_name_mangling">File name mangling</a></li> | 84 | <li><a href="#Modifying-the-main-configuration-file">Modifying the main configuration file</a></li> |
1224 | 85 | <li><a href="#special_files">Special files</a></li> | 85 | </ul> |
1225 | 86 | <li><a href="#attribute_file_format">Attribute file format</a></li> | 86 | </li> |
1226 | 87 | <li><a href="#optimizations">Optimizations</a></li> | 87 | <li><a href="#Configuration-Parameters">Configuration Parameters</a> |
1227 | 88 | <li><a href="#limitations">Limitations</a></li> | 88 | <ul> |
1228 | 89 | <li><a href="#security_issues">Security issues</a></li> | 89 | <li><a href="#General-server-configuration">General server configuration</a></li> |
1229 | 90 | </ul> | 90 | <li><a href="#What-to-backup-and-when-to-do-it">What to backup and when to do it</a></li> |
1230 | 91 | 91 | <li><a href="#How-to-backup-a-client">How to backup a client</a></li> | |
1231 | 92 | <li><a href="#configuration_file">Configuration File</a></li> | 92 | <li><a href="#Samba-Configuration">Samba Configuration</a></li> |
1232 | 93 | <ul> | 93 | <li><a href="#Tar-Configuration">Tar Configuration</a></li> |
1233 | 94 | 94 | <li><a href="#Rsync-Rsyncd-Configuration">Rsync/Rsyncd Configuration</a></li> | |
1234 | 95 | <li><a href="#modifying_the_main_configuration_file">Modifying the main configuration file</a></li> | 95 | <li><a href="#FTP-Configuration">FTP Configuration</a></li> |
1235 | 96 | </ul> | 96 | <li><a href="#Archive-Configuration">Archive Configuration</a></li> |
1236 | 97 | 97 | <li><a href="#Email-reminders-status-and-messages">Email reminders, status and messages</a></li> | |
1237 | 98 | <li><a href="#configuration_parameters">Configuration Parameters</a></li> | 98 | <li><a href="#CGI-user-interface-configuration-settings">CGI user interface configuration settings</a></li> |
1238 | 99 | <ul> | 99 | </ul> |
1239 | 100 | 100 | </li> | |
1240 | 101 | <li><a href="#general_server_configuration">General server configuration</a></li> | 101 | <li><a href="#Version-Numbers">Version Numbers</a></li> |
1241 | 102 | <li><a href="#what_to_backup_and_when_to_do_it">What to backup and when to do it</a></li> | 102 | <li><a href="#Author">Author</a></li> |
1242 | 103 | <li><a href="#how_to_backup_a_client">How to backup a client</a></li> | 103 | <li><a href="#Copyright">Copyright</a></li> |
1243 | 104 | <li><a href="#samba_configuration">Samba Configuration</a></li> | 104 | <li><a href="#Credits">Credits</a></li> |
1244 | 105 | <li><a href="#tar_configuration">Tar Configuration</a></li> | 105 | <li><a href="#License">License</a></li> |
1145 | 106 | <li><a href="#rsync_rsyncd_configuration">Rsync/Rsyncd Configuration</a></li> | ||
1146 | 107 | <li><a href="#ftp_configuration">FTP Configuration</a></li> | ||
1147 | 108 | <li><a href="#archive_configuration">Archive Configuration</a></li> | ||
1148 | 109 | <li><a href="#email_reminders__status_and_messages">Email reminders, status and messages</a></li> | ||
1149 | 110 | <li><a href="#cgi_user_interface_configuration_settings">CGI user interface configuration settings</a></li> | ||
1150 | 111 | </ul> | ||
1151 | 112 | |||
1152 | 113 | <li><a href="#version_numbers">Version Numbers</a></li> | ||
1153 | 114 | <li><a href="#author">Author</a></li> | ||
1154 | 115 | <li><a href="#copyright">Copyright</a></li> | ||
1155 | 116 | <li><a href="#credits">Credits</a></li> | ||
1156 | 117 | <li><a href="#license">License</a></li> | ||
1245 | 118 | </ul> | 106 | </ul> |
1246 | 119 | 107 | ||
1267 | 120 | <hr name="index" /> | 108 | <hr /> |
1268 | 121 | </div> | 109 | <h1 id="BackupPC-Introduction">BackupPC Introduction</h1> |
1269 | 122 | <!-- INDEX END --> | 110 | |
1270 | 123 | 111 | <p>This documentation describes BackupPC version 3.3.0, released on 14 Apr 2013.</p> | |
1271 | 124 | <p> | 112 | |
1272 | 125 | </p> | 113 | <h2 id="Overview">Overview</h2> |
1273 | 126 | <h1><a name="backuppc_introduction">BackupPC Introduction</a></h1> | 114 | |
1274 | 127 | <p>This documentation describes BackupPC version 3.2.1, | 115 | <p>BackupPC is a high-performance, enterprise-grade system for backing up Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain.</p> |
1275 | 128 | released on 24 Apr 2011.</p> | 116 | |
1276 | 129 | <p> | 117 | <p>Given the ever decreasing cost of disks and raid systems, it is now practical and cost effective to backup a large number of machines onto a server's local disk or network storage. For some sites this might be the complete backup solution. For other sites additional permanent archives could be created by periodically backing up the server to tape.</p> |
1277 | 130 | </p> | 118 | |
1258 | 131 | <h2><a name="overview">Overview</a></h2> | ||
1259 | 132 | <p>BackupPC is a high-performance, enterprise-grade system for backing up | ||
1260 | 133 | Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's | ||
1261 | 134 | disk. BackupPC is highly configurable and easy to install and maintain.</p> | ||
1262 | 135 | <p>Given the ever decreasing cost of disks and raid systems, it is now | ||
1263 | 136 | practical and cost effective to backup a large number of machines onto | ||
1264 | 137 | a server's local disk or network storage. For some sites this might be | ||
1265 | 138 | the complete backup solution. For other sites additional permanent | ||
1266 | 139 | archives could be created by periodically backing up the server to tape.</p> | ||
1278 | 140 | <p>Features include:</p> | 119 | <p>Features include:</p> |
1279 | 120 | |||
1280 | 141 | <ul> | 121 | <ul> |
1341 | 142 | <li> | 122 | |
1342 | 143 | <p>A clever pooling scheme minimizes disk storage and disk I/O. | 123 | <li><p>A clever pooling scheme minimizes disk storage and disk I/O. Identical files across multiple backups of the same or different PC are stored only once (using hard links), resulting in substantial savings in disk storage and disk writes.</p> |
1343 | 144 | Identical files across multiple backups of the same or different PC | 124 | |
1344 | 145 | are stored only once (using hard links), resulting in substantial | 125 | </li> |
1345 | 146 | savings in disk storage and disk writes.</p> | 126 | <li><p>Optional compression provides additional reductions in storage (around 40%). The CPU impact of compression is low since only new files (those not already in the pool) need to be compressed.</p> |
1346 | 147 | </li> | 127 | |
1347 | 148 | <li> | 128 | </li> |
1348 | 149 | <p>Optional compression provides additional reductions in storage | 129 | <li><p>A powerful http/cgi user interface allows administrators to view the current status, edit configuration, add/delete hosts, view log files, and allows users to initiate and cancel backups and browse and restore files from backups.</p> |
1349 | 150 | (around 40%). The CPU impact of compression is low since only | 130 | |
1350 | 151 | new files (those not already in the pool) need to be compressed.</p> | 131 | </li> |
1351 | 152 | </li> | 132 | <li><p>The http/cgi user interface has internationalization (i18n) support, currently providing English, French, German, Spanish, Italian, Dutch, Polish, Portuguese-Brazilian and Chinese</p> |
1352 | 153 | <li> | 133 | |
1353 | 154 | <p>A powerful http/cgi user interface allows administrators to view | 134 | </li> |
1354 | 155 | the current status, edit configuration, add/delete hosts, view log | 135 | <li><p>No client-side software is needed. On WinXX the standard smb protocol is used to extract backup data. On linux, unix or MacOSX clients, rsync, tar (over ssh/rsh/nfs) or ftp is used to extract backup data. Alternatively, rsync can also be used on WinXX (using cygwin), and Samba could be installed on the linux or unix client to provide smb shares).</p> |
1355 | 156 | files, and allows users to initiate and cancel backups and browse | 136 | |
1356 | 157 | and restore files from backups.</p> | 137 | </li> |
1357 | 158 | </li> | 138 | <li><p>Flexible restore options. Single files can be downloaded from any backup directly from the CGI interface. Zip or Tar archives for selected files or directories from any backup can also be downloaded from the CGI interface. Finally, direct restore to the client machine (using smb or tar) for selected files or directories is also supported from the CGI interface.</p> |
1358 | 159 | <li> | 139 | |
1359 | 160 | <p>The http/cgi user interface has internationalization (i18n) support, | 140 | </li> |
1360 | 161 | currently providing English, French, German, Spanish, Italian, | 141 | <li><p>BackupPC supports mobile environments where laptops are only intermittently connected to the network and have dynamic IP addresses (DHCP). Configuration settings allow machines connected via slower WAN connections (eg: dial up, DSL, cable) to not be backed up, even if they use the same fixed or dynamic IP address as when they are connected directly to the LAN.</p> |
1361 | 162 | Dutch, Polish, Portuguese-Brazilian and Chinese</p> | 142 | |
1362 | 163 | </li> | 143 | </li> |
1363 | 164 | <li> | 144 | <li><p>Flexible configuration parameters allow multiple backups to be performed in parallel, specification of which shares to backup, which directories to backup or not backup, various schedules for full and incremental backups, schedules for email reminders to users and so on. Configuration parameters can be set system-wide or also on a per-PC basis.</p> |
1364 | 165 | <p>No client-side software is needed. On WinXX the standard smb | 145 | |
1365 | 166 | protocol is used to extract backup data. On linux, unix or MacOSX | 146 | </li> |
1366 | 167 | clients, rsync, tar (over ssh/rsh/nfs) or ftp is used to extract | 147 | <li><p>Users are sent periodic email reminders if their PC has not recently been backed up. Email content, timing and policies are configurable.</p> |
1367 | 168 | backup data. Alternatively, rsync can also be used on WinXX (using | 148 | |
1368 | 169 | cygwin), and Samba could be installed on the linux or unix client | 149 | </li> |
1369 | 170 | to provide smb shares).</p> | 150 | <li><p>BackupPC is Open Source software hosted by SourceForge.</p> |
1370 | 171 | </li> | 151 | |
1311 | 172 | <li> | ||
1312 | 173 | <p>Flexible restore options. Single files can be downloaded from | ||
1313 | 174 | any backup directly from the CGI interface. Zip or Tar archives | ||
1314 | 175 | for selected files or directories from any backup can also be | ||
1315 | 176 | downloaded from the CGI interface. Finally, direct restore to | ||
1316 | 177 | the client machine (using smb or tar) for selected files or | ||
1317 | 178 | directories is also supported from the CGI interface.</p> | ||
1318 | 179 | </li> | ||
1319 | 180 | <li> | ||
1320 | 181 | <p>BackupPC supports mobile environments where laptops are only | ||
1321 | 182 | intermittently connected to the network and have dynamic IP addresses | ||
1322 | 183 | (DHCP). Configuration settings allow machines connected via slower WAN | ||
1323 | 184 | connections (eg: dial up, DSL, cable) to not be backed up, even if they | ||
1324 | 185 | use the same fixed or dynamic IP address as when they are connected | ||
1325 | 186 | directly to the LAN.</p> | ||
1326 | 187 | </li> | ||
1327 | 188 | <li> | ||
1328 | 189 | <p>Flexible configuration parameters allow multiple backups to be performed | ||
1329 | 190 | in parallel, specification of which shares to backup, which directories | ||
1330 | 191 | to backup or not backup, various schedules for full and incremental | ||
1331 | 192 | backups, schedules for email reminders to users and so on. Configuration | ||
1332 | 193 | parameters can be set system-wide or also on a per-PC basis.</p> | ||
1333 | 194 | </li> | ||
1334 | 195 | <li> | ||
1335 | 196 | <p>Users are sent periodic email reminders if their PC has not | ||
1336 | 197 | recently been backed up. Email content, timing and policies | ||
1337 | 198 | are configurable.</p> | ||
1338 | 199 | </li> | ||
1339 | 200 | <li> | ||
1340 | 201 | <p>BackupPC is Open Source software hosted by SourceForge.</p> | ||
1371 | 202 | </li> | 152 | </li> |
1372 | 203 | </ul> | 153 | </ul> |
1376 | 204 | <p> | 154 | |
1377 | 205 | </p> | 155 | <h2 id="Backup-basics">Backup basics</h2> |
1378 | 206 | <h2><a name="backup_basics">Backup basics</a></h2> | 156 | |
1379 | 207 | <dl> | 157 | <dl> |
1478 | 208 | <dt><strong><a name="full_backup" class="item">Full Backup</a></strong></dt> | 158 | |
1479 | 209 | 159 | <dt id="Full-Backup">Full Backup</dt> | |
1480 | 210 | <dd> | 160 | <dd> |
1481 | 211 | <p>A full backup is a complete backup of a share. BackupPC can be | 161 | |
1482 | 212 | configured to do a full backup at a regular interval (typically | 162 | <p>A full backup is a complete backup of a share. BackupPC can be configured to do a full backup at a regular interval (typically weekly). BackupPC can be configured to keep a certain number of full backups. Exponential expiry is also supported, allowing full backups with various vintages to be kept (for example, a settable number of most recent weekly fulls, plus a settable number of older fulls that are 2, 4, 8, or 16 weeks apart).</p> |
1483 | 213 | weekly). BackupPC can be configured to keep a certain number | 163 | |
1484 | 214 | of full backups. Exponential expiry is also supported, allowing | 164 | </dd> |
1485 | 215 | full backups with various vintages to be kept (for example, a | 165 | <dt id="Incremental-Backup">Incremental Backup</dt> |
1486 | 216 | settable number of most recent weekly fulls, plus a settable | 166 | <dd> |
1487 | 217 | number of older fulls that are 2, 4, 8, or 16 weeks apart).</p> | 167 | |
1488 | 218 | </dd> | 168 | <p>An incremental backup is a backup of files that have changed since the last successful full or incremental backup. Starting in BackupPC 3.0 multi-level incrementals are supported. A full backup has level 0. A new incremental of level N will backup all files that have changed since the most recent backup of a lower level. <a href="#_conf_incrlevels_">$Conf{IncrLevels}</a> is used to specify the level of each successive incremental. The default value is all level 1, which makes the behavior the same as earlier versions of BackupPC: each incremental will back up all the files that changed since the last full (level 0).</p> |
1489 | 219 | <dt><strong><a name="incremental_backup" class="item">Incremental Backup</a></strong></dt> | 169 | |
1490 | 220 | 170 | <p>For SMB and tar, BackupPC uses the modification time (mtime) to determine which files have changed since the last lower-level backup. That means SMB and tar incrementals are not able to detect deleted files, renamed files or new files whose modification time is prior to the last lower-level backup.</p> | |
1491 | 221 | <dd> | 171 | |
1492 | 222 | <p>An incremental backup is a backup of files that have changed | 172 | <p>Rsync is more clever: any files whose attributes have changed (ie: uid, gid, mtime, modes, size) since the last full are backed up. Deleted, new files and renamed files are detected by Rsync incrementals.</p> |
1493 | 223 | since the last successful full or incremental backup. Starting | 173 | |
1494 | 224 | in BackupPC 3.0 multi-level incrementals are supported. | 174 | <p>BackupPC can also be configured to keep a certain number of incremental backups, and to keep a smaller number of very old incremental backups. If multi-level incrementals are specified then it is likely that more incrementals will need to be kept since lower-level incrementals (and the full backup) are needed to reconstruct a higher-level incremental.</p> |
1495 | 225 | A full backup has level 0. A new incremental of level N will | 175 | |
1496 | 226 | backup all files that have changed since the most recent backup | 176 | <p>BackupPC "fills-in" incremental backups when browsing or restoring, based on the levels of each backup, giving every backup a "full" appearance. This makes browsing and restoring backups much easier: you can restore from any one backup independent of whether it was an incremental or full.</p> |
1497 | 227 | of a lower level. <a href="#_conf_incrlevels_">$Conf{IncrLevels}</a> is used to specify the | 177 | |
1498 | 228 | level of each successive incremental. The default value is | 178 | </dd> |
1499 | 229 | all level 1, which makes the behavior the same as earlier | 179 | <dt id="Partial-Backup">Partial Backup</dt> |
1500 | 230 | versions of BackupPC: each incremental will back up all the | 180 | <dd> |
1501 | 231 | files that changed since the last full (level 0).</p> | 181 | |
1502 | 232 | <p>For SMB and tar, BackupPC uses the modification time (mtime) to | 182 | <p>When a full backup fails or is canceled, and some files have already been backed up, BackupPC keeps a partial backup containing just the files that were backed up successfully. The partial backup is removed when the next successful backup completes, or if another full backup fails resulting in a newer partial backup. A failed full backup that has not backed up any files, or any failed incremental backup, is removed; no partial backup is saved in these cases.</p> |
1503 | 233 | determine which files have changed since the last lower-level | 183 | |
1504 | 234 | backup. That means SMB and tar incrementals are not able to detect | 184 | <p>The partial backup may be browsed or used to restore files just like a successful full or incremental backup.</p> |
1505 | 235 | deleted files, renamed files or new files whose modification time | 185 | |
1506 | 236 | is prior to the last lower-level backup.</p> | 186 | <p>With the rsync transfer method the partial backup is used to resume the next full backup, avoiding the need to retransfer the file data already in the partial backup.</p> |
1507 | 237 | <p>Rsync is more clever: any files whose attributes have changed (ie: uid, | 187 | |
1508 | 238 | gid, mtime, modes, size) since the last full are backed up. Deleted, | 188 | </dd> |
1509 | 239 | new files and renamed files are detected by Rsync incrementals.</p> | 189 | <dt id="Identical-Files">Identical Files</dt> |
1510 | 240 | <p>BackupPC can also be configured to keep a certain number of incremental | 190 | <dd> |
1511 | 241 | backups, and to keep a smaller number of very old incremental backups. | 191 | |
1512 | 242 | If multi-level incrementals are specified then it is likely that | 192 | <p>BackupPC pools identical files using hardlinks. By "identical files" we mean files with identical contents, not necessary the same permissions, ownership or modification time. Two files might have different permissions, ownership, or modification time but will still be pooled whenever the contents are identical. This is possible since BackupPC stores the file meta-data (permissions, ownership, and modification time) separately from the file contents.</p> |
1513 | 243 | more incrementals will need to be kept since lower-level incrementals | 193 | |
1514 | 244 | (and the full backup) are needed to reconstruct a higher-level | 194 | </dd> |
1515 | 245 | incremental.</p> | 195 | <dt id="Backup-Policy">Backup Policy</dt> |
1516 | 246 | <p>BackupPC "fills-in" incremental backups when browsing or restoring, | 196 | <dd> |
1517 | 247 | based on the levels of each backup, giving every backup a "full" | 197 | |
1518 | 248 | appearance. This makes browsing and restoring backups much easier: | 198 | <p>Based on your site's requirements you need to decide what your backup policy is. BackupPC is not designed to provide exact re-imaging of failed disks. See <a>Limitations</a> for more information. However, the addition of tar transport for linux/unix clients, plus full support for special file types and unix attributes in v1.4.0 likely means an exact image of a linux/unix file system can be made.</p> |
1519 | 249 | you can restore from any one backup independent of whether it was | 199 | |
1520 | 250 | an incremental or full.</p> | 200 | <p>BackupPC saves backups onto disk. Because of pooling you can relatively economically keep several weeks of old backups.</p> |
1521 | 251 | </dd> | 201 | |
1522 | 252 | <dt><strong><a name="partial_backup" class="item">Partial Backup</a></strong></dt> | 202 | <p>At some sites the disk-based backup will be adequate, without a secondary tape backup. This system is robust to any single failure: if a client disk fails or loses files, the BackupPC server can be used to restore files. If the server disk fails, BackupPC can be restarted on a fresh file system, and create new backups from the clients. The chance of the server disk failing can be made very small by spending more money on increasingly better RAID systems. However, there is still the risk of catastrophic events like fires or earthquakes that can destroy both the BackupPC server and the clients it is backing up if they are physically nearby.</p> |
1523 | 253 | 203 | ||
1524 | 254 | <dd> | 204 | <p>Some sites might choose to do periodic backups to tape or cd/dvd. This backup can be done perhaps weekly using the archive function of BackupPC.</p> |
1525 | 255 | <p>When a full backup fails or is canceled, and some files have already | 205 | |
1526 | 256 | been backed up, BackupPC keeps a partial backup containing just the | 206 | <p>Other users have reported success with removable disks to rotate the BackupPC data drives, or using rsync to mirror the BackupPC data pool offsite.</p> |
1527 | 257 | files that were backed up successfully. The partial backup is removed | 207 | |
1430 | 258 | when the next successful backup completes, or if another full backup | ||
1431 | 259 | fails resulting in a newer partial backup. A failed full backup | ||
1432 | 260 | that has not backed up any files, or any failed incremental backup, | ||
1433 | 261 | is removed; no partial backup is saved in these cases.</p> | ||
1434 | 262 | <p>The partial backup may be browsed or used to restore files just like | ||
1435 | 263 | a successful full or incremental backup.</p> | ||
1436 | 264 | <p>With the rsync transfer method the partial backup is used to resume | ||
1437 | 265 | the next full backup, avoiding the need to retransfer the file data | ||
1438 | 266 | already in the partial backup.</p> | ||
1439 | 267 | </dd> | ||
1440 | 268 | <dt><strong><a name="identical_files" class="item">Identical Files</a></strong></dt> | ||
1441 | 269 | |||
1442 | 270 | <dd> | ||
1443 | 271 | <p>BackupPC pools identical files using hardlinks. By "identical | ||
1444 | 272 | files" we mean files with identical contents, not necessary the | ||
1445 | 273 | same permissions, ownership or modification time. Two files might | ||
1446 | 274 | have different permissions, ownership, or modification time but | ||
1447 | 275 | will still be pooled whenever the contents are identical. This | ||
1448 | 276 | is possible since BackupPC stores the file meta-data (permissions, | ||
1449 | 277 | ownership, and modification time) separately from the file contents.</p> | ||
1450 | 278 | </dd> | ||
1451 | 279 | <dt><strong><a name="backup_policy" class="item">Backup Policy</a></strong></dt> | ||
1452 | 280 | |||
1453 | 281 | <dd> | ||
1454 | 282 | <p>Based on your site's requirements you need to decide what your backup | ||
1455 | 283 | policy is. BackupPC is not designed to provide exact re-imaging of | ||
1456 | 284 | failed disks. See <a href="#limitations">Limitations</a> for more information. | ||
1457 | 285 | However, the addition of tar transport for linux/unix clients, plus | ||
1458 | 286 | full support for special file types and unix attributes in v1.4.0 | ||
1459 | 287 | likely means an exact image of a linux/unix file system can be made.</p> | ||
1460 | 288 | <p>BackupPC saves backups onto disk. Because of pooling you can relatively | ||
1461 | 289 | economically keep several weeks of old backups.</p> | ||
1462 | 290 | <p>At some sites the disk-based backup will be adequate, without a | ||
1463 | 291 | secondary tape backup. This system is robust to any single failure: if a | ||
1464 | 292 | client disk fails or loses files, the BackupPC server can be used to | ||
1465 | 293 | restore files. If the server disk fails, BackupPC can be restarted on a | ||
1466 | 294 | fresh file system, and create new backups from the clients. The chance | ||
1467 | 295 | of the server disk failing can be made very small by spending more money | ||
1468 | 296 | on increasingly better RAID systems. However, there is still the risk | ||
1469 | 297 | of catastrophic events like fires or earthquakes that can destroy | ||
1470 | 298 | both the BackupPC server and the clients it is backing up if they | ||
1471 | 299 | are physically nearby.</p> | ||
1472 | 300 | <p>Some sites might choose to do periodic backups to tape or cd/dvd. | ||
1473 | 301 | This backup can be done perhaps weekly using the archive function of | ||
1474 | 302 | BackupPC.</p> | ||
1475 | 303 | <p>Other users have reported success with removable disks to rotate the | ||
1476 | 304 | BackupPC data drives, or using rsync to mirror the BackupPC data pool | ||
1477 | 305 | offsite.</p> | ||
1528 | 306 | </dd> | 208 | </dd> |
1529 | 307 | </dl> | 209 | </dl> |
1533 | 308 | <p> | 210 | |
1534 | 309 | </p> | 211 | <h2 id="Resources">Resources</h2> |
1535 | 310 | <h2><a name="resources">Resources</a></h2> | 212 | |
1536 | 311 | <dl> | 213 | <dl> |
1537 | 312 | <dt><strong><a name="backuppc_home_page" class="item">BackupPC home page</a></strong></dt> | ||
1538 | 313 | 214 | ||
1539 | 215 | <dt id="BackupPC-home-page">BackupPC home page</dt> | ||
1540 | 314 | <dd> | 216 | <dd> |
1547 | 315 | <p>The BackupPC Open Source project is hosted on SourceForge. The | 217 | |
1548 | 316 | home page can be found at:</p> | 218 | <p>The BackupPC Open Source project is hosted on SourceForge. The home page can be found at:</p> |
1549 | 317 | <pre> | 219 | |
1550 | 318 | <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a></pre> | 220 | <pre><code> http://backuppc.sourceforge.net</code></pre> |
1551 | 319 | <p>This page has links to the current documentation, the SourceForge | 221 | |
1552 | 320 | project page and general information.</p> | 222 | <p>This page has links to the current documentation, the SourceForge project page and general information.</p> |
1553 | 223 | |||
1554 | 321 | </dd> | 224 | </dd> |
1556 | 322 | <dt><strong><a name="sourceforge_project" class="item">SourceForge project</a></strong></dt> | 225 | <dt id="SourceForge-project">SourceForge project</dt> |
1557 | 226 | <dd> | ||
1558 | 323 | 227 | ||
1559 | 324 | <dd> | ||
1560 | 325 | <p>The SourceForge project page is at:</p> | 228 | <p>The SourceForge project page is at:</p> |
1563 | 326 | <pre> | 229 | |
1564 | 327 | <a href="http://sourceforge.net/projects/backuppc">http://sourceforge.net/projects/backuppc</a></pre> | 230 | <pre><code> http://sourceforge.net/projects/backuppc</code></pre> |
1565 | 231 | |||
1566 | 328 | <p>This page has links to the current releases of BackupPC.</p> | 232 | <p>This page has links to the current releases of BackupPC.</p> |
1589 | 329 | </dd> | 233 | |
1590 | 330 | <dt><strong><a name="backuppc_wiki" class="item">BackupPC Wiki</a></strong></dt> | 234 | </dd> |
1591 | 331 | 235 | <dt id="BackupPC-Wiki">BackupPC Wiki</dt> | |
1592 | 332 | <dd> | 236 | <dd> |
1593 | 333 | <p>BackupPC has a Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a>. | 237 | |
1594 | 334 | Everyone is encouraged to contribute to the Wiki. Anyone with | 238 | <p>BackupPC has a Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a>. Everyone is encouraged to contribute to the Wiki. Anyone with a SourceForge account can edit the Wiki.</p> |
1595 | 335 | a SourceForge account can edit the Wiki.</p> | 239 | |
1596 | 336 | <p>The old FAQ is at <a href="http://backuppc.sourceforge.net/faq">http://backuppc.sourceforge.net/faq</a>, but | 240 | <p>The old FAQ is at <a href="http://backuppc.sourceforge.net/faq">http://backuppc.sourceforge.net/faq</a>, but is deprecated in favor of the Wiki.</p> |
1597 | 337 | is deprecated in favor of the Wiki.</p> | 241 | |
1598 | 338 | </dd> | 242 | </dd> |
1599 | 339 | <dt><strong><a name="mailing_lists" class="item">Mailing lists</a></strong></dt> | 243 | <dt id="Mailing-lists">Mailing lists</dt> |
1600 | 340 | 244 | <dd> | |
1601 | 341 | <dd> | 245 | |
1602 | 342 | <p>Three BackupPC mailing lists exist for announcements (backuppc-announce), | 246 | <p>Three BackupPC mailing lists exist for announcements (backuppc-announce), developers (backuppc-devel), and a general user list for support, asking questions or any other topic relevant to BackupPC (backuppc-users).</p> |
1603 | 343 | developers (backuppc-devel), and a general user list for support, asking | 247 | |
1604 | 344 | questions or any other topic relevant to BackupPC (backuppc-users).</p> | 248 | <p>The lists are archived on SourceForge and Gmane. The SourceForge lists are not always up to date and the searching is limited, so Gmane is a good alternative. See:</p> |
1605 | 345 | <p>The lists are archived on SourceForge and Gmane. The SourceForge lists | 249 | |
1606 | 346 | are not always up to date and the searching is limited, so Gmane is | 250 | <pre><code> http://news.gmane.org/index.php?prefix=gmane.comp.sysutils.backup.backuppc |
1607 | 347 | a good alternative. See:</p> | 251 | http://sourceforge.net/mailarchive/forum.php?forum=backuppc-users</code></pre> |
1608 | 348 | <pre> | 252 | |
1587 | 349 | <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> | ||
1588 | 350 | <a href="http://sourceforge.net/mailarchive/forum.php?forum=backuppc-users">http://sourceforge.net/mailarchive/forum.php?forum=backuppc-users</a></pre> | ||
1609 | 351 | <p>You can subscribe to these lists by visiting:</p> | 253 | <p>You can subscribe to these lists by visiting:</p> |
1622 | 352 | <pre> | 254 | |
1623 | 353 | <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-announce">http://lists.sourceforge.net/lists/listinfo/backuppc-announce</a> | 255 | <pre><code> http://lists.sourceforge.net/lists/listinfo/backuppc-announce |
1624 | 354 | <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-users">http://lists.sourceforge.net/lists/listinfo/backuppc-users</a> | 256 | http://lists.sourceforge.net/lists/listinfo/backuppc-users |
1625 | 355 | <a href="http://lists.sourceforge.net/lists/listinfo/backuppc-devel">http://lists.sourceforge.net/lists/listinfo/backuppc-devel</a></pre> | 257 | http://lists.sourceforge.net/lists/listinfo/backuppc-devel</code></pre> |
1626 | 356 | <p>The backuppc-announce list is moderated and is used only for | 258 | |
1627 | 357 | important announcements (eg: new versions). It is low traffic. | 259 | <p>The backuppc-announce list is moderated and is used only for important announcements (eg: new versions). It is low traffic. You only need to subscribe to one of backuppc-announce and backuppc-users: backuppc-users also receives any messages on backuppc-announce.</p> |
1628 | 358 | You only need to subscribe to one of backuppc-announce and | 260 | |
1629 | 359 | backuppc-users: backuppc-users also receives any messages on | 261 | <p>The backuppc-devel list is only for developers who are working on BackupPC. Do not post questions or support requests there. But detailed technical discussions should happen on this list.</p> |
1630 | 360 | backuppc-announce.</p> | 262 | |
1619 | 361 | <p>The backuppc-devel list is only for developers who are working on BackupPC. | ||
1620 | 362 | Do not post questions or support requests there. But detailed technical | ||
1621 | 363 | discussions should happen on this list.</p> | ||
1631 | 364 | <p>To post a message to the backuppc-users list, send an email to</p> | 263 | <p>To post a message to the backuppc-users list, send an email to</p> |
1634 | 365 | <pre> | 264 | |
1635 | 366 | backuppc-users@lists.sourceforge.net</pre> | 265 | <pre><code> backuppc-users@lists.sourceforge.net</code></pre> |
1636 | 266 | |||
1637 | 367 | <p>Do not send subscription requests to this address!</p> | 267 | <p>Do not send subscription requests to this address!</p> |
1638 | 268 | |||
1639 | 368 | </dd> | 269 | </dd> |
1642 | 369 | <dt><strong><a name="other_programs_of_interest" class="item">Other Programs of Interest</a></strong></dt> | 270 | <dt id="Other-Programs-of-Interest">Other Programs of Interest</dt> |
1641 | 370 | |||
1643 | 371 | <dd> | 271 | <dd> |
1668 | 372 | <p>If you want to mirror linux or unix files or directories to a remote server | 272 | |
1669 | 373 | you should use rsync, <a href="http://rsync.samba.org">http://rsync.samba.org</a>. BackupPC uses | 273 | <p>If you want to mirror linux or unix files or directories to a remote server you should use rsync, <a href="http://rsync.samba.org">http://rsync.samba.org</a>. BackupPC uses rsync as a transport mechanism; if you are already an rsync user you can think of BackupPC as adding efficient storage (compression and pooling) and a convenient user interface to rsync.</p> |
1670 | 374 | rsync as a transport mechanism; if you are already an rsync user you | 274 | |
1671 | 375 | can think of BackupPC as adding efficient storage (compression and | 275 | <p>Two popular open source packages that do tape backup are Amanda (<a href="http://www.amanda.org">http://www.amanda.org</a>) and Bacula (<a href="http://www.bacula.org">http://www.bacula.org</a>). These packages can be used as complete solutions, or also as back ends to BackupPC to backup the BackupPC server data to tape.</p> |
1672 | 376 | pooling) and a convenient user interface to rsync.</p> | 276 | |
1673 | 377 | <p>Two popular open source packages that do tape backup are | 277 | <p>Various programs and scripts use rsync to provide hardlinked backups. See, for example, Mike Rubel's site (<a href="http://www.mikerubel.org/computers/rsync_snapshots">http://www.mikerubel.org/computers/rsync_snapshots</a>), JW Schultz's dirvish (<a href="http://www.dirvish.org/">http://www.dirvish.org/</a>), Ben Escoto's rdiff-backup (<a href="http://www.nongnu.org/rdiff-backup">http://www.nongnu.org/rdiff-backup</a>), and John Bowman's rlbackup (<a href="http://www.math.ualberta.ca/imaging/rlbackup">http://www.math.ualberta.ca/imaging/rlbackup</a>).</p> |
1674 | 378 | Amanda (<a href="http://www.amanda.org">http://www.amanda.org</a>) | 278 | |
1675 | 379 | and Bacula (<a href="http://www.bacula.org">http://www.bacula.org</a>). | 279 | <p>Unison is a utility that can do two-way, interactive, synchronization. See <a href="http://freshmeat.net/projects/unison">http://freshmeat.net/projects/unison</a>. An external wrapper around rsync that maintains transfer data to enable two-way synchronization is drsync; see <a href="http://freshmeat.net/projects/drsync">http://freshmeat.net/projects/drsync</a>.</p> |
1676 | 380 | These packages can be used as complete solutions, or also as back | 280 | |
1677 | 381 | ends to BackupPC to backup the BackupPC server data to tape.</p> | 281 | <p>BackupPC provides many additional features, such as compressed storage, hardlinking any matching files (rather than just files with the same name), and storing special files without root privileges. But these other programs provide simple, effective and fast solutions and are definitely worthy of consideration.</p> |
1678 | 382 | <p>Various programs and scripts use rsync to provide hardlinked backups. | 282 | |
1655 | 383 | See, for example, Mike Rubel's site (<a href="http://www.mikerubel.org/computers/rsync_snapshots">http://www.mikerubel.org/computers/rsync_snapshots</a>), | ||
1656 | 384 | JW Schultz's dirvish (<a href="http://www.dirvish.org/">http://www.dirvish.org/</a>), | ||
1657 | 385 | Ben Escoto's rdiff-backup (<a href="http://www.nongnu.org/rdiff-backup">http://www.nongnu.org/rdiff-backup</a>), | ||
1658 | 386 | and John Bowman's rlbackup (<a href="http://www.math.ualberta.ca/imaging/rlbackup">http://www.math.ualberta.ca/imaging/rlbackup</a>).</p> | ||
1659 | 387 | <p>Unison is a utility that can do two-way, interactive, synchronization. | ||
1660 | 388 | See <a href="http://freshmeat.net/projects/unison">http://freshmeat.net/projects/unison</a>. An external wrapper around | ||
1661 | 389 | rsync that maintains transfer data to enable two-way synchronization is | ||
1662 | 390 | drsync; see <a href="http://freshmeat.net/projects/drsync">http://freshmeat.net/projects/drsync</a>.</p> | ||
1663 | 391 | <p>BackupPC provides many additional features, such as compressed storage, | ||
1664 | 392 | hardlinking any matching files (rather than just files with the same name), | ||
1665 | 393 | and storing special files without root privileges. But these other programs | ||
1666 | 394 | provide simple, effective and fast solutions and are definitely worthy of | ||
1667 | 395 | consideration.</p> | ||
1679 | 396 | </dd> | 283 | </dd> |
1680 | 397 | </dl> | 284 | </dl> |
1686 | 398 | <p> | 285 | |
1687 | 399 | </p> | 286 | <h2 id="Road-map">Road map</h2> |
1688 | 400 | <h2><a name="road_map">Road map</a></h2> | 287 | |
1689 | 401 | <p>The new features planned for future releases of BackupPC | 288 | <p>The new features planned for future releases of BackupPC are on the Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a>.</p> |
1690 | 402 | are on the Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a>.</p> | 289 | |
1691 | 403 | <p>Comments and suggestions are welcome.</p> | 290 | <p>Comments and suggestions are welcome.</p> |
1715 | 404 | <p> | 291 | |
1716 | 405 | </p> | 292 | <h2 id="You-can-help">You can help</h2> |
1717 | 406 | <h2><a name="you_can_help">You can help</a></h2> | 293 | |
1718 | 407 | <p>BackupPC is free. I work on BackupPC because I enjoy doing it and I like | 294 | <p>BackupPC is free. I work on BackupPC because I enjoy doing it and I like to contribute to the open source community.</p> |
1719 | 408 | to contribute to the open source community.</p> | 295 | |
1720 | 409 | <p>BackupPC already has more than enough features for my own needs. The | 296 | <p>BackupPC already has more than enough features for my own needs. The main compensation for continuing to work on BackupPC is knowing that more and more people find it useful. So feedback is certainly appreciated, both positive and negative.</p> |
1721 | 410 | main compensation for continuing to work on BackupPC is knowing that | 297 | |
1722 | 411 | more and more people find it useful. So feedback is certainly | 298 | <p>Beyond being a satisfied user and telling other people about it, everyone is encouraged to add links to <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a> (I'll see them via Google) or otherwise publicize BackupPC. Unlike the commercial products in this space, I have a zero budget (in both time and money) for marketing, PR and advertising, so it's up to all of you! Feel free to vote for BackupPC at <a href="http://freshmeat.net/projects/backuppc">http://freshmeat.net/projects/backuppc</a>.</p> |
1723 | 412 | appreciated, both positive and negative.</p> | 299 | |
1724 | 413 | <p>Beyond being a satisfied user and telling other people about it, everyone | 300 | <p>Also, everyone is encouraged to contribute patches, bug reports, feature and design suggestions, new code, Wiki additions (you can do those directly) and documentation corrections or improvements. Answering questions on the mailing list is a big help too.</p> |
1725 | 414 | is encouraged to add links to <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a> | 301 | |
1703 | 415 | (I'll see them via Google) or otherwise publicize BackupPC. Unlike | ||
1704 | 416 | the commercial products in this space, I have a zero budget (in both | ||
1705 | 417 | time and money) for marketing, PR and advertising, so it's up to | ||
1706 | 418 | all of you! Feel free to vote for BackupPC at | ||
1707 | 419 | <a href="http://freshmeat.net/projects/backuppc">http://freshmeat.net/projects/backuppc</a>.</p> | ||
1708 | 420 | <p>Also, everyone is encouraged to contribute patches, bug reports, | ||
1709 | 421 | feature and design suggestions, new code, Wiki additions (you can | ||
1710 | 422 | do those directly) and documentation corrections or improvements. | ||
1711 | 423 | Answering questions on the mailing list is a big help too.</p> | ||
1712 | 424 | <p> | ||
1713 | 425 | <a href="#__index__"><small>Back to Top</small></a> | ||
1714 | 426 | </p> | ||
1726 | 427 | <hr /> | 302 | <hr /> |
1731 | 428 | <h1><a name="installing_backuppc">Installing BackupPC</a></h1> | 303 | <h1 id="Installing-BackupPC">Installing BackupPC</h1> |
1732 | 429 | <p> | 304 | |
1733 | 430 | </p> | 305 | <h2 id="Requirements">Requirements</h2> |
1734 | 431 | <h2><a name="requirements">Requirements</a></h2> | 306 | |
1735 | 432 | <p>BackupPC requires:</p> | 307 | <p>BackupPC requires:</p> |
1736 | 308 | |||
1737 | 433 | <ul> | 309 | <ul> |
1804 | 434 | <li> | 310 | |
1805 | 435 | <p>A linux, solaris, or unix based server with a substantial amount of free | 311 | <li><p>A linux, solaris, or unix based server with a substantial amount of free disk space (see the next section for what that means). The CPU and disk performance on this server will determine how many simultaneous backups you can run. You should be able to run 4-8 simultaneous backups on a moderately configured server.</p> |
1806 | 436 | disk space (see the next section for what that means). The CPU and disk | 312 | |
1807 | 437 | performance on this server will determine how many simultaneous backups | 313 | <p>Several users have reported significantly better performance using reiserfs compared to ext3 for the BackupPC data file system. It is also recommended you consider either an LVM or RAID setup (either in HW or SW; eg: 3Ware RAID10 or RAID5) so that you can expand the file system as necessary.</p> |
1808 | 438 | you can run. You should be able to run 4-8 simultaneous backups on a | 314 | |
1809 | 439 | moderately configured server.</p> | 315 | <p>When BackupPC starts with an empty pool, all the backup data will be written to the pool on disk. After more backups are done, a higher percentage of incoming files will already be in the pool. BackupPC is able to avoid writing to disk new files that are already in the pool. So over time disk writes will reduce significantly (by perhaps a factor of 20 or more), since eventually 95% or more of incoming backup files are typically in the pool. Disk reads from the pool are still needed to do file compares to verify files are an exact match. So, with a mature pool, if a relatively fast client generates data at say 1MB/sec, and you run 4 simultaneous backups, there will be an average server disk load of about 4MB/sec reads and 0.2MB/sec writes (assuming 95% of the incoming files are in the pool). These rates will be perhaps 40% lower if compression is on.</p> |
1810 | 440 | <p>Several users have reported significantly better performance using | 316 | |
1811 | 441 | reiserfs compared to ext3 for the BackupPC data file system. It is | 317 | </li> |
1812 | 442 | also recommended you consider either an LVM or RAID setup (either | 318 | <li><p>Perl version 5.8.0 or later. If you don't have perl, please see <a href="http://www.cpan.org">http://www.cpan.org</a>.</p> |
1813 | 443 | in HW or SW; eg: 3Ware RAID10 or RAID5) so that you can expand the | 319 | |
1814 | 444 | file system as necessary.</p> | 320 | </li> |
1815 | 445 | <p>When BackupPC starts with an empty pool, all the backup data will be | 321 | <li><p>Perl modules Compress::Zlib, Archive::Zip and File::RsyncP. Try "perldoc Compress::Zlib" and "perldoc Archive::Zip" to see if you have these modules. If not, fetch them from <a href="http://www.cpan.org">http://www.cpan.org</a> and see the instructions below for how to build and install them.</p> |
1816 | 446 | written to the pool on disk. After more backups are done, a higher | 322 | |
1817 | 447 | percentage of incoming files will already be in the pool. BackupPC is | 323 | <p>The File::RsyncP module is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a> or CPAN. You'll need to install the File::RsyncP module if you want to use Rsync as a transport method.</p> |
1818 | 448 | able to avoid writing to disk new files that are already in the pool. | 324 | |
1819 | 449 | So over time disk writes will reduce significantly (by perhaps a factor | 325 | </li> |
1820 | 450 | of 20 or more), since eventually 95% or more of incoming backup files | 326 | <li><p>If you are using smb to backup WinXX machines you need smbclient and nmblookup from the samba package. You will also need nmblookup if you are backing up linux/unix DHCP machines. See <a href="http://www.samba.org">http://www.samba.org</a>. Samba versions 3.x are stable and now recommended instead of 2.x.</p> |
1821 | 451 | are typically in the pool. Disk reads from the pool are still needed to | 327 | |
1822 | 452 | do file compares to verify files are an exact match. So, with a mature | 328 | <p>See <a href="http://www.samba.org">http://www.samba.org</a> for source and binaries. It's pretty easy to fetch and compile samba, and just grab smbclient and nmblookup, without doing the installation. Alternatively, <a href="http://www.samba.org">http://www.samba.org</a> has binary distributions for most platforms.</p> |
1823 | 453 | pool, if a relatively fast client generates data at say 1MB/sec, and you | 329 | |
1824 | 454 | run 4 simultaneous backups, there will be an average server disk load of | 330 | </li> |
1825 | 455 | about 4MB/sec reads and 0.2MB/sec writes (assuming 95% of the incoming | 331 | <li><p>If you are using tar to backup linux/unix machines, those machines should have version 1.13.7 at a minimum, with version 1.13.20 or higher recommended. Use "tar --version" to check your version. Various GNU mirrors have the newest versions of tar; see <a href="http://www.gnu.org/software/tar/">http://www.gnu.org/software/tar/</a>.</p> |
1826 | 456 | files are in the pool). These rates will be perhaps 40% lower if | 332 | |
1827 | 457 | compression is on.</p> | 333 | </li> |
1828 | 458 | </li> | 334 | <li><p>If you are using rsync to backup linux/unix machines you should have version 2.6.3 or higher on each client machine. See <a href="http://rsync.samba.org">http://rsync.samba.org</a>. Use "rsync --version" to check your version.</p> |
1829 | 459 | <li> | 335 | |
1830 | 460 | <p>Perl version 5.8.0 or later. If you don't have perl, please | 336 | <p>For BackupPC to use Rsync you will also need to install the perl File::RsyncP module, which is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>. Version 0.68 or later is required.</p> |
1831 | 461 | see <a href="http://www.cpan.org">http://www.cpan.org</a>.</p> | 337 | |
1832 | 462 | </li> | 338 | </li> |
1833 | 463 | <li> | 339 | <li><p>The Apache web server, see <a href="http://www.apache.org">http://www.apache.org</a>, preferably built with mod_perl support.</p> |
1834 | 464 | <p>Perl modules Compress::Zlib, Archive::Zip and File::RsyncP. Try "perldoc | 340 | |
1769 | 465 | Compress::Zlib" and "perldoc Archive::Zip" to see if you have these | ||
1770 | 466 | modules. If not, fetch them from <a href="http://www.cpan.org">http://www.cpan.org</a> and see the | ||
1771 | 467 | instructions below for how to build and install them.</p> | ||
1772 | 468 | <p>The File::RsyncP module is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a> | ||
1773 | 469 | or CPAN. You'll need to install the File::RsyncP module if you want to use | ||
1774 | 470 | Rsync as a transport method.</p> | ||
1775 | 471 | </li> | ||
1776 | 472 | <li> | ||
1777 | 473 | <p>If you are using smb to backup WinXX machines you need smbclient and | ||
1778 | 474 | nmblookup from the samba package. You will also need nmblookup if | ||
1779 | 475 | you are backing up linux/unix DHCP machines. See <a href="http://www.samba.org">http://www.samba.org</a>. | ||
1780 | 476 | Samba versions 3.x are stable and now recommended instead of 2.x.</p> | ||
1781 | 477 | <p>See <a href="http://www.samba.org">http://www.samba.org</a> for source and binaries. It's pretty easy to | ||
1782 | 478 | fetch and compile samba, and just grab smbclient and nmblookup, without | ||
1783 | 479 | doing the installation. Alternatively, <a href="http://www.samba.org">http://www.samba.org</a> has binary | ||
1784 | 480 | distributions for most platforms.</p> | ||
1785 | 481 | </li> | ||
1786 | 482 | <li> | ||
1787 | 483 | <p>If you are using tar to backup linux/unix machines, those machines should have | ||
1788 | 484 | version 1.13.7 at a minimum, with version 1.13.20 or higher recommended. Use | ||
1789 | 485 | "tar --version" to check your version. Various GNU mirrors have the newest | ||
1790 | 486 | versions of tar; see <a href="http://www.gnu.org/software/tar/">http://www.gnu.org/software/tar/</a>.</p> | ||
1791 | 487 | </li> | ||
1792 | 488 | <li> | ||
1793 | 489 | <p>If you are using rsync to backup linux/unix machines you should have | ||
1794 | 490 | version 2.6.3 or higher on each client machine. See | ||
1795 | 491 | <a href="http://rsync.samba.org">http://rsync.samba.org</a>. Use "rsync --version" to check your version.</p> | ||
1796 | 492 | <p>For BackupPC to use Rsync you will also need to install the perl | ||
1797 | 493 | File::RsyncP module, which is available from | ||
1798 | 494 | <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>. | ||
1799 | 495 | Version 0.68 or later is required.</p> | ||
1800 | 496 | </li> | ||
1801 | 497 | <li> | ||
1802 | 498 | <p>The Apache web server, see <a href="http://www.apache.org">http://www.apache.org</a>, preferably built | ||
1803 | 499 | with mod_perl support.</p> | ||
1835 | 500 | </li> | 341 | </li> |
1836 | 501 | </ul> | 342 | </ul> |
1931 | 502 | <p> | 343 | |
1932 | 503 | </p> | 344 | <h2 id="What-type-of-storage-space-do-I-need-">What type of storage space do I need?</h2> |
1933 | 504 | <h2><a name="what_type_of_storage_space_do_i_need">What type of storage space do I need?</a></h2> | 345 | |
1934 | 505 | <p>BackupPC uses hardlinks to pool files common to different backups. | 346 | <p>BackupPC uses hardlinks to pool files common to different backups. Therefore BackupPC's data store (__TOPDIR__) must point to a single file system that supports hardlinks. You cannot split this file system with multiple mount points or using symbolic links to point a sub-directory to a different file system (it is ok to use a single symbolic link at the top-level directory (__TOPDIR__) to point the entire data store somewhere else). You can of course use any kind of RAID system or logical volume manager that combines the capacity of multiple disks into a single, larger, file system. Such approaches have the advantage that the file system can be expanded without having to copy it.</p> |
1935 | 506 | Therefore BackupPC's data store (__TOPDIR__) must point to a single | 347 | |
1936 | 507 | file system that supports hardlinks. You cannot split this file | 348 | <p>Any standard linux or unix file system supports hardlinks. NFS mounted file systems work too (provided the underlying file system supports hardlinks). But windows based FAT and NTFS file systems will not work.</p> |
1937 | 508 | system with multiple mount points or using symbolic links to point a | 349 | |
1938 | 509 | sub-directory to a different file system (it is ok to use a single | 350 | <p>Starting with BackupPC 3.1.0, run-time checks are done at startup and at the start of each backup to ensure that the file system can support hardlinks, since this is a common area of configuration problems.</p> |
1939 | 510 | symbolic link at the top-level directory (__TOPDIR__) to point the | 351 | |
1940 | 511 | entire data store somewhere else). You can of course use any kind of | 352 | <h2 id="How-much-disk-space-do-I-need-">How much disk space do I need?</h2> |
1941 | 512 | RAID system or logical volume manager that combines the capacity of | 353 | |
1942 | 513 | multiple disks into a single, larger, file system. Such approaches | 354 | <p>Here's one real example for an environment that is backing up 65 laptops with compression off. Each full backup averages 3.2GB. Each incremental backup averages about 0.2GB. Storing one full backup and two incremental backups per laptop is around 240GB of raw data. But because of the pooling of identical files, only 87GB is used. This is without compression.</p> |
1943 | 514 | have the advantage that the file system can be expanded without having | 355 | |
1944 | 515 | to copy it.</p> | 356 | <p>Another example, with compression on: backing up 95 laptops, where each backup averages 3.6GB and each incremental averages about 0.3GB. Keeping three weekly full backups, and six incrementals is around 1200GB of raw data. Because of pooling and compression, only 150GB is needed.</p> |
1945 | 516 | <p>Any standard linux or unix file system supports hardlinks. NFS mounted | 357 | |
1946 | 517 | file systems work too (provided the underlying file system supports | 358 | <p>Here's a rule of thumb. Add up the disk usage of all the machines you want to backup (210GB in the first example above). This is a rough minimum space estimate that should allow a couple of full backups and at least half a dozen incremental backups per machine. If compression is on you can reduce the storage requirements by maybe 30-40%. Add some margin in case you add more machines or decide to keep more old backups.</p> |
1947 | 518 | hardlinks). But windows based FAT and NTFS file systems will not work.</p> | 359 | |
1948 | 519 | <p>Starting with BackupPC 3.1.0, run-time checks are done at startup and | 360 | <p>Your actual mileage will depend upon the types of clients, operating systems and applications you have. The more uniform the clients and applications the bigger the benefit from pooling common files.</p> |
1949 | 520 | at the start of each backup to ensure that the file system can support | 361 | |
1950 | 521 | hardlinks, since this is a common area of configuration problems.</p> | 362 | <p>For example, the Eudora email tool stores each mail folder in a separate file, and attachments are extracted as separate files. So in the sadly common case of a large attachment emailed to many recipients, Eudora will extract the attachment into a new file. When these machines are backed up, only one copy of the file will be stored on the server, even though the file appears in many different full or incremental backups. In this sense Eudora is a "friendly" application from the point of view of backup storage requirements.</p> |
1951 | 522 | <p> | 363 | |
1952 | 523 | </p> | 364 | <p>An example at the other end of the spectrum is Outlook. Everything (email bodies, attachments, calendar, contact lists) is stored in a single file, which often becomes huge. Any change to this file requires a separate copy of the file to be saved during backup. Outlook is even more troublesome, since it keeps this file locked all the time, so it cannot be read by smbclient whenever Outlook is running. See the <a>Limitations</a> section for more discussion of this problem.</p> |
1953 | 524 | <h2><a name="how_much_disk_space_do_i_need">How much disk space do I need?</a></h2> | 365 | |
1954 | 525 | <p>Here's one real example for an environment that is backing up 65 laptops | 366 | <p>In addition to total disk space, you should make sure you have plenty of inodes on your BackupPC data partition. Some users have reported running out of inodes on their BackupPC data partition. So even if you have plenty of disk space, BackupPC will report failures when the inodes are exhausted. This is a particular problem with ext2/ext3 file systems that have a fixed number of inodes when the file system is built. Use "df -i" to see your inode usage.</p> |
1955 | 526 | with compression off. Each full backup averages 3.2GB. Each incremental | 367 | |
1956 | 527 | backup averages about 0.2GB. Storing one full backup and two incremental | 368 | <h2 id="Step-1:-Getting-BackupPC">Step 1: Getting BackupPC</h2> |
1957 | 528 | backups per laptop is around 240GB of raw data. But because of the | 369 | |
1958 | 529 | pooling of identical files, only 87GB is used. This is without | 370 | <p>Some linux distributions now include BackupPC. The Debian distribution, supported by Ludovic Drolez, can be found at <a href="http://packages.debian.org/backuppc">http://packages.debian.org/backuppc</a> and is included in the current stable Debian release. On Debian, BackupPC can be installed with the command:</p> |
1959 | 530 | compression.</p> | 371 | |
1960 | 531 | <p>Another example, with compression on: backing up 95 laptops, where | 372 | <pre><code> apt-get install backuppc</code></pre> |
1961 | 532 | each backup averages 3.6GB and each incremental averages about 0.3GB. | 373 | |
1962 | 533 | Keeping three weekly full backups, and six incrementals is around | 374 | <p>In the future there might be packages for Gentoo and other linux flavors. If the packaged version is older than the released version then you may want to install the latest version as described below.</p> |
1963 | 534 | 1200GB of raw data. Because of pooling and compression, only 150GB | 375 | |
1964 | 535 | is needed.</p> | 376 | <p>Otherwise, manually fetching and installing BackupPC is easy. Start by downloading the latest version from <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. Hit the "Code" button, then select the "backuppc" or "backuppc-beta" package and download the latest version.</p> |
1965 | 536 | <p>Here's a rule of thumb. Add up the disk usage of all the machines you | 377 | |
1966 | 537 | want to backup (210GB in the first example above). This is a rough | 378 | <h2 id="Step-2:-Installing-the-distribution">Step 2: Installing the distribution</h2> |
1967 | 538 | minimum space estimate that should allow a couple of full backups and at | 379 | |
1968 | 539 | least half a dozen incremental backups per machine. If compression is on | 380 | <p>Note: most information in this step is only relevant if you build and install BackupPC yourself. If you use a package provided by a distribution, the package management system should take of installing any needed dependencies.</p> |
1969 | 540 | you can reduce the storage requirements by maybe 30-40%. Add some margin | 381 | |
1970 | 541 | in case you add more machines or decide to keep more old backups.</p> | 382 | <p>First off, there are five perl modules you should install. These are all optional, but highly recommended:</p> |
1971 | 542 | <p>Your actual mileage will depend upon the types of clients, operating | 383 | |
1878 | 543 | systems and applications you have. The more uniform the clients and | ||
1879 | 544 | applications the bigger the benefit from pooling common files.</p> | ||
1880 | 545 | <p>For example, the Eudora email tool stores each mail folder in a separate | ||
1881 | 546 | file, and attachments are extracted as separate files. So in the sadly | ||
1882 | 547 | common case of a large attachment emailed to many recipients, Eudora | ||
1883 | 548 | will extract the attachment into a new file. When these machines are | ||
1884 | 549 | backed up, only one copy of the file will be stored on the server, even | ||
1885 | 550 | though the file appears in many different full or incremental backups. In | ||
1886 | 551 | this sense Eudora is a "friendly" application from the point of view of | ||
1887 | 552 | backup storage requirements.</p> | ||
1888 | 553 | <p>An example at the other end of the spectrum is Outlook. Everything | ||
1889 | 554 | (email bodies, attachments, calendar, contact lists) is stored in a | ||
1890 | 555 | single file, which often becomes huge. Any change to this file requires | ||
1891 | 556 | a separate copy of the file to be saved during backup. Outlook is even | ||
1892 | 557 | more troublesome, since it keeps this file locked all the time, so it | ||
1893 | 558 | cannot be read by smbclient whenever Outlook is running. See the | ||
1894 | 559 | <a href="#limitations">Limitations</a> section for more discussion of this problem.</p> | ||
1895 | 560 | <p>In addition to total disk space, you should make sure you have | ||
1896 | 561 | plenty of inodes on your BackupPC data partition. Some users have | ||
1897 | 562 | reported running out of inodes on their BackupPC data partition. | ||
1898 | 563 | So even if you have plenty of disk space, BackupPC will report | ||
1899 | 564 | failures when the inodes are exhausted. This is a particular | ||
1900 | 565 | problem with ext2/ext3 file systems that have a fixed number of | ||
1901 | 566 | inodes when the file system is built. Use "df -i" to see your | ||
1902 | 567 | inode usage.</p> | ||
1903 | 568 | <p> | ||
1904 | 569 | </p> | ||
1905 | 570 | <h2><a name="step_1__getting_backuppc">Step 1: Getting BackupPC</a></h2> | ||
1906 | 571 | <p>Some linux distributions now include BackupPC. The Debian | ||
1907 | 572 | distribution, supported by Ludovic Drolez, can be found at | ||
1908 | 573 | <a href="http://packages.debian.org/backuppc">http://packages.debian.org/backuppc</a> and is included | ||
1909 | 574 | in the current stable Debian release. On Debian, BackupPC can | ||
1910 | 575 | be installed with the command:</p> | ||
1911 | 576 | <pre> | ||
1912 | 577 | apt-get install backuppc</pre> | ||
1913 | 578 | <p>In the future there might be packages for Gentoo and other | ||
1914 | 579 | linux flavors. If the packaged version is older than the | ||
1915 | 580 | released version then you may want to install the | ||
1916 | 581 | latest version as described below.</p> | ||
1917 | 582 | <p>Otherwise, manually fetching and installing BackupPC is easy. | ||
1918 | 583 | Start by downloading the latest version from | ||
1919 | 584 | <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. Hit the "Code" button, | ||
1920 | 585 | then select the "backuppc" or "backuppc-beta" package and | ||
1921 | 586 | download the latest version.</p> | ||
1922 | 587 | <p> | ||
1923 | 588 | </p> | ||
1924 | 589 | <h2><a name="step_2__installing_the_distribution">Step 2: Installing the distribution</a></h2> | ||
1925 | 590 | <p>Note: most information in this step is only relevant if you build | ||
1926 | 591 | and install BackupPC yourself. If you use a package provided by a | ||
1927 | 592 | distribution, the package management system should take of installing | ||
1928 | 593 | any needed dependencies.</p> | ||
1929 | 594 | <p>First off, there are five perl modules you should install. | ||
1930 | 595 | These are all optional, but highly recommended:</p> | ||
1972 | 596 | <dl> | 384 | <dl> |
2011 | 597 | <dt><strong><a name="compress_zlib" class="item">Compress::Zlib</a></strong></dt> | 385 | |
2012 | 598 | 386 | <dt id="Compress::Zlib">Compress::Zlib</dt> | |
2013 | 599 | <dd> | 387 | <dd> |
2014 | 600 | <p>To enable compression, you will need to install Compress::Zlib | 388 | |
2015 | 601 | from <a href="http://www.cpan.org">http://www.cpan.org</a>. | 389 | <p>To enable compression, you will need to install Compress::Zlib from <a href="http://www.cpan.org">http://www.cpan.org</a>. You can run "perldoc Compress::Zlib" to see if this module is installed.</p> |
2016 | 602 | You can run "perldoc Compress::Zlib" to see if this module is installed.</p> | 390 | |
2017 | 603 | </dd> | 391 | </dd> |
2018 | 604 | <dt><strong><a name="archive_zip" class="item">Archive::Zip</a></strong></dt> | 392 | <dt id="Archive::Zip">Archive::Zip</dt> |
2019 | 605 | 393 | <dd> | |
2020 | 606 | <dd> | 394 | |
2021 | 607 | <p>To support restore via Zip archives you will need to install | 395 | <p>To support restore via Zip archives you will need to install Archive::Zip, also from <a href="http://www.cpan.org">http://www.cpan.org</a>. You can run "perldoc Archive::Zip" to see if this module is installed.</p> |
2022 | 608 | Archive::Zip, also from <a href="http://www.cpan.org">http://www.cpan.org</a>. | 396 | |
2023 | 609 | You can run "perldoc Archive::Zip" to see if this module is installed.</p> | 397 | </dd> |
2024 | 610 | </dd> | 398 | <dt id="XML::RSS">XML::RSS</dt> |
2025 | 611 | <dt><strong><a name="xml_rss" class="item">XML::RSS</a></strong></dt> | 399 | <dd> |
2026 | 612 | 400 | ||
2027 | 613 | <dd> | 401 | <p>To support the RSS feature you will need to install XML::RSS, also from <a href="http://www.cpan.org">http://www.cpan.org</a>. There is not need to install this module if you don't plan on using RSS. You can run "perldoc XML::RSS" to see if this module is installed.</p> |
2028 | 614 | <p>To support the RSS feature you will need to install XML::RSS, also from | 402 | |
2029 | 615 | <a href="http://www.cpan.org">http://www.cpan.org</a>. There is not need to install this module if you | 403 | </dd> |
2030 | 616 | don't plan on using RSS. You can run "perldoc XML::RSS" to see if this | 404 | <dt id="File::RsyncP">File::RsyncP</dt> |
2031 | 617 | module is installed.</p> | 405 | <dd> |
2032 | 618 | </dd> | 406 | |
2033 | 619 | <dt><strong><a name="file_rsyncp" class="item">File::RsyncP</a></strong></dt> | 407 | <p>To use rsync and rsyncd with BackupPC you will need to install File::RsyncP. You can run "perldoc File::RsyncP" to see if this module is installed. File::RsyncP is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>. Version 0.68 or later is required.</p> |
2034 | 620 | 408 | ||
2035 | 621 | <dd> | 409 | </dd> |
2036 | 622 | <p>To use rsync and rsyncd with BackupPC you will need to install File::RsyncP. | 410 | <dt id="File::Listing-Net::FTP-Net::FTP::RetrHandle-Net::FTP::AutoReconnect">File::Listing, Net::FTP, Net::FTP::RetrHandle, Net::FTP::AutoReconnect</dt> |
2037 | 623 | You can run "perldoc File::RsyncP" to see if this module is installed. | 411 | <dd> |
2038 | 624 | File::RsyncP is available from <a href="http://perlrsync.sourceforge.net">http://perlrsync.sourceforge.net</a>. | 412 | |
2039 | 625 | Version 0.68 or later is required.</p> | 413 | <p>To use ftp with BackupPC you will need four libraries, but actually need to install only File::Listing from <a href="http://www.cpan.org">http://www.cpan.org</a>. You can run "perldoc File::Listing" to see if this module is installed. Net::FTP is a standard module. Net::FTP::RetrHandle and Net::FTP::AutoReconnect included in BackupPC distribution.</p> |
2040 | 626 | </dd> | 414 | |
2003 | 627 | <dt><strong><a name="file_listing_net_ftp_net_ftp_retrhandle_net_ftp_autoreconnect" class="item">File::Listing, Net::FTP, Net::FTP::RetrHandle, Net::FTP::AutoReconnect</a></strong></dt> | ||
2004 | 628 | |||
2005 | 629 | <dd> | ||
2006 | 630 | <p>To use ftp with BackupPC you will need four libraries, but actually | ||
2007 | 631 | need to install only File::Listing from <a href="http://www.cpan.org">http://www.cpan.org</a>. | ||
2008 | 632 | You can run "perldoc File::Listing" to see if this module is installed. | ||
2009 | 633 | Net::FTP is a standard module. Net::FTP::RetrHandle and | ||
2010 | 634 | Net::FTP::AutoReconnect included in BackupPC distribution.</p> | ||
2041 | 635 | </dd> | 415 | </dd> |
2042 | 636 | </dl> | 416 | </dl> |
2048 | 637 | <p>To build and install these packages you should use the cpan program. | 417 | |
2049 | 638 | Alternatively, you can fetch the tar.gz file from <a href="http://www.cpan.org">http://www.cpan.org</a> | 418 | <p>To build and install these packages you should use the cpan program. Alternatively, you can fetch the tar.gz file from <a href="http://www.cpan.org">http://www.cpan.org</a> and then run these commands:</p> |
2050 | 639 | and then run these commands:</p> | 419 | |
2051 | 640 | <pre> | 420 | <pre><code> tar zxvf Archive-Zip-1.26.tar.gz |
2047 | 641 | tar zxvf Archive-Zip-1.26.tar.gz | ||
2052 | 642 | cd Archive-Zip-1.26 | 421 | cd Archive-Zip-1.26 |
2053 | 643 | perl Makefile.PL | 422 | perl Makefile.PL |
2054 | 644 | make | 423 | make |
2055 | 645 | make test | 424 | make test |
2057 | 646 | make install</pre> | 425 | make install</code></pre> |
2058 | 426 | |||
2059 | 647 | <p>The same sequence of commands can be used for each module.</p> | 427 | <p>The same sequence of commands can be used for each module.</p> |
2106 | 648 | <p>Now let's move onto BackupPC itself. After fetching | 428 | |
2107 | 649 | BackupPC-3.2.1.tar.gz, run these commands as root:</p> | 429 | <p>Now let's move onto BackupPC itself. After fetching BackupPC-3.3.0.tar.gz, run these commands as root:</p> |
2108 | 650 | <pre> | 430 | |
2109 | 651 | tar zxf BackupPC-3.2.1.tar.gz | 431 | <pre><code> tar zxf BackupPC-3.3.0.tar.gz |
2110 | 652 | cd BackupPC-3.2.1 | 432 | cd BackupPC-3.3.0 |
2111 | 653 | perl configure.pl</pre> | 433 | perl configure.pl</code></pre> |
2112 | 654 | <p>In the future this release might also have patches available on the | 434 | |
2113 | 655 | SourceForge site. These patch files are text files, with a name of | 435 | <p>In the future this release might also have patches available on the SourceForge site. These patch files are text files, with a name of the form</p> |
2114 | 656 | the form</p> | 436 | |
2115 | 657 | <pre> | 437 | <pre><code> BackupPC-3.3.0plN.diff</code></pre> |
2116 | 658 | BackupPC-3.2.1plN.diff</pre> | 438 | |
2117 | 659 | <p>where N is the patch level, eg: pl2 is patch-level 2. These | 439 | <p>where N is the patch level, eg: pl2 is patch-level 2. These patch files are cumulative: you only need apply the last patch file, not all the earlier patch files. If a patch file is available, eg: BackupPC-3.3.0pl2.diff, you should apply the patch after extracting the tar file:</p> |
2118 | 660 | patch files are cumulative: you only need apply the last patch | 440 | |
2119 | 661 | file, not all the earlier patch files. If a patch file is | 441 | <pre><code> # fetch BackupPC-3.3.0.tar.gz |
2120 | 662 | available, eg: BackupPC-3.2.1pl2.diff, you should apply | 442 | # fetch BackupPC-3.3.0pl2.diff |
2121 | 663 | the patch after extracting the tar file:</p> | 443 | tar zxf BackupPC-3.3.0.tar.gz |
2122 | 664 | <pre> | 444 | cd BackupPC-3.3.0 |
2123 | 665 | # fetch BackupPC-3.2.1.tar.gz | 445 | patch -p0 < ../BackupPC-3.3.0pl2.diff |
2124 | 666 | # fetch BackupPC-3.2.1pl2.diff | 446 | perl configure.pl</code></pre> |
2125 | 667 | tar zxf BackupPC-3.2.1.tar.gz | 447 | |
2126 | 668 | cd BackupPC-3.2.1 | 448 | <p>A patch file includes comments that describe that bug fixes and changes. Feel free to review it before you apply the patch.</p> |
2127 | 669 | patch -p0 < ../BackupPC-3.2.1pl2.diff | 449 | |
2128 | 670 | perl configure.pl</pre> | 450 | <p>The configure.pl script also accepts command-line options if you wish to run it in a non-interactive manner. It has self-contained documentation for all the command-line options, which you can read with perldoc:</p> |
2129 | 671 | <p>A patch file includes comments that describe that bug fixes | 451 | |
2130 | 672 | and changes. Feel free to review it before you apply the patch.</p> | 452 | <pre><code> perldoc configure.pl</code></pre> |
2131 | 673 | <p>The configure.pl script also accepts command-line options if you | 453 | |
2132 | 674 | wish to run it in a non-interactive manner. It has self-contained | 454 | <p>Starting with BackupPC 3.0.0, the configure.pl script by default complies with the file system hierarchy (FHS) conventions. The major difference compared to earlier versions is that by default configuration files will be stored in /etc/BackupPC rather than below the data directory, __TOPDIR__/conf, and the log files will be stored in /var/log/BackupPC rather than below the data directory, __TOPDIR__/log.</p> |
2133 | 675 | documentation for all the command-line options, which you can | 455 | |
2134 | 676 | read with perldoc:</p> | 456 | <p>Note that distributions may choose to use different locations for BackupPC files than these defaults.</p> |
2135 | 677 | <pre> | 457 | |
2136 | 678 | perldoc configure.pl</pre> | 458 | <p>If you are upgrading from an earlier version the configure.pl script will keep the configuration files and log files in their original location.</p> |
2137 | 679 | <p>Starting with BackupPC 3.0.0, the configure.pl script by default | 459 | |
2138 | 680 | complies with the file system hierarchy (FHS) conventions. The | 460 | <p>When you run configure.pl you will be prompted for the full paths of various executables, and you will be prompted for the following information.</p> |
2139 | 681 | major difference compared to earlier versions is that by default | 461 | |
2094 | 682 | configuration files will be stored in /etc/BackupPC | ||
2095 | 683 | rather than below the data directory, __TOPDIR__/conf, | ||
2096 | 684 | and the log files will be stored in /var/log/BackupPC | ||
2097 | 685 | rather than below the data directory, __TOPDIR__/log.</p> | ||
2098 | 686 | <p>Note that distributions may choose to use different locations for | ||
2099 | 687 | BackupPC files than these defaults.</p> | ||
2100 | 688 | <p>If you are upgrading from an earlier version the configure.pl script | ||
2101 | 689 | will keep the configuration files and log files in their original | ||
2102 | 690 | location.</p> | ||
2103 | 691 | <p>When you run configure.pl you will be prompted for the full paths | ||
2104 | 692 | of various executables, and you will be prompted for the following | ||
2105 | 693 | information.</p> | ||
2140 | 694 | <dl> | 462 | <dl> |
2141 | 695 | <dt><strong><a name="backuppc_user" class="item">BackupPC User</a></strong></dt> | ||
2142 | 696 | 463 | ||
2143 | 464 | <dt id="BackupPC-User">BackupPC User</dt> | ||
2144 | 697 | <dd> | 465 | <dd> |
2151 | 698 | <p>It is best if BackupPC runs as a special user, eg backuppc, that has | 466 | |
2152 | 699 | limited privileges. It is preferred that backuppc belongs to a system | 467 | <p>It is best if BackupPC runs as a special user, eg backuppc, that has limited privileges. It is preferred that backuppc belongs to a system administrator group so that sys admin members can browse BackupPC files, edit the configuration files and so on. Although configurable, the default settings leave group read permission on pool files, so make sure the BackupPC user's group is chosen restrictively.</p> |
2153 | 700 | administrator group so that sys admin members can browse BackupPC files, | 468 | |
2148 | 701 | edit the configuration files and so on. Although configurable, the | ||
2149 | 702 | default settings leave group read permission on pool files, so make | ||
2150 | 703 | sure the BackupPC user's group is chosen restrictively.</p> | ||
2154 | 704 | <p>On this installation, this is __BACKUPPCUSER__.</p> | 469 | <p>On this installation, this is __BACKUPPCUSER__.</p> |
2162 | 705 | <p>For security purposes you might choose to configure the BackupPC | 470 | |
2163 | 706 | user with the shell set to /bin/false. Since you might need to | 471 | <p>For security purposes you might choose to configure the BackupPC user with the shell set to /bin/false. Since you might need to run some BackupPC programs as the BackupPC user for testing purposes, you can use the -s option to su to explicitly run a shell, eg:</p> |
2164 | 707 | run some BackupPC programs as the BackupPC user for testing | 472 | |
2165 | 708 | purposes, you can use the -s option to su to explicitly run | 473 | <pre><code> su -s /bin/bash __BACKUPPCUSER__</code></pre> |
2166 | 709 | a shell, eg:</p> | 474 | |
2160 | 710 | <pre> | ||
2161 | 711 | su -s /bin/bash __BACKUPPCUSER__</pre> | ||
2167 | 712 | <p>Depending upon your configuration you might also need the -l option.</p> | 475 | <p>Depending upon your configuration you might also need the -l option.</p> |
2168 | 476 | |||
2169 | 713 | </dd> | 477 | </dd> |
2172 | 714 | <dt><strong><a name="data_directory" class="item">Data Directory</a></strong></dt> | 478 | <dt id="Data-Directory">Data Directory</dt> |
2171 | 715 | |||
2173 | 716 | <dd> | 479 | <dd> |
2176 | 717 | <p>You need to decide where to put the data directory, below which | 480 | |
2177 | 718 | all the BackupPC data is stored. This needs to be a big file system.</p> | 481 | <p>You need to decide where to put the data directory, below which all the BackupPC data is stored. This needs to be a big file system.</p> |
2178 | 482 | |||
2179 | 719 | <p>On this installation, this is __TOPDIR__.</p> | 483 | <p>On this installation, this is __TOPDIR__.</p> |
2180 | 484 | |||
2181 | 720 | </dd> | 485 | </dd> |
2184 | 721 | <dt><strong><a name="install_directory" class="item">Install Directory</a></strong></dt> | 486 | <dt id="Install-Directory">Install Directory</dt> |
2183 | 722 | |||
2185 | 723 | <dd> | 487 | <dd> |
2188 | 724 | <p>You should decide where the BackupPC scripts, libraries and documentation | 488 | |
2189 | 725 | should be installed, eg: /usr/local/BackupPC.</p> | 489 | <p>You should decide where the BackupPC scripts, libraries and documentation should be installed, eg: /usr/local/BackupPC.</p> |
2190 | 490 | |||
2191 | 726 | <p>On this installation, this is __INSTALLDIR__.</p> | 491 | <p>On this installation, this is __INSTALLDIR__.</p> |
2192 | 492 | |||
2193 | 727 | </dd> | 493 | </dd> |
2196 | 728 | <dt><strong><a name="cgi_bin_directory" class="item">CGI bin Directory</a></strong></dt> | 494 | <dt id="CGI-bin-Directory">CGI bin Directory</dt> |
2195 | 729 | |||
2197 | 730 | <dd> | 495 | <dd> |
2203 | 731 | <p>You should decide where the BackupPC CGI script resides. This will | 496 | |
2204 | 732 | usually be below Apache's cgi-bin directory.</p> | 497 | <p>You should decide where the BackupPC CGI script resides. This will usually be below Apache's cgi-bin directory.</p> |
2205 | 733 | <p>It is also possible to use a different directory and use Apache's | 498 | |
2206 | 734 | ``<Directory>'' directive to specifiy that location. See the Apache | 499 | <p>It is also possible to use a different directory and use Apache's ``<Directory>'' directive to specifiy that location. See the Apache HTTP Server documentation for additional information.</p> |
2207 | 735 | HTTP Server documentation for additional information.</p> | 500 | |
2208 | 736 | <p>On this installation, this is __CGIDIR__.</p> | 501 | <p>On this installation, this is __CGIDIR__.</p> |
2224 | 737 | </dd> | 502 | |
2225 | 738 | <dt><strong><a name="apache_image_directory" class="item">Apache image Directory</a></strong></dt> | 503 | </dd> |
2226 | 739 | 504 | <dt id="Apache-image-Directory">Apache image Directory</dt> | |
2227 | 740 | <dd> | 505 | <dd> |
2228 | 741 | <p>A directory where BackupPC's images are stored so that Apache can | 506 | |
2229 | 742 | serve them. You should ensure this directory is readable by Apache and | 507 | <p>A directory where BackupPC's images are stored so that Apache can serve them. You should ensure this directory is readable by Apache and create a symlink to this directory from the BackupPC CGI bin Directory.</p> |
2230 | 743 | create a symlink to this directory from the BackupPC CGI bin Directory.</p> | 508 | |
2231 | 744 | </dd> | 509 | </dd> |
2232 | 745 | <dt><strong><a name="config_and_log_directories" class="item">Config and Log Directories</a></strong></dt> | 510 | <dt id="Config-and-Log-Directories">Config and Log Directories</dt> |
2233 | 746 | 511 | <dd> | |
2234 | 747 | <dd> | 512 | |
2235 | 748 | <p>In this installation the configuration and log directories are | 513 | <p>In this installation the configuration and log directories are located in the following locations:</p> |
2236 | 749 | located in the following locations:</p> | 514 | |
2237 | 750 | <pre> | 515 | <pre><code> __CONFDIR__/config.pl main config file |
2223 | 751 | __CONFDIR__/config.pl main config file | ||
2238 | 752 | __CONFDIR__/hosts hosts file | 516 | __CONFDIR__/hosts hosts file |
2239 | 753 | __CONFDIR__/pc/HOST.pl per-pc config file | 517 | __CONFDIR__/pc/HOST.pl per-pc config file |
2243 | 754 | __LOGDIR__/BackupPC log files, pid, status</pre> | 518 | __LOGDIR__/BackupPC log files, pid, status</code></pre> |
2244 | 755 | <p>The configure.pl script doesn't prompt for these locations but | 519 | |
2245 | 756 | they can be set for new installations using command-line options.</p> | 520 | <p>The configure.pl script doesn't prompt for these locations but they can be set for new installations using command-line options.</p> |
2246 | 521 | |||
2247 | 757 | </dd> | 522 | </dd> |
2248 | 758 | </dl> | 523 | </dl> |
2264 | 759 | <p> | 524 | |
2265 | 760 | </p> | 525 | <h2 id="Step-3:-Setting-up-config.pl">Step 3: Setting up config.pl</h2> |
2266 | 761 | <h2><a name="step_3__setting_up_config_pl">Step 3: Setting up config.pl</a></h2> | 526 | |
2267 | 762 | <p>After running configure.pl, browse through the config file, | 527 | <p>After running configure.pl, browse through the config file, __CONFDIR__/config.pl, and make sure all the default settings are correct. In particular, you will need to decide whether to use smb, tar,or rsync or ftp transport (or whether to set it on a per-PC basis) and set the relevant parameters for that transport method. See the section <a href="#Step-5:-Client-Setup">"Step 5: Client Setup"</a> for more details.</p> |
2268 | 763 | __CONFDIR__/config.pl, and make sure all the default settings are | 528 | |
2269 | 764 | correct. In particular, you will need to decide whether to use | 529 | <h2 id="Step-4:-Setting-up-the-hosts-file">Step 4: Setting up the hosts file</h2> |
2270 | 765 | smb, tar,or rsync or ftp transport (or whether to set it on a | 530 | |
2271 | 766 | per-PC basis) and set the relevant parameters for that transport | 531 | <p>The file __CONFDIR__/hosts contains the list of clients to backup. BackupPC reads this file in three cases:</p> |
2272 | 767 | method. See the section <a href="#step_5__client_setup">Client Setup</a> for | 532 | |
2258 | 768 | more details.</p> | ||
2259 | 769 | <p> | ||
2260 | 770 | </p> | ||
2261 | 771 | <h2><a name="step_4__setting_up_the_hosts_file">Step 4: Setting up the hosts file</a></h2> | ||
2262 | 772 | <p>The file __CONFDIR__/hosts contains the list of clients to backup. | ||
2263 | 773 | BackupPC reads this file in three cases:</p> | ||
2273 | 774 | <ul> | 533 | <ul> |
2284 | 775 | <li> | 534 | |
2285 | 776 | <p>Upon startup.</p> | 535 | <li><p>Upon startup.</p> |
2286 | 777 | </li> | 536 | |
2287 | 778 | <li> | 537 | </li> |
2288 | 779 | <p>When BackupPC is sent a HUP (-1) signal. Assuming you installed the | 538 | <li><p>When BackupPC is sent a HUP (-1) signal. Assuming you installed the init.d script, you can also do this with "/etc/init.d/backuppc reload".</p> |
2289 | 780 | init.d script, you can also do this with "/etc/init.d/backuppc reload".</p> | 539 | |
2290 | 781 | </li> | 540 | </li> |
2291 | 782 | <li> | 541 | <li><p>When the modification time of the hosts file changes. BackupPC checks the modification time once during each regular wakeup.</p> |
2292 | 783 | <p>When the modification time of the hosts file changes. BackupPC | 542 | |
2283 | 784 | checks the modification time once during each regular wakeup.</p> | ||
2293 | 785 | </li> | 543 | </li> |
2294 | 786 | </ul> | 544 | </ul> |
2300 | 787 | <p>Whenever you change the hosts file (to add or remove a host) you can | 545 | |
2301 | 788 | either do a kill -HUP BackupPC_pid or simply wait until the next regular | 546 | <p>Whenever you change the hosts file (to add or remove a host) you can either do a kill -HUP BackupPC_pid or simply wait until the next regular wakeup period.</p> |
2302 | 789 | wakeup period.</p> | 547 | |
2303 | 790 | <p>Each line in the hosts file contains three fields, separated | 548 | <p>Each line in the hosts file contains three fields, separated by white space:</p> |
2304 | 791 | by white space:</p> | 549 | |
2305 | 792 | <dl> | 550 | <dl> |
2306 | 793 | <dt><strong><a name="host_name" class="item">Host name</a></strong></dt> | ||
2307 | 794 | 551 | ||
2308 | 552 | <dt id="Host-name">Host name</dt> | ||
2309 | 795 | <dd> | 553 | <dd> |
2323 | 796 | <p>This is typically the host name or NetBios name of the client machine | 554 | |
2324 | 797 | and should be in lower case. The host name can contain spaces (escape | 555 | <p>This is typically the host name or NetBios name of the client machine and should be in lower case. The host name can contain spaces (escape with a backslash), but it is not recommended.</p> |
2325 | 798 | with a backslash), but it is not recommended.</p> | 556 | |
2326 | 799 | <p>Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a>.</p> | 557 | <p>Please read the section <a href="#How-BackupPC-Finds-Hosts">"How BackupPC Finds Hosts"</a>.</p> |
2327 | 800 | <p>In certain cases you might want several distinct clients to refer | 558 | |
2328 | 801 | to the same physical machine. For example, you might have a database | 559 | <p>In certain cases you might want several distinct clients to refer to the same physical machine. For example, you might have a database you want to backup, and you want to bracket the backup of the database with shutdown/restart using <a href="#_conf_dumppreusercmd_">$Conf{DumpPreUserCmd}</a> and <a href="#_conf_dumppostusercmd_">$Conf{DumpPostUserCmd}</a>. But you also want to backup the rest of the machine while the database is still running. In the case you can specify two different clients in the host file, using any mnemonic name (eg: myhost_mysql and myhost), and use <a href="#_conf_clientnamealias_">$Conf{ClientNameAlias}</a> in myhost_mysql's config.pl to specify the real host name of the machine.</p> |
2329 | 802 | you want to backup, and you want to bracket the backup of the database | 560 | |
2317 | 803 | with shutdown/restart using <a href="#_conf_dumppreusercmd_">$Conf{DumpPreUserCmd}</a> and <a href="#_conf_dumppostusercmd_">$Conf{DumpPostUserCmd}</a>. | ||
2318 | 804 | But you also want to backup the rest of the machine while the database | ||
2319 | 805 | is still running. In the case you can specify two different clients in | ||
2320 | 806 | the host file, using any mnemonic name (eg: myhost_mysql and myhost), and | ||
2321 | 807 | use <a href="#_conf_clientnamealias_">$Conf{ClientNameAlias}</a> in myhost_mysql's config.pl to specify the | ||
2322 | 808 | real host name of the machine.</p> | ||
2330 | 809 | </dd> | 561 | </dd> |
2333 | 810 | <dt><strong><a name="dhcp_flag" class="item">DHCP flag</a></strong></dt> | 562 | <dt id="DHCP-flag">DHCP flag</dt> |
2332 | 811 | |||
2334 | 812 | <dd> | 563 | <dd> |
2344 | 813 | <p>Starting with v2.0.0 the way hosts are discovered has changed and now | 564 | |
2345 | 814 | in most cases you should specify 0 for the DHCP flag, even if the host | 565 | <p>Starting with v2.0.0 the way hosts are discovered has changed and now in most cases you should specify 0 for the DHCP flag, even if the host has a dynamically assigned IP address. Please read the section <a href="#How-BackupPC-Finds-Hosts">"How BackupPC Finds Hosts"</a> to understand whether you need to set the DHCP flag.</p> |
2346 | 815 | has a dynamically assigned IP address. | 566 | |
2347 | 816 | Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a> | 567 | <p>You only need to set DHCP to 1 if your client machine doesn't respond to the NetBios multicast request:</p> |
2348 | 817 | to understand whether you need to set the DHCP flag.</p> | 568 | |
2349 | 818 | <p>You only need to set DHCP to 1 if your client machine doesn't | 569 | <pre><code> nmblookup myHost</code></pre> |
2350 | 819 | respond to the NetBios multicast request:</p> | 570 | |
2342 | 820 | <pre> | ||
2343 | 821 | nmblookup myHost</pre> | ||
2351 | 822 | <p>but does respond to a request directed to its IP address:</p> | 571 | <p>but does respond to a request directed to its IP address:</p> |
2376 | 823 | <pre> | 572 | |
2377 | 824 | nmblookup -A W.X.Y.Z</pre> | 573 | <pre><code> nmblookup -A W.X.Y.Z</code></pre> |
2378 | 825 | <p>If you do set DHCP to 1 on any client you will need to specify the range of | 574 | |
2379 | 826 | DHCP addresses to search is specified in <a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>.</p> | 575 | <p>If you do set DHCP to 1 on any client you will need to specify the range of DHCP addresses to search is specified in <a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>.</p> |
2380 | 827 | <p>Note also that the <a href="#_conf_clientnamealias_">$Conf{ClientNameAlias}</a> feature does not work for | 576 | |
2381 | 828 | clients with DHCP set to 1.</p> | 577 | <p>Note also that the <a href="#_conf_clientnamealias_">$Conf{ClientNameAlias}</a> feature does not work for clients with DHCP set to 1.</p> |
2382 | 829 | </dd> | 578 | |
2383 | 830 | <dt><strong><a name="user_name" class="item">User name</a></strong></dt> | 579 | </dd> |
2384 | 831 | 580 | <dt id="User-name">User name</dt> | |
2385 | 832 | <dd> | 581 | <dd> |
2386 | 833 | <p>This should be the unix login/email name of the user who "owns" or uses | 582 | |
2387 | 834 | this machine. This is the user who will be sent email about this | 583 | <p>This should be the unix login/email name of the user who "owns" or uses this machine. This is the user who will be sent email about this machine, and this user will have permission to stop/start/browse/restore backups for this host. Leave this blank if no specific person should receive email or be allowed to stop/start/browse/restore backups for this host. Administrators will still have full permissions.</p> |
2388 | 835 | machine, and this user will have permission to stop/start/browse/restore | 584 | |
2389 | 836 | backups for this host. Leave this blank if no specific person should | 585 | </dd> |
2390 | 837 | receive email or be allowed to stop/start/browse/restore backups | 586 | <dt id="More-users">More users</dt> |
2391 | 838 | for this host. Administrators will still have full permissions.</p> | 587 | <dd> |
2392 | 839 | </dd> | 588 | |
2393 | 840 | <dt><strong><a name="more_users" class="item">More users</a></strong></dt> | 589 | <p>Additional user names, separate by commas and with no white space, can be specified. These users will also have full permission in the CGI interface to stop/start/browse/restore backups for this host. These users will not be sent email about this host.</p> |
2394 | 841 | 590 | ||
2371 | 842 | <dd> | ||
2372 | 843 | <p>Additional user names, separate by commas and with no white space, | ||
2373 | 844 | can be specified. These users will also have full permission in | ||
2374 | 845 | the CGI interface to stop/start/browse/restore backups for this host. | ||
2375 | 846 | These users will not be sent email about this host.</p> | ||
2395 | 847 | </dd> | 591 | </dd> |
2396 | 848 | </dl> | 592 | </dl> |
2402 | 849 | <p>The first non-comment line of the hosts file is special: it contains | 593 | |
2403 | 850 | the names of the columns and should not be edited.</p> | 594 | <p>The first non-comment line of the hosts file is special: it contains the names of the columns and should not be edited.</p> |
2404 | 851 | <p>Here's a simple example of a hosts file:</p> | 595 | |
2405 | 852 | <pre> | 596 | <p>Here's a simple example of a hosts file:</p> |
2406 | 853 | host dhcp user moreUsers | 597 | |
2407 | 598 | <pre><code> host dhcp user moreUsers | ||
2408 | 854 | farside 0 craig jim,dave | 599 | farside 0 craig jim,dave |
2426 | 855 | larson 1 gary andy</pre> | 600 | larson 1 gary andy</code></pre> |
2427 | 856 | <p> | 601 | |
2428 | 857 | </p> | 602 | <h2 id="Step-5:-Client-Setup">Step 5: Client Setup</h2> |
2429 | 858 | <h2><a name="step_5__client_setup">Step 5: Client Setup</a></h2> | 603 | |
2430 | 859 | <p>Four methods for getting backup data from a client are supported: | 604 | <p>Four methods for getting backup data from a client are supported: smb, tar, rsync and ftp. Smb or rsync are the preferred methods for WinXX clients and rsync or tar are the preferred methods for linux/unix/MacOSX clients.</p> |
2431 | 860 | smb, tar, rsync and ftp. Smb or rsync are the preferred methods | 605 | |
2432 | 861 | for WinXX clients and rsync or tar are the preferred methods for | 606 | <p>The transfer method is set using the <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> configuration setting. If you have a mixed environment (ie: you will use smb for some clients and tar for others), you will need to pick the most common choice for <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> for the main config.pl file, and then override it in the per-PC config file for those hosts that will use the other method. (Or you could run two completely separate instances of BackupPC, with different data directories, one for WinXX and the other for linux/unix, but then common files between the different machine types will duplicated.)</p> |
2433 | 862 | linux/unix/MacOSX clients.</p> | 607 | |
2417 | 863 | <p>The transfer method is set using the <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> configuration | ||
2418 | 864 | setting. If you have a mixed environment (ie: you will use smb for some | ||
2419 | 865 | clients and tar for others), you will need to pick the most common | ||
2420 | 866 | choice for <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> for the main config.pl file, and then | ||
2421 | 867 | override it in the per-PC config file for those hosts that will use | ||
2422 | 868 | the other method. (Or you could run two completely separate instances | ||
2423 | 869 | of BackupPC, with different data directories, one for WinXX and the | ||
2424 | 870 | other for linux/unix, but then common files between the different | ||
2425 | 871 | machine types will duplicated.)</p> | ||
2434 | 872 | <p>Here are some brief client setup notes:</p> | 608 | <p>Here are some brief client setup notes:</p> |
2435 | 609 | |||
2436 | 873 | <dl> | 610 | <dl> |
2437 | 874 | <dt><strong><a name="winxx" class="item">WinXX</a></strong></dt> | ||
2438 | 875 | 611 | ||
2439 | 612 | <dt id="WinXX">WinXX</dt> | ||
2440 | 876 | <dd> | 613 | <dd> |
2484 | 877 | <p>One setup for WinXX clients is to set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "smb". | 614 | |
2485 | 878 | Actually, rsyncd is the better method for WinXX if you are prepared to | 615 | <p>One setup for WinXX clients is to set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "smb". Actually, rsyncd is the better method for WinXX if you are prepared to run rsync/cygwin on your WinXX client.</p> |
2486 | 879 | run rsync/cygwin on your WinXX client.</p> | 616 | |
2487 | 880 | <p>If you want to use rsyncd for WinXX clients you can find a pre-packaged | 617 | <p>If you want to use rsyncd for WinXX clients you can find a pre-packaged zip file on <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. The package is called cygwin-rsync. It contains rsync.exe, template setup files and the minimal set of cygwin libraries for everything to run. The README file contains instructions for running rsync as a service, so it starts automatically everytime you boot your machine. If you use rsync to backup WinXX machines, be sure to set <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> correctly (eg: 'cp1252') so that the WinXX file name encoding is correctly converted to utf8.</p> |
2488 | 881 | zip file on <a href="http://backuppc.sourceforge.net">http://backuppc.sourceforge.net</a>. The package is called | 618 | |
2489 | 882 | cygwin-rsync. It contains rsync.exe, template setup files and the | 619 | <p>Otherwise, to use SMB, you can either create shares for the data you want to backup or your can use the existing C$ share. To create a new share, open "My Computer", right click on the drive (eg: C), and select "Sharing..." (or select "Properties" and select the "Sharing" tab). In this dialog box you can enable sharing, select the share name and permissions.</p> |
2490 | 883 | minimal set of cygwin libraries for everything to run. The README file | 620 | |
2491 | 884 | contains instructions for running rsync as a service, so it starts | 621 | <p>All Windows NT based OS (NT, 2000, XP Pro), are configured by default to share the entire C drive as C$. This is a special share used for various administration functions, one of which is to grant access to backup operators. All you need to do is create a new domain user, specifically for backup. Then add the new backup user to the built in "Backup Operators" group. You now have backup capability for any directory on any computer in the domain in one easy step. This avoids using administrator accounts and only grants permission to do exactly what you want for the given user, i.e.: backup. Also, for additional security, you may wish to deny the ability for this user to logon to computers in the default domain policy.</p> |
2492 | 885 | automatically everytime you boot your machine. If you use rsync | 622 | |
2493 | 886 | to backup WinXX machines, be sure to set <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> | 623 | <p>If this machine uses DHCP you will also need to make sure the NetBios name is set. Go to Control Panel|System|Network Identification (on Win2K) or Control Panel|System|Computer Name (on WinXP). Also, you should go to Control Panel|Network Connections|Local Area Connection|Properties|Internet Protocol (TCP/IP)|Properties|Advanced|WINS and verify that NetBios is not disabled.</p> |
2494 | 887 | correctly (eg: 'cp1252') so that the WinXX file name encoding is | 624 | |
2495 | 888 | correctly converted to utf8.</p> | 625 | <p>The relevant configuration settings are <a href="#_conf_smbsharename_">$Conf{SmbShareName}</a>, <a href="#_conf_smbshareusername_">$Conf{SmbShareUserName}</a>, <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a>, <a href="#_conf_smbclientpath_">$Conf{SmbClientPath}</a>, <a href="#_conf_smbclientfullcmd_">$Conf{SmbClientFullCmd}</a>, <a href="#_conf_smbclientincrcmd_">$Conf{SmbClientIncrCmd}</a> and <a href="#_conf_smbclientrestorecmd_">$Conf{SmbClientRestoreCmd}</a>.</p> |
2496 | 889 | <p>Otherwise, to use SMB, you can either create shares for the data you want | 626 | |
2497 | 890 | to backup or your can use the existing C$ share. To create a new | 627 | <p>BackupPC needs to know the smb share user name and password for a client machine that uses smb. The user name is specified in <a href="#_conf_smbshareusername_">$Conf{SmbShareUserName}</a>. There are four ways to tell BackupPC the smb share password:</p> |
2498 | 891 | share, open "My Computer", right click on the drive (eg: C), and | 628 | |
2456 | 892 | select "Sharing..." (or select "Properties" and select the "Sharing" | ||
2457 | 893 | tab). In this dialog box you can enable sharing, select the share name | ||
2458 | 894 | and permissions.</p> | ||
2459 | 895 | <p>All Windows NT based OS (NT, 2000, XP Pro), are configured by default | ||
2460 | 896 | to share the entire C drive as C$. This is a special share used for | ||
2461 | 897 | various administration functions, one of which is to grant access to backup | ||
2462 | 898 | operators. All you need to do is create a new domain user, specifically | ||
2463 | 899 | for backup. Then add the new backup user to the built in "Backup | ||
2464 | 900 | Operators" group. You now have backup capability for any directory on | ||
2465 | 901 | any computer in the domain in one easy step. This avoids using | ||
2466 | 902 | administrator accounts and only grants permission to do exactly what you | ||
2467 | 903 | want for the given user, i.e.: backup. | ||
2468 | 904 | Also, for additional security, you may wish to deny the ability for this | ||
2469 | 905 | user to logon to computers in the default domain policy.</p> | ||
2470 | 906 | <p>If this machine uses DHCP you will also need to make sure the | ||
2471 | 907 | NetBios name is set. Go to Control Panel|System|Network Identification | ||
2472 | 908 | (on Win2K) or Control Panel|System|Computer Name (on WinXP). | ||
2473 | 909 | Also, you should go to Control Panel|Network Connections|Local Area | ||
2474 | 910 | Connection|Properties|Internet Protocol (TCP/IP)|Properties|Advanced|WINS | ||
2475 | 911 | and verify that NetBios is not disabled.</p> | ||
2476 | 912 | <p>The relevant configuration settings are <a href="#_conf_smbsharename_">$Conf{SmbShareName}</a>, | ||
2477 | 913 | <a href="#_conf_smbshareusername_">$Conf{SmbShareUserName}</a>, <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a>, <a href="#_conf_smbclientpath_">$Conf{SmbClientPath}</a>, | ||
2478 | 914 | <a href="#_conf_smbclientfullcmd_">$Conf{SmbClientFullCmd}</a>, <a href="#_conf_smbclientincrcmd_">$Conf{SmbClientIncrCmd}</a> and | ||
2479 | 915 | <a href="#_conf_smbclientrestorecmd_">$Conf{SmbClientRestoreCmd}</a>.</p> | ||
2480 | 916 | <p>BackupPC needs to know the smb share user name and password for a | ||
2481 | 917 | client machine that uses smb. The user name is specified in | ||
2482 | 918 | <a href="#_conf_smbshareusername_">$Conf{SmbShareUserName}</a>. There are four ways to tell BackupPC the | ||
2483 | 919 | smb share password:</p> | ||
2499 | 920 | <ul> | 629 | <ul> |
2525 | 921 | <li> | 630 | |
2526 | 922 | <p>As an environment variable BPC_SMB_PASSWD set before BackupPC starts. | 631 | <li><p>As an environment variable BPC_SMB_PASSWD set before BackupPC starts. If you start BackupPC manually the BPC_SMB_PASSWD variable must be set manually first. For backward compatibility for v1.5.0 and prior, the environment variable PASSWD can be used if BPC_SMB_PASSWD is not set. Warning: on some systems it is possible to see environment variables of running processes.</p> |
2527 | 923 | If you start BackupPC manually the BPC_SMB_PASSWD variable must be set | 632 | |
2528 | 924 | manually first. For backward compatibility for v1.5.0 and prior, the | 633 | </li> |
2529 | 925 | environment variable PASSWD can be used if BPC_SMB_PASSWD is not set. | 634 | <li><p>Alternatively the BPC_SMB_PASSWD setting can be included in /etc/init.d/backuppc, in which case you must make sure this file is not world (other) readable.</p> |
2530 | 926 | Warning: on some systems it is possible to see environment variables of | 635 | |
2531 | 927 | running processes.</p> | 636 | </li> |
2532 | 928 | </li> | 637 | <li><p>As a configuration variable <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a> in __CONFDIR__/config.pl. If you put the password here you must make sure this file is not world (other) readable.</p> |
2533 | 929 | <li> | 638 | |
2534 | 930 | <p>Alternatively the BPC_SMB_PASSWD setting can be included in | 639 | </li> |
2535 | 931 | /etc/init.d/backuppc, in which case you must make sure this file | 640 | <li><p>As a configuration variable <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a> in the per-PC configuration file (__CONFDIR__/pc/$host.pl or __TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). You will have to use this option if the smb share password is different for each host. If you put the password here you must make sure this file is not world (other) readable.</p> |
2536 | 932 | is not world (other) readable.</p> | 641 | |
2512 | 933 | </li> | ||
2513 | 934 | <li> | ||
2514 | 935 | <p>As a configuration variable <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a> in | ||
2515 | 936 | __CONFDIR__/config.pl. If you put the password | ||
2516 | 937 | here you must make sure this file is not world (other) readable.</p> | ||
2517 | 938 | </li> | ||
2518 | 939 | <li> | ||
2519 | 940 | <p>As a configuration variable <a href="#_conf_smbsharepasswd_">$Conf{SmbSharePasswd}</a> in the per-PC | ||
2520 | 941 | configuration file (__CONFDIR__/pc/$host.pl or | ||
2521 | 942 | __TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). | ||
2522 | 943 | You will have to use this option if the smb share password is different | ||
2523 | 944 | for each host. If you put the password here you must make sure this file | ||
2524 | 945 | is not world (other) readable.</p> | ||
2537 | 946 | </li> | 642 | </li> |
2538 | 947 | </ul> | 643 | </ul> |
2558 | 948 | <p>Placement and protection of the smb share password is a possible | 644 | |
2559 | 949 | security risk, so please double-check the file and directory | 645 | <p>Placement and protection of the smb share password is a possible security risk, so please double-check the file and directory permissions. In a future version there might be support for encryption of this password, but a private key will still have to be stored in a protected place. Suggestions are welcome.</p> |
2560 | 950 | permissions. In a future version there might be support for | 646 | |
2561 | 951 | encryption of this password, but a private key will still have to | 647 | <p>As an alternative to setting <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "smb" (using smbclient) for WinXX clients, you can use an smb network filesystem (eg: ksmbfs or similar) on your linux/unix server to mount the share, and then set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "tar" (use tar on the network mounted file system).</p> |
2562 | 952 | be stored in a protected place. Suggestions are welcome.</p> | 648 | |
2563 | 953 | <p>As an alternative to setting <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "smb" (using | 649 | <p>Also, to make sure that file names with special characters are correctly transferred by smbclient you should make sure that the smb.conf file has (for samba 3.x):</p> |
2564 | 954 | smbclient) for WinXX clients, you can use an smb network filesystem (eg: | 650 | |
2565 | 955 | ksmbfs or similar) on your linux/unix server to mount the share, | 651 | <pre><code> [global] |
2566 | 956 | and then set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "tar" (use tar on the network | 652 | unix charset = UTF8</code></pre> |
2567 | 957 | mounted file system).</p> | 653 | |
2568 | 958 | <p>Also, to make sure that file names with special characters are correctly | 654 | <p>UTF8 is the default setting, so if the parameter is missing then it is ok. With this setting <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> should be emtpy, since smbclient has already converted the file names to utf8.</p> |
2569 | 959 | transferred by smbclient you should make sure that the smb.conf file | 655 | |
2551 | 960 | has (for samba 3.x):</p> | ||
2552 | 961 | <pre> | ||
2553 | 962 | [global] | ||
2554 | 963 | unix charset = UTF8</pre> | ||
2555 | 964 | <p>UTF8 is the default setting, so if the parameter is missing then it | ||
2556 | 965 | is ok. With this setting <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> should be emtpy, | ||
2557 | 966 | since smbclient has already converted the file names to utf8.</p> | ||
2570 | 967 | </dd> | 656 | </dd> |
2573 | 968 | <dt><strong><a name="linux_unix" class="item">Linux/Unix</a></strong></dt> | 657 | <dt id="Linux-Unix">Linux/Unix</dt> |
2572 | 969 | |||
2574 | 970 | <dd> | 658 | <dd> |
2586 | 971 | <p>The preferred setup for linux/unix clients is to set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> | 659 | |
2587 | 972 | to "rsync", "rsyncd" or "tar".</p> | 660 | <p>The preferred setup for linux/unix clients is to set <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> to "rsync", "rsyncd" or "tar".</p> |
2588 | 973 | <p>You can use either rsync, smb, or tar for linux/unix machines. Smb requires | 661 | |
2589 | 974 | that the Samba server (smbd) be run to provide the shares. Since the smb | 662 | <p>You can use either rsync, smb, or tar for linux/unix machines. Smb requires that the Samba server (smbd) be run to provide the shares. Since the smb protocol can't represent special files like symbolic links and fifos, tar and rsync are the better transport methods for linux/unix machines. (In fact, by default samba makes symbolic links look like the file or directory that they point to, so you could get an infinite loop if a symbolic link points to the current or parent directory. If you really need to use Samba shares for linux/unix backups you should turn off the "follow symlinks" samba config setting. See the smb.conf manual page.)</p> |
2590 | 975 | protocol can't represent special files like symbolic links and fifos, | 663 | |
2580 | 976 | tar and rsync are the better transport methods for linux/unix machines. | ||
2581 | 977 | (In fact, by default samba makes symbolic links look like the file or | ||
2582 | 978 | directory that they point to, so you could get an infinite loop if a | ||
2583 | 979 | symbolic link points to the current or parent directory. If you really | ||
2584 | 980 | need to use Samba shares for linux/unix backups you should turn off the | ||
2585 | 981 | "follow symlinks" samba config setting. See the smb.conf manual page.)</p> | ||
2591 | 982 | <p>The requirements for each Xfer Method are:</p> | 664 | <p>The requirements for each Xfer Method are:</p> |
2592 | 665 | |||
2593 | 983 | <dl> | 666 | <dl> |
2727 | 984 | <dt><strong><a name="tar" class="item">tar</a></strong></dt> | 667 | |
2728 | 985 | 668 | <dt id="tar">tar</dt> | |
2729 | 986 | <dd> | 669 | <dd> |
2730 | 987 | <p>You must have GNU tar on the client machine. Use "tar --version" | 670 | |
2731 | 988 | or "gtar --version" to verify. The version should be at least | 671 | <p>You must have GNU tar on the client machine. Use "tar --version" or "gtar --version" to verify. The version should be at least 1.13.7, and 1.13.20 or greater is recommended. Tar is run on the client machine via rsh or ssh.</p> |
2732 | 989 | 1.13.7, and 1.13.20 or greater is recommended. Tar is run on | 672 | |
2733 | 990 | the client machine via rsh or ssh.</p> | 673 | <p>The relevant configuration settings are <a href="#_conf_tarclientpath_">$Conf{TarClientPath}</a>, <a href="#_conf_tarsharename_">$Conf{TarShareName}</a>, <a href="#_conf_tarclientcmd_">$Conf{TarClientCmd}</a>, <a href="#_conf_tarfullargs_">$Conf{TarFullArgs}</a>, <a href="#_conf_tarincrargs_">$Conf{TarIncrArgs}</a>, and <a href="#_conf_tarclientrestorecmd_">$Conf{TarClientRestoreCmd}</a>.</p> |
2734 | 991 | <p>The relevant configuration settings are <a href="#_conf_tarclientpath_">$Conf{TarClientPath}</a>, | 674 | |
2735 | 992 | <a href="#_conf_tarsharename_">$Conf{TarShareName}</a>, <a href="#_conf_tarclientcmd_">$Conf{TarClientCmd}</a>, <a href="#_conf_tarfullargs_">$Conf{TarFullArgs}</a>, | 675 | </dd> |
2736 | 993 | <a href="#_conf_tarincrargs_">$Conf{TarIncrArgs}</a>, and <a href="#_conf_tarclientrestorecmd_">$Conf{TarClientRestoreCmd}</a>.</p> | 676 | <dt id="rsync">rsync</dt> |
2737 | 994 | </dd> | 677 | <dd> |
2738 | 995 | <dt><strong><a name="rsync" class="item">rsync</a></strong></dt> | 678 | |
2739 | 996 | 679 | <p>You should have at least rsync 2.6.3, and the latest version is recommended. Rsync is run on the remote client via rsh or ssh.</p> | |
2740 | 997 | <dd> | 680 | |
2741 | 998 | <p>You should have at least rsync 2.6.3, and the latest version is | 681 | <p>The relevant configuration settings are <a href="#_conf_rsyncclientpath_">$Conf{RsyncClientPath}</a>, <a href="#_conf_rsyncclientcmd_">$Conf{RsyncClientCmd}</a>, <a href="#_conf_rsyncclientrestorecmd_">$Conf{RsyncClientRestoreCmd}</a>, <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>, and <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a>.</p> |
2742 | 999 | recommended. Rsync is run on the remote client via rsh or ssh.</p> | 682 | |
2743 | 1000 | <p>The relevant configuration settings are <a href="#_conf_rsyncclientpath_">$Conf{RsyncClientPath}</a>, | 683 | </dd> |
2744 | 1001 | <a href="#_conf_rsyncclientcmd_">$Conf{RsyncClientCmd}</a>, <a href="#_conf_rsyncclientrestorecmd_">$Conf{RsyncClientRestoreCmd}</a>, <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, | 684 | <dt id="rsyncd">rsyncd</dt> |
2745 | 1002 | <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>, and <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a>.</p> | 685 | <dd> |
2746 | 1003 | </dd> | 686 | |
2747 | 1004 | <dt><strong><a name="rsyncd" class="item">rsyncd</a></strong></dt> | 687 | <p>You should have at least rsync 2.6.3, and the latest version is recommended. In this case the rsync daemon should be running on the client machine and BackupPC connects directly to it.</p> |
2748 | 1005 | 688 | ||
2749 | 1006 | <dd> | 689 | <p>The relevant configuration settings are <a href="#_conf_rsyncdclientport_">$Conf{RsyncdClientPort}</a>, <a href="#_conf_rsyncdusername_">$Conf{RsyncdUserName}</a>, <a href="#_conf_rsyncdpasswd_">$Conf{RsyncdPasswd}</a>, <a href="#_conf_rsyncdauthrequired_">$Conf{RsyncdAuthRequired}</a>, <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>, <a href="#_conf_rsyncargsextra_">$Conf{RsyncArgsExtra}</a>, and <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a>. <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a> is the name of an rsync module (ie: the thing in square brackets in rsyncd's conf file -- see rsyncd.conf), not a file system path.</p> |
2750 | 1007 | <p>You should have at least rsync 2.6.3, and the latest version is | 690 | |
2751 | 1008 | recommended. In this case the rsync daemon should be running on | 691 | <p>Be aware that rsyncd will remove the leading '/' from path names in symbolic links if you specify "use chroot = no" in the rsynd.conf file. See the rsyncd.conf manual page for more information.</p> |
2752 | 1009 | the client machine and BackupPC connects directly to it.</p> | 692 | |
2753 | 1010 | <p>The relevant configuration settings are <a href="#_conf_rsyncdclientport_">$Conf{RsyncdClientPort}</a>, | 693 | </dd> |
2754 | 1011 | <a href="#_conf_rsyncdusername_">$Conf{RsyncdUserName}</a>, <a href="#_conf_rsyncdpasswd_">$Conf{RsyncdPasswd}</a>, <a href="#_conf_rsyncdauthrequired_">$Conf{RsyncdAuthRequired}</a>, | 694 | <dt id="ftp">ftp</dt> |
2755 | 1012 | <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>, <a href="#_conf_rsyncargsextra_">$Conf{RsyncArgsExtra}</a>, and | 695 | <dd> |
2756 | 1013 | <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a>. <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a> is the name of an rsync | 696 | |
2757 | 1014 | module (ie: the thing in square brackets in rsyncd's conf file -- see | 697 | <p>You need to be running an ftp server on the client machine. The relevant configuration settings are <a href="#_conf_ftpsharename_">$Conf{FtpShareName}</a>, <a href="#_conf_ftpusername_">$Conf{FtpUserName}</a>, <a href="#_conf_ftppasswd_">$Conf{FtpPasswd}</a>, <a href="#_conf_ftpblocksize_">$Conf{FtpBlockSize}</a>, <a href="#_conf_ftpport_">$Conf{FtpPort}</a>, <a href="#_conf_ftptimeout_">$Conf{FtpTimeout}</a>, and <a href="#_conf_ftpfollowsymlinks_">$Conf{FtpFollowSymlinks}</a>.</p> |
2758 | 1015 | rsyncd.conf), not a file system path.</p> | 698 | |
2759 | 1016 | <p>Be aware that rsyncd will remove the leading '/' from path names in | 699 | </dd> |
2760 | 1017 | symbolic links if you specify "use chroot = no" in the rsynd.conf file. | 700 | </dl> |
2761 | 1018 | See the rsyncd.conf manual page for more information.</p> | 701 | |
2762 | 1019 | </dd> | 702 | <p>You need to set <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> to the client's charset so that file names are correctly converted to utf8. Use "locale charmap" on the client to see its charset.</p> |
2763 | 1020 | <dt><strong><a name="ftp" class="item">ftp</a></strong></dt> | 703 | |
2764 | 1021 | 704 | <p>For linux/unix machines you should not backup "/proc". This directory contains a variety of files that look like regular files but they are special files that don't need to be backed up (eg: /proc/kcore is a regular file that contains physical memory). See <a href="#_conf_backupfilesexclude_">$Conf{BackupFilesExclude}</a>. It is safe to back up /dev since it contains mostly character-special and block-special files, which are correctly handed by BackupPC (eg: backing up /dev/hda5 just saves the block-special file information, not the contents of the disk).</p> | |
2765 | 1022 | <dd> | 705 | |
2766 | 1023 | <p>You need to be running an ftp server on the client machine. | 706 | <p>Alternatively, rather than backup all the file systems as a single share ("/"), it is easier to restore a single file system if you backup each file system separately. To do this you should list each file system mount point in <a href="#_conf_tarsharename_">$Conf{TarShareName}</a> or <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, and add the --one-file-system option to <a href="#_conf_tarclientcmd_">$Conf{TarClientCmd}</a> or <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>. In this case there is no need to exclude /proc explicitly since it looks like a different file system.</p> |
2767 | 1024 | The relevant configuration settings are <a href="#_conf_ftpsharename_">$Conf{FtpShareName}</a>, | 707 | |
2768 | 1025 | <a href="#_conf_ftpusername_">$Conf{FtpUserName}</a>, <a href="#_conf_ftppasswd_">$Conf{FtpPasswd}</a>, <a href="#_conf_ftpblocksize_">$Conf{FtpBlockSize}</a>, | 708 | <p>Next you should decide whether to run tar over ssh, rsh or nfs. Ssh is the preferred method. Rsh is not secure and therefore not recommended. Nfs will work, but you need to make sure that the BackupPC user (running on the server) has sufficient permissions to read all the files below the nfs mount.</p> |
2769 | 1026 | <a href="#_conf_ftpport_">$Conf{FtpPort}</a>, <a href="#_conf_ftptimeout_">$Conf{FtpTimeout}</a>, and <a href="#_conf_ftpfollowsymlinks_">$Conf{FtpFollowSymlinks}</a>.</p> | 709 | |
2770 | 1027 | </dd> | 710 | <p>Ssh allows BackupPC to run as a privileged user on the client (eg: root), since it needs sufficient permissions to read all the backup files. Ssh is setup so that BackupPC on the server (an otherwise low privileged user) can ssh as root on the client, without being prompted for a password. There are two common versions of ssh: v1 and v2. Here are some instructions for one way to setup ssh. (Check which version of SSH you have by typing "ssh" or "man ssh".)</p> |
2771 | 1028 | </dl> | 711 | |
2772 | 1029 | <p>You need to set <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> to the client's charset so that | 712 | </dd> |
2773 | 1030 | file names are correctly converted to utf8. Use "locale charmap" | 713 | <dt id="MacOSX">MacOSX</dt> |
2774 | 1031 | on the client to see its charset.</p> | 714 | <dd> |
2775 | 1032 | <p>For linux/unix machines you should not backup "/proc". This directory | 715 | |
2776 | 1033 | contains a variety of files that look like regular files but they are | 716 | <p>In general this should be similar to Linux/Unix machines. In versions 10.4 and later, the native MacOSX tar works, and also supports resource forks. xtar is another option, and rsync works too (although the MacOSX-supplied rsync has an extension for extended attributes that is not compatible with standard rsync).</p> |
2777 | 1034 | special files that don't need to be backed up (eg: /proc/kcore is a | 717 | |
2778 | 1035 | regular file that contains physical memory). See <a href="#_conf_backupfilesexclude_">$Conf{BackupFilesExclude}</a>. | 718 | </dd> |
2779 | 1036 | It is safe to back up /dev since it contains mostly character-special | 719 | <dt id="SSH-Setup">SSH Setup</dt> |
2780 | 1037 | and block-special files, which are correctly handed by BackupPC | 720 | <dd> |
2781 | 1038 | (eg: backing up /dev/hda5 just saves the block-special file information, | 721 | |
2782 | 1039 | not the contents of the disk).</p> | 722 | <p>SSH is a secure way to run tar or rsync on a backup client to extract the data. SSH provides strong authentication and encryption of the network data.</p> |
2783 | 1040 | <p>Alternatively, rather than backup all the file systems as a single | 723 | |
2784 | 1041 | share ("/"), it is easier to restore a single file system if you backup | 724 | <p>Note that if you run rsyncd (rsync daemon), ssh is not used. In this case, rsyncd provides its own authentication, but there is no encryption of network data. If you want encryption of network data you can use ssh to create a tunnel, or use a program like stunnel.</p> |
2785 | 1042 | each file system separately. To do this you should list each file system | 725 | |
2786 | 1043 | mount point in <a href="#_conf_tarsharename_">$Conf{TarShareName}</a> or <a href="#_conf_rsyncsharename_">$Conf{RsyncShareName}</a>, and add the | 726 | <p>Setup instructions for ssh can be found at <a href="http://backuppc.sourceforge.net/faq/ssh.html">http://backuppc.sourceforge.net/faq/ssh.html</a> or on the Wiki.</p> |
2787 | 1044 | --one-file-system option to <a href="#_conf_tarclientcmd_">$Conf{TarClientCmd}</a> or <a href="#_conf_rsyncargs_">$Conf{RsyncArgs}</a>. | 727 | |
2788 | 1045 | In this case there is no need to exclude /proc explicitly since it looks | 728 | </dd> |
2789 | 1046 | like a different file system.</p> | 729 | <dt id="Clients-that-use-DHCP">Clients that use DHCP</dt> |
2790 | 1047 | <p>Next you should decide whether to run tar over ssh, rsh or nfs. Ssh is | 730 | <dd> |
2791 | 1048 | the preferred method. Rsh is not secure and therefore not recommended. | 731 | |
2792 | 1049 | Nfs will work, but you need to make sure that the BackupPC user (running | 732 | <p>If a client machine uses DHCP BackupPC needs some way to find the IP address given the host name. One alternative is to set dhcp to 1 in the hosts file, and BackupPC will search a pool of IP addresses looking for hosts. More efficiently, it is better to set dhcp = 0 and provide a mechanism for BackupPC to find the IP address given the host name.</p> |
2793 | 1050 | on the server) has sufficient permissions to read all the files below | 733 | |
2794 | 1051 | the nfs mount.</p> | 734 | <p>For WinXX machines BackupPC uses the NetBios name server to determine the IP address given the host name. For unix machines you can run nmbd (the NetBios name server) from the Samba distribution so that the machine responds to a NetBios name request. See the manual page and Samba documentation for more information.</p> |
2795 | 1052 | <p>Ssh allows BackupPC to run as a privileged user on the client (eg: | 735 | |
2796 | 1053 | root), since it needs sufficient permissions to read all the backup | 736 | <p>Alternatively, you can set <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> to any command that returns the IP address given the host name.</p> |
2797 | 1054 | files. Ssh is setup so that BackupPC on the server (an otherwise low | 737 | |
2798 | 1055 | privileged user) can ssh as root on the client, without being prompted | 738 | <p>Please read the section <a href="#How-BackupPC-Finds-Hosts">"How BackupPC Finds Hosts"</a> for more details.</p> |
2799 | 1056 | for a password. There are two common versions of ssh: v1 and v2. Here | 739 | |
2800 | 1057 | are some instructions for one way to setup ssh. (Check which version | 740 | </dd> |
2801 | 1058 | of SSH you have by typing "ssh" or "man ssh".)</p> | 741 | </dl> |
2802 | 1059 | </dd> | 742 | |
2803 | 1060 | <dt><strong><a name="macosx" class="item">MacOSX</a></strong></dt> | 743 | <h2 id="Step-6:-Running-BackupPC">Step 6: Running BackupPC</h2> |
2804 | 1061 | 744 | ||
2805 | 1062 | <dd> | 745 | <p>The installation contains an init.d backuppc script that can be copied to /etc/init.d so that BackupPC can auto-start on boot. See init.d/README for further instructions.</p> |
2806 | 1063 | <p>In general this should be similar to Linux/Unix machines. | 746 | |
2807 | 1064 | In versions 10.4 and later, the native MacOSX tar works, | 747 | <p>BackupPC should be ready to start. If you installed the init.d script, then you should be able to run BackupPC with:</p> |
2808 | 1065 | and also supports resource forks. xtar is another option, | 748 | |
2809 | 1066 | and rsync works too (although the MacOSX-supplied rsync | 749 | <pre><code> /etc/init.d/backuppc start</code></pre> |
2810 | 1067 | has an extension for extended attributes that is not | 750 | |
2811 | 1068 | compatible with standard rsync).</p> | 751 | <p>(This script can also be invoked with "stop" to stop BackupPC and "reload" to tell BackupPC to reload config.pl and the hosts file.)</p> |
2812 | 1069 | </dd> | 752 | |
2680 | 1070 | <dt><strong><a name="ssh_setup" class="item">SSH Setup</a></strong></dt> | ||
2681 | 1071 | |||
2682 | 1072 | <dd> | ||
2683 | 1073 | <p>SSH is a secure way to run tar or rsync on a backup client to extract | ||
2684 | 1074 | the data. SSH provides strong authentication and encryption of | ||
2685 | 1075 | the network data.</p> | ||
2686 | 1076 | <p>Note that if you run rsyncd (rsync daemon), ssh is not used. | ||
2687 | 1077 | In this case, rsyncd provides its own authentication, but there | ||
2688 | 1078 | is no encryption of network data. If you want encryption of | ||
2689 | 1079 | network data you can use ssh to create a tunnel, or use a | ||
2690 | 1080 | program like stunnel.</p> | ||
2691 | 1081 | <p>Setup instructions for ssh can be found at | ||
2692 | 1082 | <a href="http://backuppc.sourceforge.net/faq/ssh.html">http://backuppc.sourceforge.net/faq/ssh.html</a> or on the Wiki.</p> | ||
2693 | 1083 | </dd> | ||
2694 | 1084 | <dt><strong><a name="clients_that_use_dhcp" class="item">Clients that use DHCP</a></strong></dt> | ||
2695 | 1085 | |||
2696 | 1086 | <dd> | ||
2697 | 1087 | <p>If a client machine uses DHCP BackupPC needs some way to find the | ||
2698 | 1088 | IP address given the host name. One alternative is to set dhcp | ||
2699 | 1089 | to 1 in the hosts file, and BackupPC will search a pool of IP | ||
2700 | 1090 | addresses looking for hosts. More efficiently, it is better to | ||
2701 | 1091 | set dhcp = 0 and provide a mechanism for BackupPC to find the | ||
2702 | 1092 | IP address given the host name.</p> | ||
2703 | 1093 | <p>For WinXX machines BackupPC uses the NetBios name server to determine | ||
2704 | 1094 | the IP address given the host name. | ||
2705 | 1095 | For unix machines you can run nmbd (the NetBios name server) from | ||
2706 | 1096 | the Samba distribution so that the machine responds to a NetBios | ||
2707 | 1097 | name request. See the manual page and Samba documentation for more | ||
2708 | 1098 | information.</p> | ||
2709 | 1099 | <p>Alternatively, you can set <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> to any command | ||
2710 | 1100 | that returns the IP address given the host name.</p> | ||
2711 | 1101 | <p>Please read the section <a href="#how_backuppc_finds_hosts">How BackupPC Finds Hosts</a> | ||
2712 | 1102 | for more details.</p> | ||
2713 | 1103 | </dd> | ||
2714 | 1104 | </dl> | ||
2715 | 1105 | <p> | ||
2716 | 1106 | </p> | ||
2717 | 1107 | <h2><a name="step_6__running_backuppc">Step 6: Running BackupPC</a></h2> | ||
2718 | 1108 | <p>The installation contains an init.d backuppc script that can be copied | ||
2719 | 1109 | to /etc/init.d so that BackupPC can auto-start on boot. | ||
2720 | 1110 | See init.d/README for further instructions.</p> | ||
2721 | 1111 | <p>BackupPC should be ready to start. If you installed the init.d script, | ||
2722 | 1112 | then you should be able to run BackupPC with:</p> | ||
2723 | 1113 | <pre> | ||
2724 | 1114 | /etc/init.d/backuppc start</pre> | ||
2725 | 1115 | <p>(This script can also be invoked with "stop" to stop BackupPC and "reload" | ||
2726 | 1116 | to tell BackupPC to reload config.pl and the hosts file.)</p> | ||
2813 | 1117 | <p>Otherwise, just run</p> | 753 | <p>Otherwise, just run</p> |
2845 | 1118 | <pre> | 754 | |
2846 | 1119 | __INSTALLDIR__/bin/BackupPC -d</pre> | 755 | <pre><code> __INSTALLDIR__/bin/BackupPC -d</code></pre> |
2847 | 1120 | <p>as user __BACKUPPCUSER__. The -d option tells BackupPC to run as a daemon | 756 | |
2848 | 1121 | (ie: it does an additional fork).</p> | 757 | <p>as user __BACKUPPCUSER__. The -d option tells BackupPC to run as a daemon (ie: it does an additional fork).</p> |
2849 | 1122 | <p>Any immediate errors will be printed to stderr and BackupPC will quit. | 758 | |
2850 | 1123 | Otherwise, look in __LOGDIR__/LOG and verify that BackupPC reports | 759 | <p>Any immediate errors will be printed to stderr and BackupPC will quit. Otherwise, look in __LOGDIR__/LOG and verify that BackupPC reports it has started and all is ok.</p> |
2851 | 1124 | it has started and all is ok.</p> | 760 | |
2852 | 1125 | <p> | 761 | <h2 id="Step-7:-Talking-to-BackupPC">Step 7: Talking to BackupPC</h2> |
2853 | 1126 | </p> | 762 | |
2854 | 1127 | <h2><a name="step_7__talking_to_backuppc">Step 7: Talking to BackupPC</a></h2> | 763 | <p>You should verify that BackupPC is running by using BackupPC_serverMesg. This sends a message to BackupPC via the unix (or TCP) socket and prints the response. Like all BackupPC programs, BackupPC_serverMesg should be run as the BackupPC user (__BACKUPPCUSER__), so you should</p> |
2855 | 1128 | <p>You should verify that BackupPC is running by using BackupPC_serverMesg. | 764 | |
2856 | 1129 | This sends a message to BackupPC via the unix (or TCP) socket and prints | 765 | <pre><code> su __BACKUPPCUSER__</code></pre> |
2857 | 1130 | the response. Like all BackupPC programs, BackupPC_serverMesg | 766 | |
2858 | 1131 | should be run as the BackupPC user (__BACKUPPCUSER__), so you | 767 | <p>before running BackupPC_serverMesg. If the BackupPC user is configured with /bin/false as the shell, you can use the -s option to su to explicitly run a shell, eg:</p> |
2859 | 1132 | should</p> | 768 | |
2860 | 1133 | <pre> | 769 | <pre><code> su -s /bin/bash __BACKUPPCUSER__</code></pre> |
2861 | 1134 | su __BACKUPPCUSER__</pre> | 770 | |
2862 | 1135 | <p>before running BackupPC_serverMesg. If the BackupPC user is | 771 | <p>Depending upon your configuration you might also need the -l option.</p> |
2863 | 1136 | configured with /bin/false as the shell, you can use the -s | 772 | |
2864 | 1137 | option to su to explicitly run a shell, eg:</p> | 773 | <p>You can request status information and start and stop backups using this interface. This socket interface is mainly provided for the CGI interface (and some of the BackupPC sub-programs use it too). But right now we just want to make sure BackupPC is happy. Each of these commands should produce some status output:</p> |
2865 | 1138 | <pre> | 774 | |
2866 | 1139 | su -s /bin/bash __BACKUPPCUSER__</pre> | 775 | <pre><code> __INSTALLDIR__/bin/BackupPC_serverMesg status info |
2836 | 1140 | <p>Depending upon your configuration you might also need | ||
2837 | 1141 | the -l option.</p> | ||
2838 | 1142 | <p>You can request status information and start and stop backups using this | ||
2839 | 1143 | interface. This socket interface is mainly provided for the CGI interface | ||
2840 | 1144 | (and some of the BackupPC sub-programs use it too). But right now we just | ||
2841 | 1145 | want to make sure BackupPC is happy. Each of these commands should | ||
2842 | 1146 | produce some status output:</p> | ||
2843 | 1147 | <pre> | ||
2844 | 1148 | __INSTALLDIR__/bin/BackupPC_serverMesg status info | ||
2867 | 1149 | __INSTALLDIR__/bin/BackupPC_serverMesg status jobs | 776 | __INSTALLDIR__/bin/BackupPC_serverMesg status jobs |
2875 | 1150 | __INSTALLDIR__/bin/BackupPC_serverMesg status hosts</pre> | 777 | __INSTALLDIR__/bin/BackupPC_serverMesg status hosts</code></pre> |
2876 | 1151 | <p>The output should be some hashes printed with Data::Dumper. If it | 778 | |
2877 | 1152 | looks cryptic and confusing, and doesn't look like an error message, | 779 | <p>The output should be some hashes printed with Data::Dumper. If it looks cryptic and confusing, and doesn't look like an error message, then all is ok.</p> |
2878 | 1153 | then all is ok.</p> | 780 | |
2879 | 1154 | <p>The jobs status should initially show just BackupPC_trashClean. | 781 | <p>The jobs status should initially show just BackupPC_trashClean. The hosts status should produce a list of every host you have listed in __CONFDIR__/hosts as part of a big cryptic output line.</p> |
2880 | 1155 | The hosts status should produce a list of every host you have listed | 782 | |
2874 | 1156 | in __CONFDIR__/hosts as part of a big cryptic output line.</p> | ||
2881 | 1157 | <p>You can also request that all hosts be queued:</p> | 783 | <p>You can also request that all hosts be queued:</p> |
2919 | 1158 | <pre> | 784 | |
2920 | 1159 | __INSTALLDIR__/bin/BackupPC_serverMesg backup all</pre> | 785 | <pre><code> __INSTALLDIR__/bin/BackupPC_serverMesg backup all</code></pre> |
2921 | 1160 | <p>At this point you should make sure the CGI interface works since | 786 | |
2922 | 1161 | it will be much easier to see what is going on. That's our | 787 | <p>At this point you should make sure the CGI interface works since it will be much easier to see what is going on. That's our next subject.</p> |
2923 | 1162 | next subject.</p> | 788 | |
2924 | 1163 | <p> | 789 | <h2 id="Step-8:-Checking-email-delivery">Step 8: Checking email delivery</h2> |
2925 | 1164 | </p> | 790 | |
2926 | 1165 | <h2><a name="step_8__checking_email_delivery">Step 8: Checking email delivery</a></h2> | 791 | <p>The script BackupPC_sendEmail sends status and error emails to the administrator and users. It is usually run each night by BackupPC_nightly.</p> |
2927 | 1166 | <p>The script BackupPC_sendEmail sends status and error emails to | 792 | |
2928 | 1167 | the administrator and users. It is usually run each night | 793 | <p>To verify that it can run sendmail and deliver email correctly you should ask it to send a test email to you:</p> |
2929 | 1168 | by BackupPC_nightly.</p> | 794 | |
2930 | 1169 | <p>To verify that it can run sendmail and deliver email correctly | 795 | <pre><code> su __BACKUPPCUSER__ |
2931 | 1170 | you should ask it to send a test email to you:</p> | 796 | __INSTALLDIR__/bin/BackupPC_sendEmail -u MYNAME@MYDOMAIN.COM</code></pre> |
2932 | 1171 | <pre> | 797 | |
2933 | 1172 | su __BACKUPPCUSER__ | 798 | <p>BackupPC_sendEmail also takes a -c option that checks if BackupPC is running, and it sends an email to <a href="#_conf_emailadminusername_">$Conf{EMailAdminUserName}</a> if it is not. That can be used as a keep-alive check by adding</p> |
2934 | 1173 | __INSTALLDIR__/bin/BackupPC_sendEmail -u MYNAME@MYDOMAIN.COM</pre> | 799 | |
2935 | 1174 | <p>BackupPC_sendEmail also takes a -c option that checks if BackupPC | 800 | <pre><code> __INSTALLDIR__/bin/BackupPC_sendEmail -c</code></pre> |
2936 | 1175 | is running, and it sends an email to <a href="#_conf_emailadminusername_">$Conf{EMailAdminUserName}</a> | 801 | |
2937 | 1176 | if it is not. That can be used as a keep-alive check by adding</p> | 802 | <p>to __BACKUPPCUSER__'s cron.</p> |
2938 | 1177 | <pre> | 803 | |
2939 | 1178 | __INSTALLDIR__/bin/BackupPC_sendEmail -c</pre> | 804 | <p>The -t option to BackupPC_sendEmail causes it to print the email message instead of invoking sendmail to deliver the message.</p> |
2940 | 1179 | <p>to __BACKUPPCUSER__'s cron.</p> | 805 | |
2941 | 1180 | <p>The -t option to BackupPC_sendEmail causes it to print the email | 806 | <h2 id="Step-9:-CGI-interface">Step 9: CGI interface</h2> |
2942 | 1181 | message instead of invoking sendmail to deliver the message.</p> | 807 | |
2943 | 1182 | <p> | 808 | <p>The CGI interface script, BackupPC_Admin, is a powerful and flexible way to see and control what BackupPC is doing. It is written for an Apache server. If you don't have Apache, see <a href="http://www.apache.org">http://www.apache.org</a>.</p> |
2944 | 1183 | </p> | 809 | |
2945 | 1184 | <h2><a name="step_9__cgi_interface">Step 9: CGI interface</a></h2> | 810 | <p>There are two options for setting up the CGI interface: standard mode and using mod_perl. Mod_perl provides much higher performance (around 15x) and is the best choice if your Apache was built with mod_perl support. To see if your apache was built with mod_perl run this command:</p> |
2946 | 1185 | <p>The CGI interface script, BackupPC_Admin, is a powerful and flexible | 811 | |
2947 | 1186 | way to see and control what BackupPC is doing. It is written for an | 812 | <pre><code> httpd -l | egrep mod_perl</code></pre> |
2948 | 1187 | Apache server. If you don't have Apache, see <a href="http://www.apache.org">http://www.apache.org</a>.</p> | 813 | |
2912 | 1188 | <p>There are two options for setting up the CGI interface: standard | ||
2913 | 1189 | mode and using mod_perl. Mod_perl provides much higher performance | ||
2914 | 1190 | (around 15x) and is the best choice if your Apache was built with | ||
2915 | 1191 | mod_perl support. To see if your apache was built with mod_perl | ||
2916 | 1192 | run this command:</p> | ||
2917 | 1193 | <pre> | ||
2918 | 1194 | httpd -l | egrep mod_perl</pre> | ||
2949 | 1195 | <p>If this prints mod_perl.c then your Apache supports mod_perl.</p> | 814 | <p>If this prints mod_perl.c then your Apache supports mod_perl.</p> |
2960 | 1196 | <p>Note: on some distributions (like Debian) the command is not ``httpd'', | 815 | |
2961 | 1197 | but ``apache'' or ``apache2''. Those distributions will generally also | 816 | <p>Note: on some distributions (like Debian) the command is not ``httpd'', but ``apache'' or ``apache2''. Those distributions will generally also use ``apache'' for the Apache user account and configuration files.</p> |
2962 | 1198 | use ``apache'' for the Apache user account and configuration files.</p> | 817 | |
2963 | 1199 | <p>Using mod_perl with BackupPC_Admin requires a dedicated Apache | 818 | <p>Using mod_perl with BackupPC_Admin requires a dedicated Apache to be run as the BackupPC user (__BACKUPPCUSER__). This is because BackupPC_Admin needs permission to access various files in BackupPC's data directories. In contrast, the standard installation (without mod_perl) solves this problem by having BackupPC_Admin installed as setuid to the BackupPC user, so that BackupPC_Admin runs as the BackupPC user.</p> |
2964 | 1200 | to be run as the BackupPC user (__BACKUPPCUSER__). This is | 819 | |
2955 | 1201 | because BackupPC_Admin needs permission to access various files | ||
2956 | 1202 | in BackupPC's data directories. In contrast, the standard | ||
2957 | 1203 | installation (without mod_perl) solves this problem by having | ||
2958 | 1204 | BackupPC_Admin installed as setuid to the BackupPC user, so that | ||
2959 | 1205 | BackupPC_Admin runs as the BackupPC user.</p> | ||
2965 | 1206 | <p>Here are some specifics for each setup:</p> | 820 | <p>Here are some specifics for each setup:</p> |
2966 | 821 | |||
2967 | 1207 | <dl> | 822 | <dl> |
2968 | 1208 | <dt><strong><a name="standard_setup" class="item">Standard Setup</a></strong></dt> | ||
2969 | 1209 | 823 | ||
2970 | 824 | <dt id="Standard-Setup">Standard Setup</dt> | ||
2971 | 1210 | <dd> | 825 | <dd> |
3000 | 1211 | <p>The CGI interface should have been installed by the configure.pl script | 826 | |
3001 | 1212 | in __CGIDIR__/BackupPC_Admin. BackupPC_Admin should have been installed | 827 | <p>The CGI interface should have been installed by the configure.pl script in __CGIDIR__/BackupPC_Admin. BackupPC_Admin should have been installed as setuid to the BackupPC user (__BACKUPPCUSER__), in addition to user and group execute permission.</p> |
3002 | 1213 | as setuid to the BackupPC user (__BACKUPPCUSER__), in addition to user | 828 | |
3003 | 1214 | and group execute permission.</p> | 829 | <p>You should be very careful about permissions on BackupPC_Admin and the directory __CGIDIR__: it is important that normal users cannot directly execute or change BackupPC_Admin, otherwise they can access backup files for any PC. You might need to change the group ownership of BackupPC_Admin to a group that Apache belongs to so that Apache can execute it (don't add "other" execute permission!). The permissions should look like this:</p> |
3004 | 1215 | <p>You should be very careful about permissions on BackupPC_Admin and | 830 | |
3005 | 1216 | the directory __CGIDIR__: it is important that normal users cannot | 831 | <pre><code> ls -l __CGIDIR__/BackupPC_Admin |
3006 | 1217 | directly execute or change BackupPC_Admin, otherwise they can access | 832 | -swxr-x--- 1 __BACKUPPCUSER__ web 82406 Jun 17 22:58 __CGIDIR__/BackupPC_Admin</code></pre> |
3007 | 1218 | backup files for any PC. You might need to change the group ownership | 833 | |
3008 | 1219 | of BackupPC_Admin to a group that Apache belongs to so that Apache | 834 | <p>The setuid script won't work unless perl on your machine was installed with setuid emulation. This is likely the problem if you get an error saying such as "Wrong user: my userid is 25, instead of 150", meaning the script is running as the httpd user, not the BackupPC user. This is because setuid scripts are disabled by the kernel in most flavors of unix and linux.</p> |
3009 | 1220 | can execute it (don't add "other" execute permission!). | 835 | |
3010 | 1221 | The permissions should look like this:</p> | 836 | <p>To see if your perl has setuid emulation, see if there is a program called sperl5.8.0 (or sperl5.8.2 etc, based on your perl version) in the place where perl is installed. If you can't find this program, then you have two options: rebuild and reinstall perl with the setuid emulation turned on (answer "y" to the question "Do you want to do setuid/setgid emulation?" when you run perl's configure script), or switch to the mod_perl alternative for the CGI script (which doesn't need setuid to work).</p> |
3011 | 1222 | <pre> | 837 | |
2984 | 1223 | ls -l __CGIDIR__/BackupPC_Admin | ||
2985 | 1224 | -swxr-x--- 1 __BACKUPPCUSER__ web 82406 Jun 17 22:58 __CGIDIR__/BackupPC_Admin</pre> | ||
2986 | 1225 | <p>The setuid script won't work unless perl on your machine was installed | ||
2987 | 1226 | with setuid emulation. This is likely the problem if you get an error | ||
2988 | 1227 | saying such as "Wrong user: my userid is 25, instead of 150", meaning | ||
2989 | 1228 | the script is running as the httpd user, not the BackupPC user. | ||
2990 | 1229 | This is because setuid scripts are disabled by the kernel in most | ||
2991 | 1230 | flavors of unix and linux.</p> | ||
2992 | 1231 | <p>To see if your perl has setuid emulation, see if there is a program | ||
2993 | 1232 | called sperl5.8.0 (or sperl5.8.2 etc, based on your perl version) | ||
2994 | 1233 | in the place where perl is installed. If you can't find this program, | ||
2995 | 1234 | then you have two options: rebuild and reinstall perl with the setuid | ||
2996 | 1235 | emulation turned on (answer "y" to the question "Do you want to do | ||
2997 | 1236 | setuid/setgid emulation?" when you run perl's configure script), or | ||
2998 | 1237 | switch to the mod_perl alternative for the CGI script (which doesn't | ||
2999 | 1238 | need setuid to work).</p> | ||
3012 | 1239 | </dd> | 838 | </dd> |
3015 | 1240 | <dt><strong><a name="mod_perl_setup" class="item">Mod_perl Setup</a></strong></dt> | 839 | <dt id="Mod_perl-Setup">Mod_perl Setup</dt> |
3014 | 1241 | |||
3016 | 1242 | <dd> | 840 | <dd> |
3042 | 1243 | <p>The advantage of the mod_perl setup is that no setuid script is needed, | 841 | |
3043 | 1244 | and there is a huge performance advantage. Not only does all the perl | 842 | <p>The advantage of the mod_perl setup is that no setuid script is needed, and there is a huge performance advantage. Not only does all the perl code need to be parsed just once, the config.pl and hosts files, plus the connection to the BackupPC server are cached between requests. The typical speedup is around 15 times.</p> |
3044 | 1245 | code need to be parsed just once, the config.pl and hosts files, plus | 843 | |
3045 | 1246 | the connection to the BackupPC server are cached between requests. The | 844 | <p>To use mod_perl you need to run Apache as user __BACKUPPCUSER__. If you need to run multiple Apache's for different services then you need to create multiple top-level Apache directories, each with their own config file. You can make copies of /etc/init.d/httpd and use the -d option to httpd to point each http to a different top-level directory. Or you can use the -f option to explicitly point to the config file. Multiple Apache's will run on different Ports (eg: 80 is standard, 8080 is a typical alternative port accessed via http://yourhost.com:8080).</p> |
3046 | 1247 | typical speedup is around 15 times.</p> | 845 | |
3047 | 1248 | <p>To use mod_perl you need to run Apache as user __BACKUPPCUSER__. | 846 | <p>Inside BackupPC's Apache http.conf file you should check the settings for ServerRoot, DocumentRoot, User, Group, and Port. See <a href="http://httpd.apache.org/docs/server-wide.html">http://httpd.apache.org/docs/server-wide.html</a> for more details.</p> |
3048 | 1249 | If you need to run multiple Apache's for different services then | 847 | |
3049 | 1250 | you need to create multiple top-level Apache directories, each | 848 | <p>For mod_perl, BackupPC_Admin should not have setuid permission, so you should turn it off:</p> |
3050 | 1251 | with their own config file. You can make copies of /etc/init.d/httpd | 849 | |
3051 | 1252 | and use the -d option to httpd to point each http to a different | 850 | <pre><code> chmod u-s __CGIDIR__/BackupPC_Admin</code></pre> |
3052 | 1253 | top-level directory. Or you can use the -f option to explicitly | 851 | |
3053 | 1254 | point to the config file. Multiple Apache's will run on different | 852 | <p>To tell Apache to use mod_perl to execute BackupPC_Admin, add this to Apache's 1.x httpd.conf file:</p> |
3054 | 1255 | Ports (eg: 80 is standard, 8080 is a typical alternative port accessed | 853 | |
3055 | 1256 | via <a href="http://yourhost.com:8080).">http://yourhost.com:8080).</a></p> | 854 | <pre><code> <IfModule mod_perl.c> |
3031 | 1257 | <p>Inside BackupPC's Apache http.conf file you should check the | ||
3032 | 1258 | settings for ServerRoot, DocumentRoot, User, Group, and Port. See | ||
3033 | 1259 | <a href="http://httpd.apache.org/docs/server-wide.html">http://httpd.apache.org/docs/server-wide.html</a> for more details.</p> | ||
3034 | 1260 | <p>For mod_perl, BackupPC_Admin should not have setuid permission, so | ||
3035 | 1261 | you should turn it off:</p> | ||
3036 | 1262 | <pre> | ||
3037 | 1263 | chmod u-s __CGIDIR__/BackupPC_Admin</pre> | ||
3038 | 1264 | <p>To tell Apache to use mod_perl to execute BackupPC_Admin, add this | ||
3039 | 1265 | to Apache's 1.x httpd.conf file:</p> | ||
3040 | 1266 | <pre> | ||
3041 | 1267 | <IfModule mod_perl.c> | ||
3056 | 1268 | PerlModule Apache::Registry | 855 | PerlModule Apache::Registry |
3057 | 1269 | PerlTaintCheck On | 856 | PerlTaintCheck On |
3058 | 1270 | <Location /cgi-bin/BackupPC/BackupPC_Admin> # <--- change path as needed | 857 | <Location /cgi-bin/BackupPC/BackupPC_Admin> # <--- change path as needed |
3059 | @@ -1273,13 +860,13 @@ | |||
3060 | 1273 | Options ExecCGI | 860 | Options ExecCGI |
3061 | 1274 | PerlSendHeader On | 861 | PerlSendHeader On |
3062 | 1275 | </Location> | 862 | </Location> |
3070 | 1276 | </IfModule></pre> | 863 | </IfModule></code></pre> |
3071 | 1277 | <p>Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that | 864 | |
3072 | 1278 | this works (with tweaks from Michael Tuzi):</p> | 865 | <p>Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that this works (with tweaks from Michael Tuzi):</p> |
3073 | 1279 | <pre> | 866 | |
3074 | 1280 | LoadModule perl_module modules/mod_perl.so | 867 | <pre><code> LoadModule perl_module modules/mod_perl.so |
3075 | 1281 | PerlModule Apache2</pre> | 868 | PerlModule Apache2 |
3076 | 1282 | <pre> | 869 | |
3077 | 1283 | <Directory /path/to/cgi/> | 870 | <Directory /path/to/cgi/> |
3078 | 1284 | SetHandler perl-script | 871 | SetHandler perl-script |
3079 | 1285 | PerlResponseHandler ModPerl::Registry | 872 | PerlResponseHandler ModPerl::Registry |
3080 | @@ -1292,34 +879,28 @@ | |||
3081 | 1292 | AuthType Basic | 879 | AuthType Basic |
3082 | 1293 | AuthUserFile /path/to/user_file | 880 | AuthUserFile /path/to/user_file |
3083 | 1294 | Require valid-user | 881 | Require valid-user |
3090 | 1295 | </Directory></pre> | 882 | </Directory></code></pre> |
3091 | 1296 | <p>There are other optimizations and options with mod_perl. For | 883 | |
3092 | 1297 | example, you can tell mod_perl to preload various perl modules, | 884 | <p>There are other optimizations and options with mod_perl. For example, you can tell mod_perl to preload various perl modules, which saves memory compared to loading separate copies in every Apache process after they are forked. See Stas's definitive mod_perl guide at <a href="http://perl.apache.org/guide">http://perl.apache.org/guide</a>.</p> |
3093 | 1298 | which saves memory compared to loading separate copies in every | 885 | |
3088 | 1299 | Apache process after they are forked. See Stas's definitive | ||
3089 | 1300 | mod_perl guide at <a href="http://perl.apache.org/guide">http://perl.apache.org/guide</a>.</p> | ||
3094 | 1301 | </dd> | 886 | </dd> |
3095 | 1302 | </dl> | 887 | </dl> |
3102 | 1303 | <p>BackupPC_Admin requires that users are authenticated by Apache. | 888 | |
3103 | 1304 | Specifically, it expects that Apache sets the REMOTE_USER environment | 889 | <p>BackupPC_Admin requires that users are authenticated by Apache. Specifically, it expects that Apache sets the REMOTE_USER environment variable when it runs. There are several ways to do this. One way is to create a .htaccess file in the cgi-bin directory that looks like:</p> |
3104 | 1305 | variable when it runs. There are several ways to do this. One way | 890 | |
3105 | 1306 | is to create a .htaccess file in the cgi-bin directory that looks like:</p> | 891 | <pre><code> AuthGroupFile /etc/httpd/conf/group # <--- change path as needed |
3100 | 1307 | <pre> | ||
3101 | 1308 | AuthGroupFile /etc/httpd/conf/group # <--- change path as needed | ||
3106 | 1309 | AuthUserFile /etc/http/conf/passwd # <--- change path as needed | 892 | AuthUserFile /etc/http/conf/passwd # <--- change path as needed |
3107 | 1310 | AuthType basic | 893 | AuthType basic |
3108 | 1311 | AuthName "access" | 894 | AuthName "access" |
3120 | 1312 | require valid-user</pre> | 895 | require valid-user</code></pre> |
3121 | 1313 | <p>You will also need "AllowOverride Indexes AuthConfig" in the Apache | 896 | |
3122 | 1314 | httpd.conf file to enable the .htaccess file. Alternatively, everything | 897 | <p>You will also need "AllowOverride Indexes AuthConfig" in the Apache httpd.conf file to enable the .htaccess file. Alternatively, everything can go in the Apache httpd.conf file inside a Location directive. The list of users and password file above can be extracted from the NIS passwd file.</p> |
3123 | 1315 | can go in the Apache httpd.conf file inside a Location directive. The | 898 | |
3124 | 1316 | list of users and password file above can be extracted from the NIS | 899 | <p>One alternative is to use LDAP. In Apache's http.conf add these lines:</p> |
3125 | 1317 | passwd file.</p> | 900 | |
3126 | 1318 | <p>One alternative is to use LDAP. In Apache's http.conf add these lines:</p> | 901 | <pre><code> LoadModule auth_ldap_module modules/auth_ldap.so |
3127 | 1319 | <pre> | 902 | AddModule auth_ldap.c |
3128 | 1320 | LoadModule auth_ldap_module modules/auth_ldap.so | 903 | |
3118 | 1321 | AddModule auth_ldap.c</pre> | ||
3119 | 1322 | <pre> | ||
3129 | 1323 | # cgi-bin - auth via LDAP (for BackupPC) | 904 | # cgi-bin - auth via LDAP (for BackupPC) |
3130 | 1324 | <Location /cgi-binBackupPC/BackupPC_Admin> # <--- change path as needed | 905 | <Location /cgi-binBackupPC/BackupPC_Admin> # <--- change path as needed |
3131 | 1325 | AuthType Basic | 906 | AuthType Basic |
3132 | @@ -1327,297 +908,220 @@ | |||
3133 | 1327 | # replace MYDOMAIN, PORT, ORG and CO as needed | 908 | # replace MYDOMAIN, PORT, ORG and CO as needed |
3134 | 1328 | AuthLDAPURL ldap://ldap.MYDOMAIN.com:PORT/o=ORG,c=CO?uid?sub?(objectClass=*) | 909 | AuthLDAPURL ldap://ldap.MYDOMAIN.com:PORT/o=ORG,c=CO?uid?sub?(objectClass=*) |
3135 | 1329 | require valid-user | 910 | require valid-user |
3146 | 1330 | </Location></pre> | 911 | </Location></code></pre> |
3147 | 1331 | <p>If you want to disable the user authentication you can set | 912 | |
3148 | 1332 | <a href="#_conf_cgiadminusers_">$Conf{CgiAdminUsers}</a> to '*', which allows any user to have | 913 | <p>If you want to disable the user authentication you can set <a href="#_conf_cgiadminusers_">$Conf{CgiAdminUsers}</a> to '*', which allows any user to have full access to all hosts and backups. In this case the REMOTE_USER environment variable does not have to be set by Apache.</p> |
3149 | 1333 | full access to all hosts and backups. In this case the REMOTE_USER | 914 | |
3150 | 1334 | environment variable does not have to be set by Apache.</p> | 915 | <p>Alternatively, you can force a particular user name by getting Apache to set REMOTE_USER, eg, to hardcode the user to www you could add this to Apache's httpd.conf:</p> |
3151 | 1335 | <p>Alternatively, you can force a particular user name by getting Apache | 916 | |
3152 | 1336 | to set REMOTE_USER, eg, to hardcode the user to www you could add | 917 | <pre><code> <Location /cgi-bin/BackupPC/BackupPC_Admin> # <--- change path as needed |
3143 | 1337 | this to Apache's httpd.conf:</p> | ||
3144 | 1338 | <pre> | ||
3145 | 1339 | <Location /cgi-bin/BackupPC/BackupPC_Admin> # <--- change path as needed | ||
3153 | 1340 | Setenv REMOTE_USER www | 918 | Setenv REMOTE_USER www |
3170 | 1341 | </Location></pre> | 919 | </Location></code></pre> |
3171 | 1342 | <p>Finally, you should also edit the config.pl file and adjust, as necessary, | 920 | |
3172 | 1343 | the CGI-specific settings. They're near the end of the config file. In | 921 | <p>Finally, you should also edit the config.pl file and adjust, as necessary, the CGI-specific settings. They're near the end of the config file. In particular, you should specify which users or groups have administrator (privileged) access: see the config settings <a href="#_conf_cgiadminusergroup_">$Conf{CgiAdminUserGroup}</a> and <a href="#_conf_cgiadminusers_">$Conf{CgiAdminUsers}</a>. Also, the configure.pl script placed various images into <a href="#_conf_cgiimagedir_">$Conf{CgiImageDir}</a> that BackupPC_Admin needs to serve up. You should make sure that <a href="#_conf_cgiimagedirurl_">$Conf{CgiImageDirURL}</a> is the correct URL for the image directory.</p> |
3173 | 1344 | particular, you should specify which users or groups have administrator | 922 | |
3174 | 1345 | (privileged) access: see the config settings <a href="#_conf_cgiadminusergroup_">$Conf{CgiAdminUserGroup}</a> | 923 | <p>See the section <a href="#Fixing-installation-problems">"Fixing installation problems"</a> for suggestions on debugging the Apache authentication setup.</p> |
3175 | 1346 | and <a href="#_conf_cgiadminusers_">$Conf{CgiAdminUsers}</a>. Also, the configure.pl script placed various | 924 | |
3176 | 1347 | images into <a href="#_conf_cgiimagedir_">$Conf{CgiImageDir}</a> that BackupPC_Admin needs to serve | 925 | <h2 id="How-BackupPC-Finds-Hosts">How BackupPC Finds Hosts</h2> |
3177 | 1348 | up. You should make sure that <a href="#_conf_cgiimagedirurl_">$Conf{CgiImageDirURL}</a> is the correct | 926 | |
3178 | 1349 | URL for the image directory.</p> | 927 | <p>Starting with v2.0.0 the way hosts are discovered has changed. In most cases you should specify 0 for the DHCP flag in the conf/hosts file, even if the host has a dynamically assigned IP address.</p> |
3179 | 1350 | <p>See the section <a href="#fixing_installation_problems">Fixing installation problems</a> for suggestions on debugging the Apache authentication setup.</p> | 928 | |
3164 | 1351 | <p> | ||
3165 | 1352 | </p> | ||
3166 | 1353 | <h2><a name="how_backuppc_finds_hosts">How BackupPC Finds Hosts</a></h2> | ||
3167 | 1354 | <p>Starting with v2.0.0 the way hosts are discovered has changed. In most | ||
3168 | 1355 | cases you should specify 0 for the DHCP flag in the conf/hosts file, | ||
3169 | 1356 | even if the host has a dynamically assigned IP address.</p> | ||
3180 | 1357 | <p>BackupPC (starting with v2.0.0) looks up hosts with DHCP = 0 in this manner:</p> | 929 | <p>BackupPC (starting with v2.0.0) looks up hosts with DHCP = 0 in this manner:</p> |
3181 | 930 | |||
3182 | 1358 | <ul> | 931 | <ul> |
3191 | 1359 | <li> | 932 | |
3192 | 1360 | <p>First DNS is used to lookup the IP address given the client's name | 933 | <li><p>First DNS is used to lookup the IP address given the client's name using perl's gethostbyname() function. This should succeed for machines that have fixed IP addresses that are known via DNS. You can manually see whether a given host have a DNS entry according to perl's gethostbyname function with this command:</p> |
3193 | 1361 | using perl's <code>gethostbyname()</code> function. This should succeed for machines | 934 | |
3194 | 1362 | that have fixed IP addresses that are known via DNS. You can manually | 935 | <pre><code> perl -e 'print(gethostbyname("myhost") ? "ok\n" : "not found\n");'</code></pre> |
3195 | 1363 | see whether a given host have a DNS entry according to perl's | 936 | |
3188 | 1364 | gethostbyname function with this command:</p> | ||
3189 | 1365 | <pre> | ||
3190 | 1366 | perl -e 'print(gethostbyname("myhost") ? "ok\n" : "not found\n");'</pre> | ||
3196 | 1367 | </li> | 937 | </li> |
3204 | 1368 | <li> | 938 | <li><p>If gethostbyname() fails, BackupPC then attempts a NetBios multicast to find the host. Provided your client machine is configured properly, it should respond to this NetBios multicast request. Specifically, BackupPC runs a command of this form:</p> |
3205 | 1369 | <p>If <code>gethostbyname()</code> fails, BackupPC then attempts a NetBios multicast to | 939 | |
3206 | 1370 | find the host. Provided your client machine is configured properly, | 940 | <pre><code> nmblookup myhost</code></pre> |
3207 | 1371 | it should respond to this NetBios multicast request. Specifically, | 941 | |
3201 | 1372 | BackupPC runs a command of this form:</p> | ||
3202 | 1373 | <pre> | ||
3203 | 1374 | nmblookup myhost</pre> | ||
3208 | 1375 | <p>If this fails you will see output like:</p> | 942 | <p>If this fails you will see output like:</p> |
3212 | 1376 | <pre> | 943 | |
3213 | 1377 | querying myhost on 10.10.255.255 | 944 | <pre><code> querying myhost on 10.10.255.255 |
3214 | 1378 | name_query failed to find name myhost</pre> | 945 | name_query failed to find name myhost</code></pre> |
3215 | 946 | |||
3216 | 1379 | <p>If it is successful you will see output like:</p> | 947 | <p>If it is successful you will see output like:</p> |
3227 | 1380 | <pre> | 948 | |
3228 | 1381 | querying myhost on 10.10.255.255 | 949 | <pre><code> querying myhost on 10.10.255.255 |
3229 | 1382 | 10.10.1.73 myhost<00></pre> | 950 | 10.10.1.73 myhost<00></code></pre> |
3230 | 1383 | <p>Depending on your netmask you might need to specify the -B option to | 951 | |
3231 | 1384 | nmblookup. For example:</p> | 952 | <p>Depending on your netmask you might need to specify the -B option to nmblookup. For example:</p> |
3232 | 1385 | <pre> | 953 | |
3233 | 1386 | nmblookup -B 10.10.1.255 myhost</pre> | 954 | <pre><code> nmblookup -B 10.10.1.255 myhost</code></pre> |
3234 | 1387 | <p>If necessary, experiment with the nmblookup command which will return the | 955 | |
3235 | 1388 | IP address of the client given its name. Then update | 956 | <p>If necessary, experiment with the nmblookup command which will return the IP address of the client given its name. Then update <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> with any necessary options to nmblookup.</p> |
3236 | 1389 | <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> with any necessary options to nmblookup.</p> | 957 | |
3237 | 1390 | </li> | 958 | </li> |
3238 | 1391 | </ul> | 959 | </ul> |
3241 | 1392 | <p>For hosts that have the DHCP flag set to 1, these machines are | 960 | |
3242 | 1393 | discovered as follows:</p> | 961 | <p>For hosts that have the DHCP flag set to 1, these machines are discovered as follows:</p> |
3243 | 962 | |||
3244 | 1394 | <ul> | 963 | <ul> |
3255 | 1395 | <li> | 964 | |
3256 | 1396 | <p>A DHCP address pool (<a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>) needs to be specified. | 965 | <li><p>A DHCP address pool (<a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>) needs to be specified. BackupPC will check the NetBIOS name of each machine in the range using a command of the form:</p> |
3257 | 1397 | BackupPC will check the NetBIOS name of each machine in the range using | 966 | |
3258 | 1398 | a command of the form:</p> | 967 | <pre><code> nmblookup -A W.X.Y.Z</code></pre> |
3259 | 1399 | <pre> | 968 | |
3260 | 1400 | nmblookup -A W.X.Y.Z</pre> | 969 | <p>where W.X.Y.Z is each candidate address from <a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>. Any host that has a valid NetBIOS name returned by this command (ie: matching an entry in the hosts file) will be backed up. You can modify the specific nmblookup command if necessary via <a href="#_conf_nmblookupcmd_">$Conf{NmbLookupCmd}</a>.</p> |
3261 | 1401 | <p>where W.X.Y.Z is each candidate address from <a href="#_conf_dhcpaddressranges_">$Conf{DHCPAddressRanges}</a>. | 970 | |
3252 | 1402 | Any host that has a valid NetBIOS name returned by this command (ie: | ||
3253 | 1403 | matching an entry in the hosts file) will be backed up. You can | ||
3254 | 1404 | modify the specific nmblookup command if necessary via <a href="#_conf_nmblookupcmd_">$Conf{NmbLookupCmd}</a>.</p> | ||
3262 | 1405 | </li> | 971 | </li> |
3268 | 1406 | <li> | 972 | <li><p>You only need to use this DHCP feature if your client machine doesn't respond to the NetBios multicast request:</p> |
3269 | 1407 | <p>You only need to use this DHCP feature if your client machine doesn't | 973 | |
3270 | 1408 | respond to the NetBios multicast request:</p> | 974 | <pre><code> nmblookup myHost</code></pre> |
3271 | 1409 | <pre> | 975 | |
3267 | 1410 | nmblookup myHost</pre> | ||
3272 | 1411 | <p>but does respond to a request directed to its IP address:</p> | 976 | <p>but does respond to a request directed to its IP address:</p> |
3275 | 1412 | <pre> | 977 | |
3276 | 1413 | nmblookup -A W.X.Y.Z</pre> | 978 | <pre><code> nmblookup -A W.X.Y.Z</code></pre> |
3277 | 979 | |||
3278 | 1414 | </li> | 980 | </li> |
3279 | 1415 | </ul> | 981 | </ul> |
3283 | 1416 | <p> | 982 | |
3284 | 1417 | </p> | 983 | <h2 id="Other-installation-topics">Other installation topics</h2> |
3285 | 1418 | <h2><a name="other_installation_topics">Other installation topics</a></h2> | 984 | |
3286 | 1419 | <dl> | 985 | <dl> |
3287 | 1420 | <dt><strong><a name="removing_a_client" class="item">Removing a client</a></strong></dt> | ||
3288 | 1421 | 986 | ||
3289 | 987 | <dt id="Removing-a-client">Removing a client</dt> | ||
3290 | 1422 | <dd> | 988 | <dd> |
3297 | 1423 | <p>If there is a machine that no longer needs to be backed up (eg: a retired | 989 | |
3298 | 1424 | machine) you have two choices. First, you can keep the backups accessible | 990 | <p>If there is a machine that no longer needs to be backed up (eg: a retired machine) you have two choices. First, you can keep the backups accessible and browsable, but disable all new backups. Alternatively, you can completely remove the client and all its backups.</p> |
3299 | 1425 | and browsable, but disable all new backups. Alternatively, you can | 991 | |
3300 | 1426 | completely remove the client and all its backups.</p> | 992 | <p>To disable backups for a client <a href="#_conf_backupsdisable_">$Conf{BackupsDisable}</a> can be set to two different values in that client's per-PC config.pl file:</p> |
3301 | 1427 | <p>To disable backups for a client <a href="#_conf_backupsdisable_">$Conf{BackupsDisable}</a> can be | 993 | |
3296 | 1428 | set to two different values in that client's per-PC config.pl file:</p> | ||
3302 | 1429 | <ol> | 994 | <ol> |
3306 | 1430 | <li> | 995 | |
3307 | 1431 | <p>Don't do any regular backups on this machine. Manually | 996 | <li><p>Don't do any regular backups on this machine. Manually requested backups (via the CGI interface) will still occur.</p> |
3308 | 1432 | requested backups (via the CGI interface) will still occur.</p> | 997 | |
3309 | 1433 | </li> | 998 | </li> |
3313 | 1434 | <li> | 999 | <li><p>Don't do any backups on this machine. Manually requested backups (via the CGI interface) will be ignored.</p> |
3314 | 1435 | <p>Don't do any backups on this machine. Manually requested | 1000 | |
3312 | 1436 | backups (via the CGI interface) will be ignored.</p> | ||
3315 | 1437 | </li> | 1001 | </li> |
3316 | 1438 | </ol> | 1002 | </ol> |
3330 | 1439 | <p>This will still allow the client's old backups to be browsable | 1003 | |
3331 | 1440 | and restorable.</p> | 1004 | <p>This will still allow the client's old backups to be browsable and restorable.</p> |
3332 | 1441 | <p>To completely remove a client and all its backups, you should remove its | 1005 | |
3333 | 1442 | entry in the conf/hosts file, and then delete the __TOPDIR__/pc/$host | 1006 | <p>To completely remove a client and all its backups, you should remove its entry in the conf/hosts file, and then delete the __TOPDIR__/pc/$host directory. Whenever you change the hosts file, you should send BackupPC a HUP (-1) signal so that it re-reads the hosts file. If you don't do this, BackupPC will automatically re-read the hosts file at the next regular wakeup.</p> |
3334 | 1443 | directory. Whenever you change the hosts file, you should send | 1007 | |
3335 | 1444 | BackupPC a HUP (-1) signal so that it re-reads the hosts file. | 1008 | <p>Note that when you remove a client's backups you won't initially recover much disk space. That's because the client's files are still in the pool. Overnight, when BackupPC_nightly next runs, all the unused pool files will be deleted and this will recover the disk space used by the client's backups.</p> |
3336 | 1445 | If you don't do this, BackupPC will automatically re-read the | 1009 | |
3324 | 1446 | hosts file at the next regular wakeup.</p> | ||
3325 | 1447 | <p>Note that when you remove a client's backups you won't initially | ||
3326 | 1448 | recover much disk space. That's because the client's files are | ||
3327 | 1449 | still in the pool. Overnight, when BackupPC_nightly next runs, | ||
3328 | 1450 | all the unused pool files will be deleted and this will recover | ||
3329 | 1451 | the disk space used by the client's backups.</p> | ||
3337 | 1452 | </dd> | 1010 | </dd> |
3340 | 1453 | <dt><strong><a name="copying_the_pool" class="item">Copying the pool</a></strong></dt> | 1011 | <dt id="Copying-the-pool">Copying the pool</dt> |
3339 | 1454 | |||
3341 | 1455 | <dd> | 1012 | <dd> |
3366 | 1456 | <p>If the pool disk requirements grow you might need to copy the entire | 1013 | |
3367 | 1457 | data directory to a new (bigger) file system. Hopefully you are lucky | 1014 | <p>If the pool disk requirements grow you might need to copy the entire data directory to a new (bigger) file system. Hopefully you are lucky enough to avoid this by having the data directory on a RAID file system or LVM that allows the capacity to be grown in place by adding disks.</p> |
3368 | 1458 | enough to avoid this by having the data directory on a RAID file system | 1015 | |
3369 | 1459 | or LVM that allows the capacity to be grown in place by adding disks.</p> | 1016 | <p>The backup data directories contain large numbers of hardlinks. If you try to copy the pool the target directory will occupy a lot more space if the hardlinks aren't re-established.</p> |
3370 | 1460 | <p>The backup data directories contain large numbers of hardlinks. If | 1017 | |
3371 | 1461 | you try to copy the pool the target directory will occupy a lot more | 1018 | <p>The best way to copy a pool file system, if possible, is by copying the raw device at the block level (eg: using dd). Application level programs that understand hardlinks include the GNU cp program with the -a option and rsync -H. However, the large number of hardlinks in the pool will make the memory usage large and the copy very slow. Don't forget to stop BackupPC while the copy runs.</p> |
3372 | 1462 | space if the hardlinks aren't re-established.</p> | 1019 | |
3373 | 1463 | <p>The best way to copy a pool file system, if possible, is by copying | 1020 | <p>Starting in 3.0.0 a new script bin/BackupPC_tarPCCopy can be used to assist the copy process. Given one or more pc paths (eg: TOPDIR/pc/HOST or TOPDIR/pc/HOST/nnn), BackupPC_tarPCCopy creates a tar archive with all the hardlinks pointing to ../cpool/.... Any files not hardlinked (eg: backups, LOG etc) are included verbatim.</p> |
3374 | 1464 | the raw device at the block level (eg: using dd). Application level | 1021 | |
3375 | 1465 | programs that understand hardlinks include the GNU cp program with | 1022 | <p>You will need to specify the -P option to tar when you extract the archive generated by BackupPC_tarPCCopy since the hardlink targets are outside of the directory being extracted.</p> |
3376 | 1466 | the -a option and rsync -H. However, the large number of hardlinks | 1023 | |
3377 | 1467 | in the pool will make the memory usage large and the copy very slow. | 1024 | <p>To copy a complete store (ie: __TOPDIR__) using BackupPC_tarPCCopy you should:</p> |
3378 | 1468 | Don't forget to stop BackupPC while the copy runs.</p> | 1025 | |
3355 | 1469 | <p>Starting in 3.0.0 a new script bin/BackupPC_tarPCCopy can be | ||
3356 | 1470 | used to assist the copy process. Given one or more pc paths | ||
3357 | 1471 | (eg: TOPDIR/pc/HOST or TOPDIR/pc/HOST/nnn), BackupPC_tarPCCopy | ||
3358 | 1472 | creates a tar archive with all the hardlinks pointing to ../cpool/.... | ||
3359 | 1473 | Any files not hardlinked (eg: backups, LOG etc) are included | ||
3360 | 1474 | verbatim.</p> | ||
3361 | 1475 | <p>You will need to specify the -P option to tar when you extract | ||
3362 | 1476 | the archive generated by BackupPC_tarPCCopy since the hardlink | ||
3363 | 1477 | targets are outside of the directory being extracted.</p> | ||
3364 | 1478 | <p>To copy a complete store (ie: __TOPDIR__) using BackupPC_tarPCCopy | ||
3365 | 1479 | you should:</p> | ||
3379 | 1480 | <ul> | 1026 | <ul> |
3391 | 1481 | <li> | 1027 | |
3392 | 1482 | <p>stop BackupPC so that the store is static.</p> | 1028 | <li><p>stop BackupPC so that the store is static.</p> |
3393 | 1483 | </li> | 1029 | |
3394 | 1484 | <li> | 1030 | </li> |
3395 | 1485 | <p>copy the cpool, conf and log directory trees using any technique | 1031 | <li><p>copy the cpool, conf and log directory trees using any technique (like cp, rsync or tar) without the need to preserve hardlinks.</p> |
3396 | 1486 | (like cp, rsync or tar) without the need to preserve hardlinks.</p> | 1032 | |
3397 | 1487 | </li> | 1033 | </li> |
3398 | 1488 | <li> | 1034 | <li><p>copy the pc directory using BackupPC_tarPCCopy:</p> |
3399 | 1489 | <p>copy the pc directory using BackupPC_tarPCCopy:</p> | 1035 | |
3400 | 1490 | <pre> | 1036 | <pre><code> su __BACKUPPCUSER__ |
3390 | 1491 | su __BACKUPPCUSER__ | ||
3401 | 1492 | cd NEW_TOPDIR | 1037 | cd NEW_TOPDIR |
3402 | 1493 | mkdir pc | 1038 | mkdir pc |
3403 | 1494 | cd pc | 1039 | cd pc |
3405 | 1495 | __INSTALLDIR__/bin/BackupPC_tarPCCopy __TOPDIR__/pc | tar xvPf -</pre> | 1040 | __INSTALLDIR__/bin/BackupPC_tarPCCopy __TOPDIR__/pc | tar xvPf -</code></pre> |
3406 | 1041 | |||
3407 | 1496 | </li> | 1042 | </li> |
3408 | 1497 | </ul> | 1043 | </ul> |
3409 | 1044 | |||
3410 | 1498 | </dd> | 1045 | </dd> |
3411 | 1499 | </dl> | 1046 | </dl> |
3421 | 1500 | <p> | 1047 | |
3422 | 1501 | </p> | 1048 | <h2 id="Fixing-installation-problems">Fixing installation problems</h2> |
3423 | 1502 | <h2><a name="fixing_installation_problems">Fixing installation problems</a></h2> | 1049 | |
3424 | 1503 | <p>Please see the Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a> for | 1050 | <p>Please see the Wiki at <a href="http://backuppc.wiki.sourceforge.net">http://backuppc.wiki.sourceforge.net</a> for debugging suggestions. If you find a solution to your problem that could help other users please add it to the Wiki!</p> |
3425 | 1504 | debugging suggestions. If you find a solution to your problem that | 1051 | |
3417 | 1505 | could help other users please add it to the Wiki!</p> | ||
3418 | 1506 | <p> | ||
3419 | 1507 | <a href="#__index__"><small>Back to Top</small></a> | ||
3420 | 1508 | </p> | ||
3426 | 1509 | <hr /> | 1052 | <hr /> |
3454 | 1510 | <h1><a name="restore_functions">Restore functions</a></h1> | 1053 | <h1 id="Restore-functions">Restore functions</h1> |
3455 | 1511 | <p>BackupPC supports several different methods for restoring files. The | 1054 | |
3456 | 1512 | most convenient restore options are provided via the CGI interface. | 1055 | <p>BackupPC supports several different methods for restoring files. The most convenient restore options are provided via the CGI interface. Alternatively, backup files can be restored using manual commands.</p> |
3457 | 1513 | Alternatively, backup files can be restored using manual commands.</p> | 1056 | |
3458 | 1514 | <p> | 1057 | <h2 id="CGI-restore-options">CGI restore options</h2> |
3459 | 1515 | </p> | 1058 | |
3460 | 1516 | <h2><a name="cgi_restore_options">CGI restore options</a></h2> | 1059 | <p>By selecting a host in the CGI interface, a list of all the backups for that machine will be displayed. By selecting the backup number you can navigate the shares and directory tree for that backup.</p> |
3461 | 1517 | <p>By selecting a host in the CGI interface, a list of all the backups | 1060 | |
3462 | 1518 | for that machine will be displayed. By selecting the backup number | 1061 | <p>BackupPC's CGI interface automatically fills incremental backups with the corresponding full backup, which means each backup has a filled appearance. Therefore, there is no need to do multiple restores from the incremental and full backups: BackupPC does all the hard work for you. You simply select the files and directories you want from the correct backup vintage in one step.</p> |
3463 | 1519 | you can navigate the shares and directory tree for that backup.</p> | 1062 | |
3464 | 1520 | <p>BackupPC's CGI interface automatically fills incremental backups | 1063 | <p>You can download a single backup file at any time simply by selecting it. Your browser should prompt you with the file name and ask you whether to open the file or save it to disk.</p> |
3465 | 1521 | with the corresponding full backup, which means each backup has | 1064 | |
3466 | 1522 | a filled appearance. Therefore, there is no need to do multiple | 1065 | <p>Alternatively, you can select one or more files or directories in the currently selected directory and select "Restore selected files". (If you need to restore selected files and directories from several different parent directories you will need to do that in multiple steps.)</p> |
3467 | 1523 | restores from the incremental and full backups: BackupPC does all | 1066 | |
3468 | 1524 | the hard work for you. You simply select the files and directories | 1067 | <p>If you select all the files in a directory, BackupPC will replace the list of files with the parent directory. You will be presented with a screen that has three options:</p> |
3469 | 1525 | you want from the correct backup vintage in one step.</p> | 1068 | |
3443 | 1526 | <p>You can download a single backup file at any time simply by selecting | ||
3444 | 1527 | it. Your browser should prompt you with the file name and ask you | ||
3445 | 1528 | whether to open the file or save it to disk.</p> | ||
3446 | 1529 | <p>Alternatively, you can select one or more files or directories in | ||
3447 | 1530 | the currently selected directory and select "Restore selected files". | ||
3448 | 1531 | (If you need to restore selected files and directories from several | ||
3449 | 1532 | different parent directories you will need to do that in multiple | ||
3450 | 1533 | steps.)</p> | ||
3451 | 1534 | <p>If you select all the files in a directory, BackupPC will replace | ||
3452 | 1535 | the list of files with the parent directory. You will be presented | ||
3453 | 1536 | with a screen that has three options:</p> | ||
3470 | 1537 | <dl> | 1069 | <dl> |
3522 | 1538 | <dt><strong><a name="option_1_direct_restore" class="item">Option 1: Direct Restore</a></strong></dt> | 1070 | |
3523 | 1539 | 1071 | <dt id="Option-1:-Direct-Restore">Option 1: Direct Restore</dt> | |
3524 | 1540 | <dd> | 1072 | <dd> |
3525 | 1541 | <p>With this option the selected files and directories are restored | 1073 | |
3526 | 1542 | directly back onto the host, by default in their original location. | 1074 | <p>With this option the selected files and directories are restored directly back onto the host, by default in their original location. Any old files with the same name will be overwritten, so use caution. You can optionally change the target host name, target share name, and target path prefix for the restore, allowing you to restore the files to a different location.</p> |
3527 | 1543 | Any old files with the same name will be overwritten, so use caution. | 1075 | |
3528 | 1544 | You can optionally change the target host name, target share name, | 1076 | <p>Once you select "Start Restore" you will be prompted one last time with a summary of the exact source and target files and directories before you commit. When you give the final go ahead the restore operation will be queued like a normal backup job, meaning that it will be deferred if there is a backup currently running for that host. When the restore job is run, smbclient, tar, rsync or rsyncd is used (depending upon <a href="#_conf_xfermethod_">$Conf{XferMethod}</a>) to actually restore the files. Sorry, there is currently no option to cancel a restore that has been started. Currently ftp restores are not fully implemented.</p> |
3529 | 1545 | and target path prefix for the restore, allowing you to restore the | 1077 | |
3530 | 1546 | files to a different location.</p> | 1078 | <p>A record of the restore request, including the result and list of files and directories, is kept. It can be browsed from the host's home page. <a href="#_conf_restoreinfokeepcnt_">$Conf{RestoreInfoKeepCnt}</a> specifies how many old restore status files to keep.</p> |
3531 | 1547 | <p>Once you select "Start Restore" you will be prompted one last time | 1079 | |
3532 | 1548 | with a summary of the exact source and target files and directories | 1080 | <p>Note that for direct restore to work, the <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> must be able to write to the client. For example, that means an SMB share for smbclient needs to be writable, and the rsyncd module needs "read only" set to "false". This creates additional security risks. If you only create read-only SMB shares (which is a good idea), then the direct restore will fail. You can disable the direct restore option by setting <a href="#_conf_smbclientrestorecmd_">$Conf{SmbClientRestoreCmd}</a>, <a href="#_conf_tarclientrestorecmd_">$Conf{TarClientRestoreCmd}</a> and <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a> to undef.</p> |
3533 | 1549 | before you commit. When you give the final go ahead the restore | 1081 | |
3534 | 1550 | operation will be queued like a normal backup job, meaning that it | 1082 | </dd> |
3535 | 1551 | will be deferred if there is a backup currently running for that host. | 1083 | <dt id="Option-2:-Download-Zip-archive">Option 2: Download Zip archive</dt> |
3536 | 1552 | When the restore job is run, smbclient, tar, rsync or rsyncd is used | 1084 | <dd> |
3537 | 1553 | (depending upon <a href="#_conf_xfermethod_">$Conf{XferMethod}</a>) to actually restore the files. | 1085 | |
3538 | 1554 | Sorry, there is currently no option to cancel a restore that has been | 1086 | <p>With this option a zip file containing the selected files and directories is downloaded. The zip file can then be unpacked or individual files extracted as necessary on the host machine. The compression level can be specified. A value of 0 turns off compression.</p> |
3539 | 1555 | started. Currently ftp restores are not fully implemented.</p> | 1087 | |
3540 | 1556 | <p>A record of the restore request, including the result and list of | 1088 | <p>When you select "Download Zip File" you should be prompted where to save the restore.zip file.</p> |
3541 | 1557 | files and directories, is kept. It can be browsed from the host's | 1089 | |
3542 | 1558 | home page. <a href="#_conf_restoreinfokeepcnt_">$Conf{RestoreInfoKeepCnt}</a> specifies how many old restore | 1090 | <p>BackupPC does not consider downloading a zip file as an actual restore operation, so the details are not saved for later browsing as in the first case. However, a mention that a zip file was downloaded by a particular user, and a list of the files, does appear in BackupPC's log file.</p> |
3543 | 1559 | status files to keep.</p> | 1091 | |
3544 | 1560 | <p>Note that for direct restore to work, the <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> must | 1092 | </dd> |
3545 | 1561 | be able to write to the client. For example, that means an SMB | 1093 | <dt id="Option-3:-Download-Tar-archive">Option 3: Download Tar archive</dt> |
3546 | 1562 | share for smbclient needs to be writable, and the rsyncd module | 1094 | <dd> |
3547 | 1563 | needs "read only" set to "false". This creates additional security | 1095 | |
3548 | 1564 | risks. If you only create read-only SMB shares (which is a good | 1096 | <p>This is identical to the previous option, except a tar file is downloaded rather than a zip file (and there is currently no compression option).</p> |
3549 | 1565 | idea), then the direct restore will fail. You can disable the | 1097 | |
3499 | 1566 | direct restore option by setting <a href="#_conf_smbclientrestorecmd_">$Conf{SmbClientRestoreCmd}</a>, | ||
3500 | 1567 | <a href="#_conf_tarclientrestorecmd_">$Conf{TarClientRestoreCmd}</a> and <a href="#_conf_rsyncrestoreargs_">$Conf{RsyncRestoreArgs}</a> to undef.</p> | ||
3501 | 1568 | </dd> | ||
3502 | 1569 | <dt><strong><a name="option_2_download_zip_archive" class="item">Option 2: Download Zip archive</a></strong></dt> | ||
3503 | 1570 | |||
3504 | 1571 | <dd> | ||
3505 | 1572 | <p>With this option a zip file containing the selected files and directories | ||
3506 | 1573 | is downloaded. The zip file can then be unpacked or individual files | ||
3507 | 1574 | extracted as necessary on the host machine. The compression level can be | ||
3508 | 1575 | specified. A value of 0 turns off compression.</p> | ||
3509 | 1576 | <p>When you select "Download Zip File" you should be prompted where to | ||
3510 | 1577 | save the restore.zip file.</p> | ||
3511 | 1578 | <p>BackupPC does not consider downloading a zip file as an actual | ||
3512 | 1579 | restore operation, so the details are not saved for later browsing | ||
3513 | 1580 | as in the first case. However, a mention that a zip file was | ||
3514 | 1581 | downloaded by a particular user, and a list of the files, does | ||
3515 | 1582 | appear in BackupPC's log file.</p> | ||
3516 | 1583 | </dd> | ||
3517 | 1584 | <dt><strong><a name="option_3_download_tar_archive" class="item">Option 3: Download Tar archive</a></strong></dt> | ||
3518 | 1585 | |||
3519 | 1586 | <dd> | ||
3520 | 1587 | <p>This is identical to the previous option, except a tar file is downloaded | ||
3521 | 1588 | rather than a zip file (and there is currently no compression option).</p> | ||
3550 | 1589 | </dd> | 1098 | </dd> |
3551 | 1590 | </dl> | 1099 | </dl> |
3558 | 1591 | <p> | 1100 | |
3559 | 1592 | </p> | 1101 | <h2 id="Command-line-restore-options">Command-line restore options</h2> |
3560 | 1593 | <h2><a name="command_line_restore_options">Command-line restore options</a></h2> | 1102 | |
3561 | 1594 | <p>Apart from the CGI interface, BackupPC allows you to restore files | 1103 | <p>Apart from the CGI interface, BackupPC allows you to restore files and directories from the command line. The following programs can be used:</p> |
3562 | 1595 | and directories from the command line. The following programs can | 1104 | |
3557 | 1596 | be used:</p> | ||
3563 | 1597 | <dl> | 1105 | <dl> |
3564 | 1598 | <dt><strong><a name="backuppc_zcat" class="item">BackupPC_zcat</a></strong></dt> | ||
3565 | 1599 | 1106 | ||
3566 | 1107 | <dt id="BackupPC_zcat">BackupPC_zcat</dt> | ||
3567 | 1600 | <dd> | 1108 | <dd> |
3577 | 1601 | <p>For each file name argument it inflates (uncompresses) the file and | 1109 | |
3578 | 1602 | writes it to stdout. To use BackupPC_zcat you could give it the | 1110 | <p>For each file name argument it inflates (uncompresses) the file and writes it to stdout. To use BackupPC_zcat you could give it the full file name, eg:</p> |
3579 | 1603 | full file name, eg:</p> | 1111 | |
3580 | 1604 | <pre> | 1112 | <pre><code> __INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/host/5/fc/fcraig/fexample.txt > example.txt</code></pre> |
3581 | 1605 | __INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/host/5/fc/fcraig/fexample.txt > example.txt</pre> | 1113 | |
3582 | 1606 | <p>It's your responsibility to make sure the file is really compressed: | 1114 | <p>It's your responsibility to make sure the file is really compressed: BackupPC_zcat doesn't check which backup the requested file is from. BackupPC_zcat returns a non-zero status if it fails to uncompress a file.</p> |
3583 | 1607 | BackupPC_zcat doesn't check which backup the requested file is from. | 1115 | |
3575 | 1608 | BackupPC_zcat returns a non-zero status if it fails to uncompress | ||
3576 | 1609 | a file.</p> | ||
3584 | 1610 | </dd> | 1116 | </dd> |
3587 | 1611 | <dt><strong><a name="backuppc_tarcreate" class="item">BackupPC_tarCreate</a></strong></dt> | 1117 | <dt id="BackupPC_tarCreate">BackupPC_tarCreate</dt> |
3586 | 1612 | |||
3588 | 1613 | <dd> | 1118 | <dd> |
3593 | 1614 | <p>BackupPC_tarCreate creates a tar file for any files or directories in | 1119 | |
3594 | 1615 | a particular backup. Merging of incrementals is done automatically, | 1120 | <p>BackupPC_tarCreate creates a tar file for any files or directories in a particular backup. Merging of incrementals is done automatically, so you don't need to worry about whether certain files appear in the incremental or full backup.</p> |
3595 | 1616 | so you don't need to worry about whether certain files appear in the | 1121 | |
3592 | 1617 | incremental or full backup.</p> | ||
3596 | 1618 | <p>The usage is:</p> | 1122 | <p>The usage is:</p> |
3599 | 1619 | <pre> | 1123 | |
3600 | 1620 | BackupPC_tarCreate [options] files/directories... | 1124 | <pre><code> BackupPC_tarCreate [options] files/directories... |
3601 | 1621 | Required options: | 1125 | Required options: |
3602 | 1622 | -h host host from which the tar archive is created | 1126 | -h host host from which the tar archive is created |
3603 | 1623 | -n dumpNum dump number from which the tar archive is created | 1127 | -n dumpNum dump number from which the tar archive is created |
3604 | @@ -1633,25 +1137,22 @@ | |||
3605 | 1633 | -w writeBufSz write buffer size (default 1048576 = 1MB) | 1137 | -w writeBufSz write buffer size (default 1048576 = 1MB) |
3606 | 1634 | -e charset charset for encoding file names (default: value of | 1138 | -e charset charset for encoding file names (default: value of |
3607 | 1635 | <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> when backup was done) | 1139 | <a href="#_conf_clientcharset_">$Conf{ClientCharset}</a> when backup was done) |
3616 | 1636 | -l just print a file listing; don't generate an archive | 1140 | -l just print a file listing; don't generate an archive |
3617 | 1637 | -L just print a detailed file listing; don't generate an archive</pre> | 1141 | -L just print a detailed file listing; don't generate an archive</code></pre> |
3618 | 1638 | <p>The command-line files and directories are relative to the specified | 1142 | |
3619 | 1639 | shareName. The tar file is written to stdout.</p> | 1143 | <p>The command-line files and directories are relative to the specified shareName. The tar file is written to stdout.</p> |
3620 | 1640 | <p>The -h, -n and -s options specify which dump is used to generate | 1144 | |
3621 | 1641 | the tar archive. The -r and -p options can be used to relocate | 1145 | <p>The -h, -n and -s options specify which dump is used to generate the tar archive. The -r and -p options can be used to relocate the paths in the tar archive so extracted files can be placed in a location different from their original location.</p> |
3622 | 1642 | the paths in the tar archive so extracted files can be placed | 1146 | |
3615 | 1643 | in a location different from their original location.</p> | ||
3623 | 1644 | </dd> | 1147 | </dd> |
3626 | 1645 | <dt><strong><a name="backuppc_zipcreate" class="item">BackupPC_zipCreate</a></strong></dt> | 1148 | <dt id="BackupPC_zipCreate">BackupPC_zipCreate</dt> |
3625 | 1646 | |||
3627 | 1647 | <dd> | 1149 | <dd> |
3632 | 1648 | <p>BackupPC_zipCreate creates a zip file for any files or directories in | 1150 | |
3633 | 1649 | a particular backup. Merging of incrementals is done automatically, | 1151 | <p>BackupPC_zipCreate creates a zip file for any files or directories in a particular backup. Merging of incrementals is done automatically, so you don't need to worry about whether certain files appear in the incremental or full backup.</p> |
3634 | 1650 | so you don't need to worry about whether certain files appear in the | 1152 | |
3631 | 1651 | incremental or full backup.</p> | ||
3635 | 1652 | <p>The usage is:</p> | 1153 | <p>The usage is:</p> |
3638 | 1653 | <pre> | 1154 | |
3639 | 1654 | BackupPC_zipCreate [options] files/directories... | 1155 | <pre><code> BackupPC_zipCreate [options] files/directories... |
3640 | 1655 | Required options: | 1156 | Required options: |
3641 | 1656 | -h host host from which the zip archive is created | 1157 | -h host host from which the zip archive is created |
3642 | 1657 | -n dumpNum dump number from which the tar archive is created | 1158 | -n dumpNum dump number from which the tar archive is created |
3643 | @@ -1664,1239 +1165,967 @@ | |||
3644 | 1664 | -r pathRemove path prefix that will be replaced with pathAdd | 1165 | -r pathRemove path prefix that will be replaced with pathAdd |
3645 | 1665 | -p pathAdd new path prefix | 1166 | -p pathAdd new path prefix |
3646 | 1666 | -c level compression level (default is 0, no compression) | 1167 | -c level compression level (default is 0, no compression) |
3654 | 1667 | -e charset charset for encoding file names (default: cp1252)</pre> | 1168 | -e charset charset for encoding file names (default: utf8)</code></pre> |
3655 | 1668 | <p>The command-line files and directories are relative to the specified | 1169 | |
3656 | 1669 | shareName. The zip file is written to stdout. The -h, -n and -s | 1170 | <p>The command-line files and directories are relative to the specified shareName. The zip file is written to stdout. The -h, -n and -s options specify which dump is used to generate the zip archive. The -r and -p options can be used to relocate the paths in the zip archive so extracted files can be placed in a location different from their original location.</p> |
3657 | 1670 | options specify which dump is used to generate the zip archive. The | 1171 | |
3651 | 1671 | -r and -p options can be used to relocate the paths in the zip archive | ||
3652 | 1672 | so extracted files can be placed in a location different from their | ||
3653 | 1673 | original location.</p> | ||
3658 | 1674 | </dd> | 1172 | </dd> |
3659 | 1675 | </dl> | 1173 | </dl> |
3660 | 1174 | |||
3661 | 1676 | <p>Each of these programs reside in __INSTALLDIR__/bin.</p> | 1175 | <p>Each of these programs reside in __INSTALLDIR__/bin.</p> |
3665 | 1677 | <p> | 1176 | |
3663 | 1678 | <a href="#__index__"><small>Back to Top</small></a> | ||
3664 | 1679 | </p> | ||
3666 | 1680 | <hr /> | 1177 | <hr /> |
3697 | 1681 | <h1><a name="archive_functions">Archive functions</a></h1> | 1178 | <h1 id="Archive-functions">Archive functions</h1> |
3698 | 1682 | <p>BackupPC supports archiving to removable media. For users that require | 1179 | |
3699 | 1683 | offsite backups, BackupPC can create archives that stream to tape | 1180 | <p>BackupPC supports archiving to removable media. For users that require offsite backups, BackupPC can create archives that stream to tape devices, or create files of specified sizes to fit onto cd or dvd media.</p> |
3700 | 1684 | devices, or create files of specified sizes to fit onto cd or dvd media.</p> | 1181 | |
3701 | 1685 | <p>Each archive type is specified by a BackupPC host with its XferMethod | 1182 | <p>Each archive type is specified by a BackupPC host with its XferMethod set to 'archive'. This allows for multiple configurations at sites where there might be a combination of tape and cd/dvd backups being made.</p> |
3702 | 1686 | set to 'archive'. This allows for multiple configurations at sites where | 1183 | |
3703 | 1687 | there might be a combination of tape and cd/dvd backups being made.</p> | 1184 | <p>BackupPC provides a menu that allows one or more hosts to be archived. The most recent backup of each host is archived using BackupPC_tarCreate, and the output is optionally compressed and split into fixed-sized files (eg: 650MB).</p> |
3704 | 1688 | <p>BackupPC provides a menu that allows one or more hosts to be archived. | 1185 | |
3705 | 1689 | The most recent backup of each host is archived using BackupPC_tarCreate, | 1186 | <p>The archive for each host is done by default using __INSTALLDIR__/bin/BackupPC_archiveHost. This script can be copied and customized as needed.</p> |
3706 | 1690 | and the output is optionally compressed and split into fixed-sized | 1187 | |
3707 | 1691 | files (eg: 650MB).</p> | 1188 | <h2 id="Configuring-an-Archive-Host">Configuring an Archive Host</h2> |
3708 | 1692 | <p>The archive for each host is done by default using | 1189 | |
3709 | 1693 | __INSTALLDIR__/bin/BackupPC_archiveHost. This script can be copied | 1190 | <p>To create an Archive Host, add it to the hosts file just as any other host and call it a name that best describes the type of archive, e.g. ArchiveDLT</p> |
3710 | 1694 | and customized as needed.</p> | 1191 | |
3711 | 1695 | <p> | 1192 | <p>To tell BackupPC that the Host is for Archives, create a config.pl file in the Archive Hosts's pc directory, adding the following line:</p> |
3712 | 1696 | </p> | 1193 | |
3713 | 1697 | <h2><a name="configuring_an_archive_host">Configuring an Archive Host</a></h2> | 1194 | <p><a href="#_conf_xfermethod_">$Conf{XferMethod}</a> = 'archive';</p> |
3714 | 1698 | <p>To create an Archive Host, add it to the hosts file just as any other host | 1195 | |
3715 | 1699 | and call it a name that best describes the type of archive, e.g. ArchiveDLT</p> | 1196 | <p>To further customise the archive's parameters you can adding the changed parameters in the host's config.pl file. The parameters are explained in the config.pl file. Parameters may be fixed or the user can be allowed to change them (eg: output device).</p> |
3716 | 1700 | <p>To tell BackupPC that the Host is for Archives, create a config.pl file in | 1197 | |
3717 | 1701 | the Archive Hosts's pc directory, adding the following line:</p> | 1198 | <p>The per-host archive command is <a href="#_conf_archiveclientcmd_">$Conf{ArchiveClientCmd}</a>. By default this invokes</p> |
3718 | 1702 | <p><a href="#_conf_xfermethod_">$Conf{XferMethod}</a> = 'archive';</p> | 1199 | |
3719 | 1703 | <p>To further customise the archive's parameters you can adding the changed | 1200 | <pre><code> __INSTALLDIR__/bin/BackupPC_archiveHost</code></pre> |
3720 | 1704 | parameters in the host's config.pl file. The parameters are explained in | 1201 | |
3691 | 1705 | the config.pl file. Parameters may be fixed or the user can be allowed | ||
3692 | 1706 | to change them (eg: output device).</p> | ||
3693 | 1707 | <p>The per-host archive command is <a href="#_conf_archiveclientcmd_">$Conf{ArchiveClientCmd}</a>. By default | ||
3694 | 1708 | this invokes</p> | ||
3695 | 1709 | <pre> | ||
3696 | 1710 | __INSTALLDIR__/bin/BackupPC_archiveHost</pre> | ||
3721 | 1711 | <p>which you can copy and customize as necessary.</p> | 1202 | <p>which you can copy and customize as necessary.</p> |
3795 | 1712 | <p> | 1203 | |
3796 | 1713 | </p> | 1204 | <h2 id="Starting-an-Archive">Starting an Archive</h2> |
3797 | 1714 | <h2><a name="starting_an_archive">Starting an Archive</a></h2> | 1205 | |
3798 | 1715 | <p>In the web interface, click on the Archive Host you wish to use. You will see a | 1206 | <p>In the web interface, click on the Archive Host you wish to use. You will see a list of previous archives and a summary on each. By clicking the "Start Archive" button you are presented with the list of hosts and the approximate backup size (note this is raw size, not projected compressed size) Select the hosts you wish to archive and press the "Archive Selected Hosts" button.</p> |
3799 | 1716 | list of previous archives and a summary on each. By clicking the "Start Archive" | 1207 | |
3800 | 1717 | button you are presented with the list of hosts and the approximate backup size | 1208 | <p>The next screen allows you to adjust the parameters for this archive run. Press the "Start the Archive" to start archiving the selected hosts with the parameters displayed.</p> |
3801 | 1718 | (note this is raw size, not projected compressed size) Select the hosts you wish | 1209 | |
3802 | 1719 | to archive and press the "Archive Selected Hosts" button.</p> | 1210 | <h2 id="Starting-an-Archive-from-the-command-line">Starting an Archive from the command line</h2> |
3803 | 1720 | <p>The next screen allows you to adjust the parameters for this archive run. | 1211 | |
3804 | 1721 | Press the "Start the Archive" to start archiving the selected hosts with the | 1212 | <p>The script BackupPC_archiveStart can be used to start an archive from the command line (or cron etc). The usage is:</p> |
3805 | 1722 | parameters displayed.</p> | 1213 | |
3806 | 1723 | <p> | 1214 | <pre><code> BackupPC_archiveStart archiveHost userName hosts...</code></pre> |
3807 | 1724 | </p> | 1215 | |
3808 | 1725 | <h2><a name="starting_an_archive_from_the_command_line">Starting an Archive from the command line</a></h2> | 1216 | <p>This creates an archive of the most recent backup of each of the specified hosts. The first two arguments are the archive host and the user name making the request.</p> |
3809 | 1726 | <p>The script BackupPC_archiveStart can be used to start an archive from | 1217 | |
3810 | 1727 | the command line (or cron etc). The usage is:</p> | 1218 | <hr /> |
3811 | 1728 | <pre> | 1219 | <h1 id="Other-CGI-Functions">Other CGI Functions</h1> |
3812 | 1729 | BackupPC_archiveStart archiveHost userName hosts...</pre> | 1220 | |
3813 | 1730 | <p>This creates an archive of the most recent backup of each of | 1221 | <h2 id="Configuration-and-Host-Editor">Configuration and Host Editor</h2> |
3814 | 1731 | the specified hosts. The first two arguments are the archive | 1222 | |
3815 | 1732 | host and the user name making the request.</p> | 1223 | <p>The CGI interface has a complete configuration and host editor. Only the administrator can edit the main configuration settings and hosts. The edit links are in the left navigation bar.</p> |
3816 | 1733 | <p> | 1224 | |
3817 | 1734 | <a href="#__index__"><small>Back to Top</small></a> | 1225 | <p>When changes are made to any parameter a "Save" button appears at the top of the page. If you are editing a text box you will need to click outside of the text box to make the Save button appear. If you don't select Save then the changes won't be saved.</p> |
3818 | 1735 | </p> | 1226 | |
3819 | 1736 | <hr /> | 1227 | <p>The host-specific configuration can be edited from the host summary page using the link in the left navigation bar. The administrator can edit any of the host-specific configuration settings.</p> |
3820 | 1737 | <h1><a name="other_cgi_functions">Other CGI Functions</a></h1> | 1228 | |
3821 | 1738 | <p> | 1229 | <p>When editing the host-specific configuration, each parameter has an "override" setting that denotes the value is host-specific, meaning that it overrides the setting in the main configuration. If you unselect "override" then the setting is removed from the host-specific configuration, and the main configuration file is displayed.</p> |
3822 | 1739 | </p> | 1230 | |
3823 | 1740 | <h2><a name="configuration_and_host_editor">Configuration and Host Editor</a></h2> | 1231 | <p>User's can edit their host-specific configuration if enabled via <a href="#_conf_cgiuserconfigeditenable_">$Conf{CgiUserConfigEditEnable}</a>. The specific subset of configuration settings that a user can edit is specified with <a href="#_conf_cgiuserconfigedit_">$Conf{CgiUserConfigEdit}</a>. It is recommended to make this list short as possible (you probably don't want your users saving dozens of backups) and it is essential that they can't edit any of the Cmd configuration settings, otherwise they can specify an arbitrary command that will be executed as the BackupPC user.</p> |
3824 | 1741 | <p>The CGI interface has a complete configuration and host editor. | 1232 | |
3825 | 1742 | Only the administrator can edit the main configuration settings | 1233 | <h2 id="RSS">RSS</h2> |
3826 | 1743 | and hosts. The edit links are in the left navigation bar.</p> | 1234 | |
3827 | 1744 | <p>When changes are made to any parameter a "Save" button appears | 1235 | <p>BackupPC supports a very basic RSS feed. Provided you have the XML::RSS perl module installed, a URL similar to this will provide RSS information:</p> |
3828 | 1745 | at the top of the page. If you are editing a text box you will | 1236 | |
3829 | 1746 | need to click outside of the text box to make the Save button | 1237 | <pre><code> http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss</code></pre> |
3830 | 1747 | appear. If you don't select Save then the changes won't be saved.</p> | 1238 | |
3831 | 1748 | <p>The host-specific configuration can be edited from the host | 1239 | <p>This feature is experimental. The information included will probably change.</p> |
3832 | 1749 | summary page using the link in the left navigation bar. | 1240 | |
3833 | 1750 | The administrator can edit any of the host-specific | 1241 | <hr /> |
3834 | 1751 | configuration settings.</p> | 1242 | <h1 id="BackupPC-Design">BackupPC Design</h1> |
3835 | 1752 | <p>When editing the host-specific configuration, each parameter has | 1243 | |
3836 | 1753 | an "override" setting that denotes the value is host-specific, | 1244 | <h2 id="Some-design-issues">Some design issues</h2> |
3837 | 1754 | meaning that it overrides the setting in the main configuration. | 1245 | |
3765 | 1755 | If you unselect "override" then the setting is removed from | ||
3766 | 1756 | the host-specific configuration, and the main configuration | ||
3767 | 1757 | file is displayed.</p> | ||
3768 | 1758 | <p>User's can edit their host-specific configuration if enabled | ||
3769 | 1759 | via <a href="#_conf_cgiuserconfigeditenable_">$Conf{CgiUserConfigEditEnable}</a>. The specific subset | ||
3770 | 1760 | of configuration settings that a user can edit is specified | ||
3771 | 1761 | with <a href="#_conf_cgiuserconfigedit_">$Conf{CgiUserConfigEdit}</a>. It is recommended to make this | ||
3772 | 1762 | list short as possible (you probably don't want your users saving | ||
3773 | 1763 | dozens of backups) and it is essential that they can't edit any | ||
3774 | 1764 | of the Cmd configuration settings, otherwise they can specify | ||
3775 | 1765 | an arbitrary command that will be executed as the BackupPC | ||
3776 | 1766 | user.</p> | ||
3777 | 1767 | <p> | ||
3778 | 1768 | </p> | ||
3779 | 1769 | <h2><a name="rss">RSS</a></h2> | ||
3780 | 1770 | <p>BackupPC supports a very basic RSS feed. Provided you have the | ||
3781 | 1771 | XML::RSS perl module installed, a URL similar to this will | ||
3782 | 1772 | provide RSS information:</p> | ||
3783 | 1773 | <pre> | ||
3784 | 1774 | <a href="http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss">http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss</a></pre> | ||
3785 | 1775 | <p>This feature is experimental. The information included will | ||
3786 | 1776 | probably change.</p> | ||
3787 | 1777 | <p> | ||
3788 | 1778 | <a href="#__index__"><small>Back to Top</small></a> | ||
3789 | 1779 | </p> | ||
3790 | 1780 | <hr /> | ||
3791 | 1781 | <h1><a name="backuppc_design">BackupPC Design</a></h1> | ||
3792 | 1782 | <p> | ||
3793 | 1783 | </p> | ||
3794 | 1784 | <h2><a name="some_design_issues">Some design issues</a></h2> | ||
3838 | 1785 | <dl> | 1246 | <dl> |
3901 | 1786 | <dt><strong><a name="pooling_common_files" class="item">Pooling common files</a></strong></dt> | 1247 | |
3902 | 1787 | 1248 | <dt id="Pooling-common-files">Pooling common files</dt> | |
3903 | 1788 | <dd> | 1249 | <dd> |
3904 | 1789 | <p>To quickly see if a file is already in the pool, an MD5 digest of the | 1250 | |
3905 | 1790 | file length and contents is used as the file name in the pool. This | 1251 | <p>To quickly see if a file is already in the pool, an MD5 digest of the file length and contents is used as the file name in the pool. This can't guarantee a file is identical: it just reduces the search to often a single file or handful of files. A complete file comparison is always done to verify if two files are really the same.</p> |
3906 | 1791 | can't guarantee a file is identical: it just reduces the search to | 1252 | |
3907 | 1792 | often a single file or handful of files. A complete file comparison | 1253 | <p>Identical files on multiples backups are represented by hard links. Hardlinks are used so that identical files all refer to the same physical file on the server's disk. Also, hard links maintain reference counts so that BackupPC knows when to delete unused files from the pool.</p> |
3908 | 1793 | is always done to verify if two files are really the same.</p> | 1254 | |
3909 | 1794 | <p>Identical files on multiples backups are represented by hard links. | 1255 | <p>For the computer-science majors among you, you can think of the pooling system used by BackupPC as just a chained hash table stored on a (big) file system.</p> |
3910 | 1795 | Hardlinks are used so that identical files all refer to the same | 1256 | |
3911 | 1796 | physical file on the server's disk. Also, hard links maintain | 1257 | </dd> |
3912 | 1797 | reference counts so that BackupPC knows when to delete unused files | 1258 | <dt id="The-hashing-function">The hashing function</dt> |
3913 | 1798 | from the pool.</p> | 1259 | <dd> |
3914 | 1799 | <p>For the computer-science majors among you, you can think of the pooling | 1260 | |
3915 | 1800 | system used by BackupPC as just a chained hash table stored on a (big) | 1261 | <p>There is a tradeoff between how much of file is used for the MD5 digest and the time taken comparing all the files that have the same hash.</p> |
3916 | 1801 | file system.</p> | 1262 | |
3917 | 1802 | </dd> | 1263 | <p>Using the file length and just the first 4096 bytes of the file for the MD5 digest produces some repetitions. One example: with 900,000 unique files in the pool, this hash gives about 7,000 repeated files, and in the worst case 500 files have the same hash. That's not bad: we only have to do a single file compare 99.2% of the time. But in the worst case we have to compare as many as 500 files checking for a match.</p> |
3918 | 1803 | <dt><strong><a name="the_hashing_function" class="item">The hashing function</a></strong></dt> | 1264 | |
3919 | 1804 | 1265 | <p>With a modest increase in CPU time, if we use the file length and the first 256K of the file we now only have 500 repeated files and in the worst case around 20 files have the same hash. Furthermore, if we instead use the first and last 128K of the file (more specifically, the first and eighth 128K chunks for files larger than 1MB) we get only 300 repeated files and in the worst case around 20 files have the same hash.</p> | |
3920 | 1805 | <dd> | 1266 | |
3921 | 1806 | <p>There is a tradeoff between how much of file is used for the MD5 digest | 1267 | <p>Based on this experimentation, this is the hash function used by BackupPC. It is important that you don't change the hash function after files are already in the pool. Otherwise your pool will grow to twice the size until all the old backups (and all the old files with old hashes) eventually expire.</p> |
3922 | 1807 | and the time taken comparing all the files that have the same hash.</p> | 1268 | |
3923 | 1808 | <p>Using the file length and just the first 4096 bytes of the file for the | 1269 | </dd> |
3924 | 1809 | MD5 digest produces some repetitions. One example: with 900,000 unique | 1270 | <dt id="Compression">Compression</dt> |
3925 | 1810 | files in the pool, this hash gives about 7,000 repeated files, and in | 1271 | <dd> |
3926 | 1811 | the worst case 500 files have the same hash. That's not bad: we only | 1272 | |
3927 | 1812 | have to do a single file compare 99.2% of the time. But in the worst | 1273 | <p>BackupPC supports compression. It uses the deflate and inflate methods in the Compress::Zlib module, which is based on the zlib compression library (see <a href="http://www.gzip.org/zlib/">http://www.gzip.org/zlib/</a>).</p> |
3928 | 1813 | case we have to compare as many as 500 files checking for a match.</p> | 1274 | |
3929 | 1814 | <p>With a modest increase in CPU time, if we use the file length and the | 1275 | <p>The <a href="#_conf_compresslevel_">$Conf{CompressLevel}</a> setting specifies the compression level to use. Zero (0) means no compression. Compression levels can be from 1 (least cpu time, slightly worse compression) to 9 (most cpu time, slightly better compression). The recommended value is 3. Changing it to 5, for example, will take maybe 20% more cpu time and will get another 2-3% additional compression. Diminishing returns set in above 5. See the zlib documentation for more information about compression levels.</p> |
3930 | 1815 | first 256K of the file we now only have 500 repeated files and in the | 1276 | |
3931 | 1816 | worst case around 20 files have the same hash. Furthermore, if we | 1277 | <p>BackupPC implements compression with minimal CPU load. Rather than compressing every incoming backup file and then trying to match it against the pool, BackupPC computes the MD5 digest based on the uncompressed file, and matches against the candidate pool files by comparing each uncompressed pool file against the incoming backup file. Since inflating a file takes roughly a factor of 10 less CPU time than deflating there is a big saving in CPU time.</p> |
3932 | 1817 | instead use the first and last 128K of the file (more specifically, the | 1278 | |
3933 | 1818 | first and eighth 128K chunks for files larger than 1MB) we get only 300 | 1279 | <p>The combination of pooling common files and compression can yield a factor of 8 or more overall saving in backup storage.</p> |
3934 | 1819 | repeated files and in the worst case around 20 files have the same hash.</p> | 1280 | |
3873 | 1820 | <p>Based on this experimentation, this is the hash function used by BackupPC. | ||
3874 | 1821 | It is important that you don't change the hash function after files | ||
3875 | 1822 | are already in the pool. Otherwise your pool will grow to twice the | ||
3876 | 1823 | size until all the old backups (and all the old files with old hashes) | ||
3877 | 1824 | eventually expire.</p> | ||
3878 | 1825 | </dd> | ||
3879 | 1826 | <dt><strong><a name="compression" class="item">Compression</a></strong></dt> | ||
3880 | 1827 | |||
3881 | 1828 | <dd> | ||
3882 | 1829 | <p>BackupPC supports compression. It uses the deflate and inflate methods | ||
3883 | 1830 | in the Compress::Zlib module, which is based on the zlib compression | ||
3884 | 1831 | library (see <a href="http://www.gzip.org/zlib/">http://www.gzip.org/zlib/</a>).</p> | ||
3885 | 1832 | <p>The <a href="#_conf_compresslevel_">$Conf{CompressLevel}</a> setting specifies the compression level to use. | ||
3886 | 1833 | Zero (0) means no compression. Compression levels can be from 1 (least | ||
3887 | 1834 | cpu time, slightly worse compression) to 9 (most cpu time, slightly | ||
3888 | 1835 | better compression). The recommended value is 3. Changing it to 5, for | ||
3889 | 1836 | example, will take maybe 20% more cpu time and will get another 2-3% | ||
3890 | 1837 | additional compression. Diminishing returns set in above 5. See the zlib | ||
3891 | 1838 | documentation for more information about compression levels.</p> | ||
3892 | 1839 | <p>BackupPC implements compression with minimal CPU load. Rather than | ||
3893 | 1840 | compressing every incoming backup file and then trying to match it | ||
3894 | 1841 | against the pool, BackupPC computes the MD5 digest based on the | ||
3895 | 1842 | uncompressed file, and matches against the candidate pool files by | ||
3896 | 1843 | comparing each uncompressed pool file against the incoming backup file. | ||
3897 | 1844 | Since inflating a file takes roughly a factor of 10 less CPU time than | ||
3898 | 1845 | deflating there is a big saving in CPU time.</p> | ||
3899 | 1846 | <p>The combination of pooling common files and compression can yield | ||
3900 | 1847 | a factor of 8 or more overall saving in backup storage.</p> | ||
3935 | 1848 | </dd> | 1281 | </dd> |
3936 | 1849 | </dl> | 1282 | </dl> |
3947 | 1850 | <p> | 1283 | |
3948 | 1851 | </p> | 1284 | <h2 id="BackupPC-operation">BackupPC operation</h2> |
3949 | 1852 | <h2><a name="backuppc_operation">BackupPC operation</a></h2> | 1285 | |
3950 | 1853 | <p>BackupPC reads the configuration information from | 1286 | <p>BackupPC reads the configuration information from __CONFDIR__/config.pl. It then runs and manages all the backup activity. It maintains queues of pending backup requests, user backup requests and administrative commands. Based on the configuration various requests will be executed simultaneously.</p> |
3951 | 1854 | __CONFDIR__/config.pl. It then runs and manages all the backup | 1287 | |
3952 | 1855 | activity. It maintains queues of pending backup requests, user backup | 1288 | <p>As specified by <a href="#_conf_wakeupschedule_">$Conf{WakeupSchedule}</a>, BackupPC wakes up periodically to queue backups on all the PCs. This is a four step process:</p> |
3953 | 1856 | requests and administrative commands. Based on the configuration various | 1289 | |
3944 | 1857 | requests will be executed simultaneously.</p> | ||
3945 | 1858 | <p>As specified by <a href="#_conf_wakeupschedule_">$Conf{WakeupSchedule}</a>, BackupPC wakes up periodically | ||
3946 | 1859 | to queue backups on all the PCs. This is a four step process:</p> | ||
3954 | 1860 | <ol> | 1290 | <ol> |
3958 | 1861 | <li> | 1291 | |
3959 | 1862 | <p>For each host and DHCP address backup requests are queued on the | 1292 | <li><p>For each host and DHCP address backup requests are queued on the background command queue.</p> |
3960 | 1863 | background command queue.</p> | 1293 | |
3961 | 1864 | </li> | 1294 | </li> |
3980 | 1865 | <li> | 1295 | <li><p>For each PC, BackupPC_dump is forked. Several of these may be run in parallel, based on the configuration. First a ping is done to see if the machine is alive. If this is a DHCP address, nmblookup is run to get the netbios name, which is used as the host name. If DNS lookup fails, <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> is run to find the IP address from the host name. The file __TOPDIR__/pc/$host/backups is read to decide whether a full or incremental backup needs to be run. If no backup is scheduled, or the ping to $host fails, then BackupPC_dump exits.</p> |
3981 | 1866 | <p>For each PC, BackupPC_dump is forked. Several of these may be run in | 1296 | |
3982 | 1867 | parallel, based on the configuration. First a ping is done to see if | 1297 | <p>The backup is done using the specified XferMethod. Either samba's smbclient or tar over ssh/rsh/nfs piped into BackupPC_tarExtract, or rsync over ssh/rsh is run, or rsyncd is connected to, with the incoming data extracted to __TOPDIR__/pc/$host/new. The XferMethod output is put into __TOPDIR__/pc/$host/XferLOG.</p> |
3983 | 1868 | the machine is alive. If this is a DHCP address, nmblookup is run to | 1298 | |
3984 | 1869 | get the netbios name, which is used as the host name. If DNS lookup | 1299 | <p>The letter in the XferLOG file shows the type of object, similar to the first letter of the modes displayed by ls -l:</p> |
3985 | 1870 | fails, <a href="#_conf_nmblookupfindhostcmd_">$Conf{NmbLookupFindHostCmd}</a> is run to find the IP address from | 1300 | |
3986 | 1871 | the host name. The file __TOPDIR__/pc/$host/backups is read to decide | 1301 | <pre><code> d -> directory |
3969 | 1872 | whether a full or incremental backup needs to be run. If no backup is | ||
3970 | 1873 | scheduled, or the ping to $host fails, then BackupPC_dump exits.</p> | ||
3971 | 1874 | <p>The backup is done using the specified XferMethod. Either samba's smbclient | ||
3972 | 1875 | or tar over ssh/rsh/nfs piped into BackupPC_tarExtract, or rsync over ssh/rsh | ||
3973 | 1876 | is run, or rsyncd is connected to, with the incoming data | ||
3974 | 1877 | extracted to __TOPDIR__/pc/$host/new. The XferMethod output is put | ||
3975 | 1878 | into __TOPDIR__/pc/$host/XferLOG.</p> | ||
3976 | 1879 | <p>The letter in the XferLOG file shows the type of object, similar to the | ||
3977 | 1880 | first letter of the modes displayed by ls -l:</p> | ||
3978 | 1881 | <pre> | ||
3979 | 1882 | d -> directory | ||
3987 | 1883 | l -> symbolic link | 1302 | l -> symbolic link |
3988 | 1884 | b -> block special file | 1303 | b -> block special file |
3989 | 1885 | c -> character special file | 1304 | c -> character special file |
3990 | 1886 | p -> pipe file (fifo) | 1305 | p -> pipe file (fifo) |
3992 | 1887 | nothing -> regular file</pre> | 1306 | nothing -> regular file</code></pre> |
3993 | 1307 | |||
3994 | 1888 | <p>The words mean:</p> | 1308 | <p>The words mean:</p> |
3995 | 1309 | |||
3996 | 1889 | <dl> | 1310 | <dl> |
3997 | 1890 | <dt><strong><a name="create" class="item">create</a></strong></dt> | ||
3998 | 1891 | 1311 | ||
3999 | 1312 | <dt id="create">create</dt> | ||
4000 | 1892 | <dd> | 1313 | <dd> |
4001 | 1314 | |||
4002 | 1893 | <p>new for this backup (ie: directory or file not in pool)</p> | 1315 | <p>new for this backup (ie: directory or file not in pool)</p> |
4003 | 1316 | |||
4004 | 1894 | </dd> | 1317 | </dd> |
4007 | 1895 | <dt><strong><a name="pool" class="item">pool</a></strong></dt> | 1318 | <dt id="pool">pool</dt> |
4006 | 1896 | |||
4008 | 1897 | <dd> | 1319 | <dd> |
4009 | 1320 | |||
4010 | 1898 | <p>found a match in the pool</p> | 1321 | <p>found a match in the pool</p> |
4023 | 1899 | </dd> | 1322 | |
4024 | 1900 | <dt><strong><a name="same" class="item">same</a></strong></dt> | 1323 | </dd> |
4025 | 1901 | 1324 | <dt id="same">same</dt> | |
4026 | 1902 | <dd> | 1325 | <dd> |
4027 | 1903 | <p>file is identical to previous backup (contents were | 1326 | |
4028 | 1904 | checksummed and verified during full dump).</p> | 1327 | <p>file is identical to previous backup (contents were checksummed and verified during full dump).</p> |
4029 | 1905 | </dd> | 1328 | |
4030 | 1906 | <dt><strong><a name="skip" class="item">skip</a></strong></dt> | 1329 | </dd> |
4031 | 1907 | 1330 | <dt id="skip">skip</dt> | |
4032 | 1908 | <dd> | 1331 | <dd> |
4033 | 1909 | <p>file skipped in incremental because attributes are the | 1332 | |
4034 | 1910 | same (only displayed if <a href="#_conf_xferloglevel_">$Conf{XferLogLevel}</a> >= 2).</p> | 1333 | <p>file skipped in incremental because attributes are the same (only displayed if <a href="#_conf_xferloglevel_">$Conf{XferLogLevel}</a> >= 2).</p> |
4035 | 1334 | |||
4036 | 1911 | </dd> | 1335 | </dd> |
4037 | 1912 | </dl> | 1336 | </dl> |
4095 | 1913 | <p>As BackupPC_tarExtract extracts the files from smbclient or tar, or as | 1337 | |
4096 | 1914 | rsync or ftp runs, it checks each file in the backup to see if it is | 1338 | <p>As BackupPC_tarExtract extracts the files from smbclient or tar, or as rsync or ftp runs, it checks each file in the backup to see if it is identical to an existing file from any previous backup of any PC. It does this without needed to write the file to disk. If the file matches an existing file, a hardlink is created to the existing file in the pool. If the file does not match any existing files, the file is written to disk and the file name is saved in __TOPDIR__/pc/$host/NewFileList for later processing by BackupPC_link. BackupPC_tarExtract and rsync can handle arbitrarily large files and multiple candidate matching files without needing to write the file to disk in the case of a match. This significantly reduces disk writes (and also reads, since the pool file comparison is done disk to memory, rather than disk to disk).</p> |
4097 | 1915 | identical to an existing file from any previous backup of any PC. It | 1339 | |
4098 | 1916 | does this without needed to write the file to disk. If the file matches | 1340 | <p>Based on the configuration settings, BackupPC_dump checks each old backup to see if any should be removed. Any expired backups are moved to __TOPDIR__/trash for later removal by BackupPC_trashClean.</p> |
4099 | 1917 | an existing file, a hardlink is created to the existing file in the | 1341 | |
4100 | 1918 | pool. If the file does not match any existing files, the file is written | 1342 | </li> |
4101 | 1919 | to disk and the file name is saved in __TOPDIR__/pc/$host/NewFileList | 1343 | <li><p>For each complete, good, backup, BackupPC_link is run. To avoid race conditions as new files are linked into the pool area, only a single BackupPC_link program runs at a time and the rest are queued.</p> |
4102 | 1920 | for later processing by BackupPC_link. BackupPC_tarExtract and rsync | 1344 | |
4103 | 1921 | can handle arbitrarily large files and multiple candidate matching files | 1345 | <p>BackupPC_link reads the NewFileList written by BackupPC_dump and inspects each new file in the backup. It re-checks if there is a matching file in the pool (another BackupPC_link could have added the file since BackupPC_dump checked). If so, the file is removed and replaced by a hard link to the existing file. If the file is new, a hard link to the file is made in the pool area, so that this file is available for checking against each new file and new backup.</p> |
4104 | 1922 | without needing to write the file to disk in the case of a match. This | 1346 | |
4105 | 1923 | significantly reduces disk writes (and also reads, since the pool file | 1347 | <p>Then, if <a href="#_conf_incrfill_">$Conf{IncrFill}</a> is set (note that the default setting is off), for each incremental backup, hard links are made in the new backup to all files that were not extracted during the incremental backups. The means the incremental backup looks like a complete image of the PC (with the exception that files that were removed on the PC since the last full backup will still appear in the backup directory tree).</p> |
4106 | 1924 | comparison is done disk to memory, rather than disk to disk).</p> | 1348 | |
4107 | 1925 | <p>Based on the configuration settings, BackupPC_dump checks each | 1349 | <p>The CGI interface knows how to merge unfilled incremental backups will the most recent prior filled (full) backup, giving the incremental backups a filled appearance. The default for <a href="#_conf_incrfill_">$Conf{IncrFill}</a> is off, since there is no need to fill incremental backups. This saves some level of disk activity, since lots of extra hardlinks are no longer needed (and don't have to be deleted when the backup expires).</p> |
4108 | 1926 | old backup to see if any should be removed. Any expired backups | 1350 | |
4109 | 1927 | are moved to __TOPDIR__/trash for later removal by BackupPC_trashClean.</p> | 1351 | </li> |
4110 | 1928 | </li> | 1352 | <li><p>BackupPC_trashClean is always run in the background to remove any expired backups. Every 5 minutes it wakes up and removes all the files in __TOPDIR__/trash.</p> |
4111 | 1929 | <li> | 1353 | |
4112 | 1930 | <p>For each complete, good, backup, BackupPC_link is run. | 1354 | <p>Also, once each night, BackupPC_nightly is run to complete some additional administrative tasks, such as cleaning the pool. This involves removing any files in the pool that only have a single hard link (meaning no backups are using that file). Again, to avoid race conditions, BackupPC_nightly is only run when there are no BackupPC_link processes running. When BackupPC_nightly is run no new BackupPC_link jobs are started. If BackupPC_nightly takes too long to run, the settings <a href="#_conf_maxbackuppcnightlyjobs_">$Conf{MaxBackupPCNightlyJobs}</a> and <a href="#_conf_backuppcnightlyperiod_">$Conf{BackupPCNightlyPeriod}</a> can be used to run several BackupPC_nightly processes in parallel, and to split its job over several nights.</p> |
4113 | 1931 | To avoid race conditions as new files are linked into the | 1355 | |
4057 | 1932 | pool area, only a single BackupPC_link program runs | ||
4058 | 1933 | at a time and the rest are queued.</p> | ||
4059 | 1934 | <p>BackupPC_link reads the NewFileList written by BackupPC_dump and | ||
4060 | 1935 | inspects each new file in the backup. It re-checks if there is a | ||
4061 | 1936 | matching file in the pool (another BackupPC_link | ||
4062 | 1937 | could have added the file since BackupPC_dump checked). If so, the file | ||
4063 | 1938 | is removed and replaced by a hard link to the existing file. If the file | ||
4064 | 1939 | is new, a hard link to the file is made in the pool area, so that this | ||
4065 | 1940 | file is available for checking against each new file and new backup.</p> | ||
4066 | 1941 | <p>Then, if <a href="#_conf_incrfill_">$Conf{IncrFill}</a> is set (note that the default setting is | ||
4067 | 1942 | off), for each incremental backup, hard links are made in the new | ||
4068 | 1943 | backup to all files that were not extracted during the incremental | ||
4069 | 1944 | backups. The means the incremental backup looks like a complete | ||
4070 | 1945 | image of the PC (with the exception that files that were removed on | ||
4071 | 1946 | the PC since the last full backup will still appear in the backup | ||
4072 | 1947 | directory tree).</p> | ||
4073 | 1948 | <p>The CGI interface knows how to merge unfilled incremental backups will | ||
4074 | 1949 | the most recent prior filled (full) backup, giving the incremental | ||
4075 | 1950 | backups a filled appearance. The default for <a href="#_conf_incrfill_">$Conf{IncrFill}</a> is off, | ||
4076 | 1951 | since there is no need to fill incremental backups. This saves | ||
4077 | 1952 | some level of disk activity, since lots of extra hardlinks are no | ||
4078 | 1953 | longer needed (and don't have to be deleted when the backup expires).</p> | ||
4079 | 1954 | </li> | ||
4080 | 1955 | <li> | ||
4081 | 1956 | <p>BackupPC_trashClean is always run in the background to remove any | ||
4082 | 1957 | expired backups. Every 5 minutes it wakes up and removes all the files | ||
4083 | 1958 | in __TOPDIR__/trash.</p> | ||
4084 | 1959 | <p>Also, once each night, BackupPC_nightly is run to complete some | ||
4085 | 1960 | additional administrative tasks, such as cleaning the pool. This | ||
4086 | 1961 | involves removing any files in the pool that only have a single | ||
4087 | 1962 | hard link (meaning no backups are using that file). Again, to | ||
4088 | 1963 | avoid race conditions, BackupPC_nightly is only run when there | ||
4089 | 1964 | are no BackupPC_link processes running. When BackupPC_nightly is | ||
4090 | 1965 | run no new BackupPC_link jobs are started. If BackupPC_nightly | ||
4091 | 1966 | takes too long to run, the settings <a href="#_conf_maxbackuppcnightlyjobs_">$Conf{MaxBackupPCNightlyJobs}</a> | ||
4092 | 1967 | and <a href="#_conf_backuppcnightlyperiod_">$Conf{BackupPCNightlyPeriod}</a> can be used to run several | ||
4093 | 1968 | BackupPC_nightly processes in parallel, and to split its job over | ||
4094 | 1969 | several nights.</p> | ||
4114 | 1970 | </li> | 1356 | </li> |
4115 | 1971 | </ol> | 1357 | </ol> |
4122 | 1972 | <p>BackupPC also listens for TCP connections on <a href="#_conf_serverport_">$Conf{ServerPort}</a>, which | 1358 | |
4123 | 1973 | is used by the CGI script BackupPC_Admin for status reporting and | 1359 | <p>BackupPC also listens for TCP connections on <a href="#_conf_serverport_">$Conf{ServerPort}</a>, which is used by the CGI script BackupPC_Admin for status reporting and user-initiated backup or backup cancel requests.</p> |
4124 | 1974 | user-initiated backup or backup cancel requests.</p> | 1360 | |
4125 | 1975 | <p> | 1361 | <h2 id="Storage-layout">Storage layout</h2> |
4126 | 1976 | </p> | 1362 | |
4121 | 1977 | <h2><a name="storage_layout">Storage layout</a></h2> | ||
4127 | 1978 | <p>BackupPC resides in several directories:</p> | 1363 | <p>BackupPC resides in several directories:</p> |
4128 | 1364 | |||
4129 | 1979 | <dl> | 1365 | <dl> |
4130 | 1980 | <dt><strong><a name="installdir" class="item">__INSTALLDIR__</a></strong></dt> | ||
4131 | 1981 | 1366 | ||
4132 | 1367 | <dt id="INSTALLDIR__">__INSTALLDIR__</dt> | ||
4133 | 1982 | <dd> | 1368 | <dd> |
4137 | 1983 | <p>Perl scripts comprising BackupPC reside in __INSTALLDIR__/bin, | 1369 | |
4138 | 1984 | libraries are in __INSTALLDIR__/lib and documentation | 1370 | <p>Perl scripts comprising BackupPC reside in __INSTALLDIR__/bin, libraries are in __INSTALLDIR__/lib and documentation is in __INSTALLDIR__/doc.</p> |
4139 | 1985 | is in __INSTALLDIR__/doc.</p> | 1371 | |
4140 | 1986 | </dd> | 1372 | </dd> |
4142 | 1987 | <dt><strong><a name="cgidir" class="item">__CGIDIR__</a></strong></dt> | 1373 | <dt id="CGIDIR__">__CGIDIR__</dt> |
4143 | 1374 | <dd> | ||
4144 | 1988 | 1375 | ||
4145 | 1989 | <dd> | ||
4146 | 1990 | <p>The CGI script BackupPC_Admin resides in this cgi binary directory.</p> | 1376 | <p>The CGI script BackupPC_Admin resides in this cgi binary directory.</p> |
4147 | 1377 | |||
4148 | 1991 | </dd> | 1378 | </dd> |
4151 | 1992 | <dt><strong><a name="confdir" class="item">__CONFDIR__</a></strong></dt> | 1379 | <dt id="CONFDIR__">__CONFDIR__</dt> |
4150 | 1993 | |||
4152 | 1994 | <dd> | 1380 | <dd> |
4155 | 1995 | <p>All the configuration information resides below __CONFDIR__. | 1381 | |
4156 | 1996 | This directory contains:</p> | 1382 | <p>All the configuration information resides below __CONFDIR__. This directory contains:</p> |
4157 | 1383 | |||
4158 | 1997 | <p>The directory __CONFDIR__ contains:</p> | 1384 | <p>The directory __CONFDIR__ contains:</p> |
4159 | 1385 | |||
4160 | 1998 | <dl> | 1386 | <dl> |
4161 | 1999 | <dt><strong><a name="config_pl" class="item">config.pl</a></strong></dt> | ||
4162 | 2000 | 1387 | ||
4163 | 1388 | <dt id="config.pl">config.pl</dt> | ||
4164 | 2001 | <dd> | 1389 | <dd> |
4167 | 2002 | <p>Configuration file. See <a href="#configuration_file">Configuration file</a> | 1390 | |
4168 | 2003 | below for more details.</p> | 1391 | <p>Configuration file. See <a href="#Configuration-File">"Configuration File"</a> below for more details.</p> |
4169 | 1392 | |||
4170 | 2004 | </dd> | 1393 | </dd> |
4172 | 2005 | <dt><strong><a name="hosts" class="item">hosts</a></strong></dt> | 1394 | <dt id="hosts">hosts</dt> |
4173 | 1395 | <dd> | ||
4174 | 2006 | 1396 | ||
4175 | 2007 | <dd> | ||
4176 | 2008 | <p>Hosts file, which lists all the PCs to backup.</p> | 1397 | <p>Hosts file, which lists all the PCs to backup.</p> |
4177 | 1398 | |||
4178 | 2009 | </dd> | 1399 | </dd> |
4181 | 2010 | <dt><strong><a name="pc" class="item">pc</a></strong></dt> | 1400 | <dt id="pc">pc</dt> |
4180 | 2011 | |||
4182 | 2012 | <dd> | 1401 | <dd> |
4188 | 2013 | <p>The directory __CONFDIR__/pc contains per-client configuration files | 1402 | |
4189 | 2014 | that override settings in the main configuration file. Each file | 1403 | <p>The directory __CONFDIR__/pc contains per-client configuration files that override settings in the main configuration file. Each file is named __CONFDIR__/pc/HOST.pl, where HOST is the host name.</p> |
4190 | 2015 | is named __CONFDIR__/pc/HOST.pl, where HOST is the host name.</p> | 1404 | |
4191 | 2016 | <p>In pre-FHS versions of BackupPC these files were located in | 1405 | <p>In pre-FHS versions of BackupPC these files were located in __TOPDIR__/pc/HOST/config.pl.</p> |
4192 | 2017 | __TOPDIR__/pc/HOST/config.pl.</p> | 1406 | |
4193 | 2018 | </dd> | 1407 | </dd> |
4194 | 2019 | </dl> | 1408 | </dl> |
4195 | 1409 | |||
4196 | 2020 | </dd> | 1410 | </dd> |
4199 | 2021 | <dt><strong><a name="logdir" class="item">__LOGDIR__</a></strong></dt> | 1411 | <dt id="LOGDIR__">__LOGDIR__</dt> |
4198 | 2022 | |||
4200 | 2023 | <dd> | 1412 | <dd> |
4203 | 2024 | <p>The directory __LOGDIR__ (__TOPDIR__/log on pre-FHS versions | 1413 | |
4204 | 2025 | of BackupPC) contains:</p> | 1414 | <p>The directory __LOGDIR__ (__TOPDIR__/log on pre-FHS versions of BackupPC) contains:</p> |
4205 | 1415 | |||
4206 | 2026 | <dl> | 1416 | <dl> |
4235 | 2027 | <dt><strong><a name="log" class="item">LOG</a></strong></dt> | 1417 | |
4236 | 2028 | 1418 | <dt id="LOG">LOG</dt> | |
4237 | 2029 | <dd> | 1419 | <dd> |
4238 | 2030 | <p>Current (today's) log file output from BackupPC.</p> | 1420 | |
4239 | 2031 | </dd> | 1421 | <p>Current (today's) log file output from BackupPC.</p> |
4240 | 2032 | <dt><strong><a name="log_0_or_log_0_z" class="item">LOG.0 or LOG.0.z</a></strong></dt> | 1422 | |
4241 | 2033 | 1423 | </dd> | |
4242 | 2034 | <dd> | 1424 | <dt id="LOG.0-or-LOG.0.z">LOG.0 or LOG.0.z</dt> |
4243 | 2035 | <p>Yesterday's log file output. Log files are aged daily and compressed | 1425 | <dd> |
4244 | 2036 | (if compression is enabled), and old LOG files are deleted.</p> | 1426 | |
4245 | 2037 | </dd> | 1427 | <p>Yesterday's log file output. Log files are aged daily and compressed (if compression is enabled), and old LOG files are deleted.</p> |
4246 | 2038 | <dt><strong><a name="backuppc_pid" class="item">BackupPC.pid</a></strong></dt> | 1428 | |
4247 | 2039 | 1429 | </dd> | |
4248 | 2040 | <dd> | 1430 | <dt id="BackupPC.pid">BackupPC.pid</dt> |
4249 | 2041 | <p>Contains BackupPC's process id.</p> | 1431 | <dd> |
4250 | 2042 | </dd> | 1432 | |
4251 | 2043 | <dt><strong><a name="status_pl" class="item">status.pl</a></strong></dt> | 1433 | <p>Contains BackupPC's process id.</p> |
4252 | 2044 | 1434 | ||
4253 | 2045 | <dd> | 1435 | </dd> |
4254 | 2046 | <p>A summary of BackupPC's status written periodically by BackupPC so | 1436 | <dt id="status.pl">status.pl</dt> |
4255 | 2047 | that certain state information can be maintained if BackupPC is | 1437 | <dd> |
4256 | 2048 | restarted. Should not be edited.</p> | 1438 | |
4257 | 2049 | </dd> | 1439 | <p>A summary of BackupPC's status written periodically by BackupPC so that certain state information can be maintained if BackupPC is restarted. Should not be edited.</p> |
4258 | 2050 | <dt><strong><a name="useremailinfo_pl" class="item">UserEmailInfo.pl</a></strong></dt> | 1440 | |
4259 | 2051 | 1441 | </dd> | |
4260 | 2052 | <dd> | 1442 | <dt id="UserEmailInfo.pl">UserEmailInfo.pl</dt> |
4261 | 2053 | <p>A summary of what email was last sent to each user, and when the | 1443 | <dd> |
4262 | 2054 | last email was sent. Should not be edited.</p> | 1444 | |
4263 | 1445 | <p>A summary of what email was last sent to each user, and when the last email was sent. Should not be edited.</p> | ||
4264 | 1446 | |||
4265 | 2055 | </dd> | 1447 | </dd> |
4266 | 2056 | </dl> | 1448 | </dl> |
4267 | 1449 | |||
4268 | 2057 | </dd> | 1450 | </dd> |
4271 | 2058 | <dt><strong><a name="topdir" class="item">__TOPDIR__</a></strong></dt> | 1451 | <dt id="TOPDIR__">__TOPDIR__</dt> |
4270 | 2059 | |||
4272 | 2060 | <dd> | 1452 | <dd> |
4275 | 2061 | <p>All of BackupPC's data (PC backup images, logs, configuration information) | 1453 | |
4276 | 2062 | is stored below this directory.</p> | 1454 | <p>All of BackupPC's data (PC backup images, logs, configuration information) is stored below this directory.</p> |
4277 | 1455 | |||
4278 | 2063 | <p>Below __TOPDIR__ are several directories:</p> | 1456 | <p>Below __TOPDIR__ are several directories:</p> |
4279 | 1457 | |||
4280 | 2064 | <dl> | 1458 | <dl> |
4281 | 2065 | <dt><strong><a name="topdir_trash" class="item">__TOPDIR__/trash</a></strong></dt> | ||
4282 | 2066 | 1459 | ||
4283 | 1460 | <dt id="TOPDIR__-trash">__TOPDIR__/trash</dt> | ||
4284 | 2067 | <dd> | 1461 | <dd> |
4289 | 2068 | <p>Any directories and files below this directory are periodically deleted | 1462 | |
4290 | 2069 | whenever BackupPC_trashClean checks. When a backup is aborted or when an | 1463 | <p>Any directories and files below this directory are periodically deleted whenever BackupPC_trashClean checks. When a backup is aborted or when an old backup expires, BackupPC_dump simply moves the directory to __TOPDIR__/trash for later removal by BackupPC_trashClean.</p> |
4291 | 2070 | old backup expires, BackupPC_dump simply moves the directory to | 1464 | |
4288 | 2071 | __TOPDIR__/trash for later removal by BackupPC_trashClean.</p> | ||
4292 | 2072 | </dd> | 1465 | </dd> |
4295 | 2073 | <dt><strong><a name="topdir_pool" class="item">__TOPDIR__/pool</a></strong></dt> | 1466 | <dt id="TOPDIR__-pool">__TOPDIR__/pool</dt> |
4294 | 2074 | |||
4296 | 2075 | <dd> | 1467 | <dd> |
4317 | 2076 | <p>All uncompressed files from PC backups are stored below __TOPDIR__/pool. | 1468 | |
4318 | 2077 | Each file's name is based on the MD5 hex digest of the file contents. | 1469 | <p>All uncompressed files from PC backups are stored below __TOPDIR__/pool. Each file's name is based on the MD5 hex digest of the file contents. Specifically, for files less than 256K, the file length and the entire file is used. For files up to 1MB, the file length and the first and last 128K are used. Finally, for files longer than 1MB, the file length, and the first and eighth 128K chunks for the file are used.</p> |
4319 | 2078 | Specifically, for files less than 256K, the file length and the entire | 1470 | |
4320 | 2079 | file is used. For files up to 1MB, the file length and the first and | 1471 | <p>Each file is stored in a subdirectory X/Y/Z, where X, Y, Z are the first 3 hex digits of the MD5 digest.</p> |
4321 | 2080 | last 128K are used. Finally, for files longer than 1MB, the file length, | 1472 | |
4322 | 2081 | and the first and eighth 128K chunks for the file are used.</p> | 1473 | <p>For example, if a file has an MD5 digest of 123456789abcdef0, the file is stored in __TOPDIR__/pool/1/2/3/123456789abcdef0.</p> |
4323 | 2082 | <p>Each file is stored in a subdirectory X/Y/Z, where X, Y, Z are the | 1474 | |
4324 | 2083 | first 3 hex digits of the MD5 digest.</p> | 1475 | <p>The MD5 digest might not be unique (especially since not all the file's contents are used for files bigger than 256K). Different files that have the same MD5 digest are stored with a trailing suffix "_n" where n is an incrementing number starting at 0. So, for example, if two additional files were identical to the first, except the last byte was different, and assuming the file was larger than 1MB (so the MD5 digests are the same but the files are actually different), the three files would be stored as:</p> |
4325 | 2084 | <p>For example, if a file has an MD5 digest of 123456789abcdef0, | 1476 | |
4326 | 2085 | the file is stored in __TOPDIR__/pool/1/2/3/123456789abcdef0.</p> | 1477 | <pre><code> __TOPDIR__/pool/1/2/3/123456789abcdef0 |
4307 | 2086 | <p>The MD5 digest might not be unique (especially since not all the file's | ||
4308 | 2087 | contents are used for files bigger than 256K). Different files that have | ||
4309 | 2088 | the same MD5 digest are stored with a trailing suffix "_n" where n is | ||
4310 | 2089 | an incrementing number starting at 0. So, for example, if two additional | ||
4311 | 2090 | files were identical to the first, except the last byte was different, | ||
4312 | 2091 | and assuming the file was larger than 1MB (so the MD5 digests are the | ||
4313 | 2092 | same but the files are actually different), the three files would be | ||
4314 | 2093 | stored as:</p> | ||
4315 | 2094 | <pre> | ||
4316 | 2095 | __TOPDIR__/pool/1/2/3/123456789abcdef0 | ||
4327 | 2096 | __TOPDIR__/pool/1/2/3/123456789abcdef0_0 | 1478 | __TOPDIR__/pool/1/2/3/123456789abcdef0_0 |
4365 | 2097 | __TOPDIR__/pool/1/2/3/123456789abcdef0_1</pre> | 1479 | __TOPDIR__/pool/1/2/3/123456789abcdef0_1</code></pre> |
4366 | 2098 | <p>Both BackupPC_dump (actually, BackupPC_tarExtract) and BackupPC_link are | 1480 | |
4367 | 2099 | responsible for checking newly backed up files against the pool. For | 1481 | <p>Both BackupPC_dump (actually, BackupPC_tarExtract) and BackupPC_link are responsible for checking newly backed up files against the pool. For each file, the MD5 digest is used to generate a file name in the pool directory. If the file exists in the pool, the contents are compared. If there is no match, additional files ending in "_n" are checked. (Actually, BackupPC_tarExtract compares multiple candidate files in parallel.) If the file contents exactly match, the file is created by simply making a hard link to the pool file (this is done by BackupPC_tarExtract as the backup proceeds). Otherwise, BackupPC_tarExtract writes the new file to disk and a new hard link is made in the pool to the file (this is done later by BackupPC_link).</p> |
4368 | 2100 | each file, the MD5 digest is used to generate a file name in the pool | 1482 | |
4369 | 2101 | directory. If the file exists in the pool, the contents are compared. | 1483 | <p>Therefore, every file in the pool will have at least 2 hard links (one for the pool file and one for the backup file below __TOPDIR__/pc). Identical files from different backups or PCs will all be linked to the same file. When old backups are deleted, some files in the pool might only have one link. BackupPC_nightly checks the entire pool and removes all files that have only a single link, thereby recovering the storage for that file.</p> |
4370 | 2102 | If there is no match, additional files ending in "_n" are checked. | 1484 | |
4371 | 2103 | (Actually, BackupPC_tarExtract compares multiple candidate files in | 1485 | <p>One other issue: zero length files are not pooled, since there are a lot of these files and on most file systems it doesn't save any disk space to turn these files into hard links.</p> |
4372 | 2104 | parallel.) If the file contents exactly match, the file is created by | 1486 | |
4373 | 2105 | simply making a hard link to the pool file (this is done by | 1487 | </dd> |
4374 | 2106 | BackupPC_tarExtract as the backup proceeds). Otherwise, | 1488 | <dt id="TOPDIR__-cpool">__TOPDIR__/cpool</dt> |
4375 | 2107 | BackupPC_tarExtract writes the new file to disk and a new hard link is | 1489 | <dd> |
4376 | 2108 | made in the pool to the file (this is done later by BackupPC_link).</p> | 1490 | |
4377 | 2109 | <p>Therefore, every file in the pool will have at least 2 hard links | 1491 | <p>All compressed files from PC backups are stored below __TOPDIR__/cpool. Its layout is the same as __TOPDIR__/pool, and the hashing function is the same (and, importantly, based on the uncompressed file, not the compressed file).</p> |
4378 | 2110 | (one for the pool file and one for the backup file below __TOPDIR__/pc). | 1492 | |
4379 | 2111 | Identical files from different backups or PCs will all be linked to | 1493 | </dd> |
4380 | 2112 | the same file. When old backups are deleted, some files in the pool | 1494 | <dt id="TOPDIR__-pc-host">__TOPDIR__/pc/$host</dt> |
4381 | 2113 | might only have one link. BackupPC_nightly checks the entire pool | 1495 | <dd> |
4382 | 2114 | and removes all files that have only a single link, thereby recovering | 1496 | |
4383 | 2115 | the storage for that file.</p> | 1497 | <p>For each PC $host, all the backups for that PC are stored below the directory __TOPDIR__/pc/$host. This directory contains the following files:</p> |
4384 | 2116 | <p>One other issue: zero length files are not pooled, since there are a lot | 1498 | |
4348 | 2117 | of these files and on most file systems it doesn't save any disk space | ||
4349 | 2118 | to turn these files into hard links.</p> | ||
4350 | 2119 | </dd> | ||
4351 | 2120 | <dt><strong><a name="topdir_cpool" class="item">__TOPDIR__/cpool</a></strong></dt> | ||
4352 | 2121 | |||
4353 | 2122 | <dd> | ||
4354 | 2123 | <p>All compressed files from PC backups are stored below __TOPDIR__/cpool. | ||
4355 | 2124 | Its layout is the same as __TOPDIR__/pool, and the hashing function | ||
4356 | 2125 | is the same (and, importantly, based on the uncompressed file, not | ||
4357 | 2126 | the compressed file).</p> | ||
4358 | 2127 | </dd> | ||
4359 | 2128 | <dt><strong><a name="topdir_pc_host" class="item">__TOPDIR__/pc/$host</a></strong></dt> | ||
4360 | 2129 | |||
4361 | 2130 | <dd> | ||
4362 | 2131 | <p>For each PC $host, all the backups for that PC are stored below | ||
4363 | 2132 | the directory __TOPDIR__/pc/$host. This directory contains the | ||
4364 | 2133 | following files:</p> | ||
4385 | 2134 | <dl> | 1499 | <dl> |
4386 | 2135 | <dt><strong><a name="log2" class="item">LOG</a></strong></dt> | ||
4387 | 2136 | 1500 | ||
4388 | 1501 | <dt id="LOG1">LOG</dt> | ||
4389 | 2137 | <dd> | 1502 | <dd> |
4390 | 1503 | |||
4391 | 2138 | <p>Current log file for this PC from BackupPC_dump.</p> | 1504 | <p>Current log file for this PC from BackupPC_dump.</p> |
4422 | 2139 | </dd> | 1505 | |
4423 | 2140 | <dt><strong><a name="log_ddmmyyyy_or_log_ddmmyyyy_z" class="item">LOG.DDMMYYYY or LOG.DDMMYYYY.z</a></strong></dt> | 1506 | </dd> |
4424 | 2141 | 1507 | <dt id="LOG.DDMMYYYY-or-LOG.DDMMYYYY.z">LOG.DDMMYYYY or LOG.DDMMYYYY.z</dt> | |
4425 | 2142 | <dd> | 1508 | <dd> |
4426 | 2143 | <p>Last month's log file. Log files are aged monthly and compressed | 1509 | |
4427 | 2144 | (if compression is enabled), and old LOG files are deleted. | 1510 | <p>Last month's log file. Log files are aged monthly and compressed (if compression is enabled), and old LOG files are deleted. In earlier versions of BackupPC these files used to have a suffix of 0, 1, ....</p> |
4428 | 2145 | In earlier versions of BackupPC these files used to have | 1511 | |
4429 | 2146 | a suffix of 0, 1, ....</p> | 1512 | </dd> |
4430 | 2147 | </dd> | 1513 | <dt id="XferERR-or-XferERR.z">XferERR or XferERR.z</dt> |
4431 | 2148 | <dt><strong><a name="xfererr_or_xfererr_z" class="item">XferERR or XferERR.z</a></strong></dt> | 1514 | <dd> |
4432 | 2149 | 1515 | ||
4433 | 2150 | <dd> | 1516 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) for the most recent failed backup.</p> |
4434 | 2151 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) | 1517 | |
4435 | 2152 | for the most recent failed backup.</p> | 1518 | </dd> |
4436 | 2153 | </dd> | 1519 | <dt id="new">new</dt> |
4437 | 2154 | <dt><strong><a name="new" class="item">new</a></strong></dt> | 1520 | <dd> |
4438 | 2155 | 1521 | ||
4439 | 2156 | <dd> | 1522 | <p>Subdirectory in which the current backup is stored. This directory is renamed if the backup succeeds.</p> |
4440 | 2157 | <p>Subdirectory in which the current backup is stored. This | 1523 | |
4441 | 2158 | directory is renamed if the backup succeeds.</p> | 1524 | </dd> |
4442 | 2159 | </dd> | 1525 | <dt id="XferLOG-or-XferLOG.z">XferLOG or XferLOG.z</dt> |
4443 | 2160 | <dt><strong><a name="xferlog_or_xferlog_z" class="item">XferLOG or XferLOG.z</a></strong></dt> | 1526 | <dd> |
4444 | 2161 | 1527 | ||
4445 | 2162 | <dd> | 1528 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) for the current backup.</p> |
4446 | 2163 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) | 1529 | |
4447 | 2164 | for the current backup.</p> | 1530 | </dd> |
4448 | 2165 | </dd> | 1531 | <dt id="nnn-an-integer-">nnn (an integer)</dt> |
4449 | 2166 | <dt><strong><a name="nnn" class="item">nnn (an integer)</a></strong></dt> | 1532 | <dd> |
4450 | 2167 | 1533 | ||
4421 | 2168 | <dd> | ||
4451 | 2169 | <p>Successful backups are in directories numbered sequentially starting at 0.</p> | 1534 | <p>Successful backups are in directories numbered sequentially starting at 0.</p> |
4498 | 2170 | </dd> | 1535 | |
4499 | 2171 | <dt><strong><a name="xferlog_nnn_or_xferlog_nnn_z" class="item">XferLOG.nnn or XferLOG.nnn.z</a></strong></dt> | 1536 | </dd> |
4500 | 2172 | 1537 | <dt id="XferLOG.nnn-or-XferLOG.nnn.z">XferLOG.nnn or XferLOG.nnn.z</dt> | |
4501 | 2173 | <dd> | 1538 | <dd> |
4502 | 2174 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) | 1539 | |
4503 | 2175 | corresponding to backup number nnn.</p> | 1540 | <p>Output from the transport program (ie: smbclient, tar, rsync or ftp) corresponding to backup number nnn.</p> |
4504 | 2176 | </dd> | 1541 | |
4505 | 2177 | <dt><strong><a name="restoreinfo_nnn" class="item">RestoreInfo.nnn</a></strong></dt> | 1542 | </dd> |
4506 | 2178 | 1543 | <dt id="RestoreInfo.nnn">RestoreInfo.nnn</dt> | |
4507 | 2179 | <dd> | 1544 | <dd> |
4508 | 2180 | <p>Information about restore request #nnn including who, what, when, and | 1545 | |
4509 | 2181 | why. This file is in Data::Dumper format. (Note that the restore | 1546 | <p>Information about restore request #nnn including who, what, when, and why. This file is in Data::Dumper format. (Note that the restore numbers are not related to the backup number.)</p> |
4510 | 2182 | numbers are not related to the backup number.)</p> | 1547 | |
4511 | 2183 | </dd> | 1548 | </dd> |
4512 | 2184 | <dt><strong><a name="restorelog_nnn_z" class="item">RestoreLOG.nnn.z</a></strong></dt> | 1549 | <dt id="RestoreLOG.nnn.z">RestoreLOG.nnn.z</dt> |
4513 | 2185 | 1550 | <dd> | |
4514 | 2186 | <dd> | 1551 | |
4515 | 2187 | <p>Output from smbclient, tar or rsync during restore #nnn. (Note that the restore | 1552 | <p>Output from smbclient, tar or rsync during restore #nnn. (Note that the restore numbers are not related to the backup number.)</p> |
4516 | 2188 | numbers are not related to the backup number.)</p> | 1553 | |
4517 | 2189 | </dd> | 1554 | </dd> |
4518 | 2190 | <dt><strong><a name="archiveinfo_nnn" class="item">ArchiveInfo.nnn</a></strong></dt> | 1555 | <dt id="ArchiveInfo.nnn">ArchiveInfo.nnn</dt> |
4519 | 2191 | 1556 | <dd> | |
4520 | 2192 | <dd> | 1557 | |
4521 | 2193 | <p>Information about archive request #nnn including who, what, when, and | 1558 | <p>Information about archive request #nnn including who, what, when, and why. This file is in Data::Dumper format. (Note that the archive numbers are not related to the restore or backup number.)</p> |
4522 | 2194 | why. This file is in Data::Dumper format. (Note that the archive | 1559 | |
4523 | 2195 | numbers are not related to the restore or backup number.)</p> | 1560 | </dd> |
4524 | 2196 | </dd> | 1561 | <dt id="ArchiveLOG.nnn.z">ArchiveLOG.nnn.z</dt> |
4525 | 2197 | <dt><strong><a name="archivelog_nnn_z" class="item">ArchiveLOG.nnn.z</a></strong></dt> | 1562 | <dd> |
4526 | 2198 | 1563 | ||
4527 | 2199 | <dd> | 1564 | <p>Output from archive #nnn. (Note that the archive numbers are not related to the backup or restore number.)</p> |
4528 | 2200 | <p>Output from archive #nnn. (Note that the archive numbers are not related | 1565 | |
4529 | 2201 | to the backup or restore number.)</p> | 1566 | </dd> |
4530 | 2202 | </dd> | 1567 | <dt id="config.pl1">config.pl</dt> |
4531 | 2203 | <dt><strong><a name="config_pl2" class="item">config.pl</a></strong></dt> | 1568 | <dd> |
4532 | 2204 | 1569 | ||
4533 | 2205 | <dd> | 1570 | <p>Old location of optional configuration settings specific to this host. Settings in this file override the main configuration file. In new versions of BackupPC the per-host configuration files are stored in __CONFDIR__/pc/HOST.pl.</p> |
4534 | 2206 | <p>Old location of optional configuration settings specific to this host. | 1571 | |
4535 | 2207 | Settings in this file override the main configuration file. | 1572 | </dd> |
4536 | 2208 | In new versions of BackupPC the per-host configuration files are | 1573 | <dt id="backups">backups</dt> |
4537 | 2209 | stored in __CONFDIR__/pc/HOST.pl.</p> | 1574 | <dd> |
4538 | 2210 | </dd> | 1575 | |
4539 | 2211 | <dt><strong><a name="backups" class="item">backups</a></strong></dt> | 1576 | <p>A tab-delimited ascii table listing information about each successful backup, one per row. The columns are:</p> |
4540 | 2212 | 1577 | ||
4495 | 2213 | <dd> | ||
4496 | 2214 | <p>A tab-delimited ascii table listing information about each successful | ||
4497 | 2215 | backup, one per row. The columns are:</p> | ||
4541 | 2216 | <dl> | 1578 | <dl> |
4542 | 2217 | <dt><strong><a name="num" class="item">num</a></strong></dt> | ||
4543 | 2218 | 1579 | ||
4544 | 1580 | <dt id="num">num</dt> | ||
4545 | 2219 | <dd> | 1581 | <dd> |
4550 | 2220 | <p>The backup number, an integer that starts at 0 and increments | 1582 | |
4551 | 2221 | for each successive backup. The corresponding backup is stored | 1583 | <p>The backup number, an integer that starts at 0 and increments for each successive backup. The corresponding backup is stored in the directory num (eg: if this field is 5, then the backup is stored in __TOPDIR__/pc/$host/5).</p> |
4552 | 2222 | in the directory num (eg: if this field is 5, then the backup is | 1584 | |
4549 | 2223 | stored in __TOPDIR__/pc/$host/5).</p> | ||
4553 | 2224 | </dd> | 1585 | </dd> |
4555 | 2225 | <dt><strong><a name="type" class="item">type</a></strong></dt> | 1586 | <dt id="type">type</dt> |
4556 | 1587 | <dd> | ||
4557 | 2226 | 1588 | ||
4558 | 2227 | <dd> | ||
4559 | 2228 | <p>Set to "full" or "incr" for full or incremental backup.</p> | 1589 | <p>Set to "full" or "incr" for full or incremental backup.</p> |
4560 | 1590 | |||
4561 | 2229 | </dd> | 1591 | </dd> |
4564 | 2230 | <dt><strong><a name="starttime" class="item">startTime</a></strong></dt> | 1592 | <dt id="startTime">startTime</dt> |
4563 | 2231 | |||
4565 | 2232 | <dd> | 1593 | <dd> |
4566 | 1594 | |||
4567 | 2233 | <p>Start time of the backup in unix seconds.</p> | 1595 | <p>Start time of the backup in unix seconds.</p> |
4568 | 1596 | |||
4569 | 2234 | </dd> | 1597 | </dd> |
4572 | 2235 | <dt><strong><a name="endtime" class="item">endTime</a></strong></dt> | 1598 | <dt id="endTime">endTime</dt> |
4571 | 2236 | |||
4573 | 2237 | <dd> | 1599 | <dd> |
4574 | 1600 | |||
4575 | 2238 | <p>Stop time of the backup in unix seconds.</p> | 1601 | <p>Stop time of the backup in unix seconds.</p> |
4576 | 1602 | |||
4577 | 2239 | </dd> | 1603 | </dd> |
4580 | 2240 | <dt><strong><a name="nfiles" class="item">nFiles</a></strong></dt> | 1604 | <dt id="nFiles">nFiles</dt> |
4579 | 2241 | |||
4581 | 2242 | <dd> | 1605 | <dd> |
4582 | 1606 | |||
4583 | 2243 | <p>Number of files backed up (as reported by smbclient, tar, rsync or ftp).</p> | 1607 | <p>Number of files backed up (as reported by smbclient, tar, rsync or ftp).</p> |
4584 | 1608 | |||
4585 | 2244 | </dd> | 1609 | </dd> |
4588 | 2245 | <dt><strong><a name="size" class="item">size</a></strong></dt> | 1610 | <dt id="size">size</dt> |
4587 | 2246 | |||
4589 | 2247 | <dd> | 1611 | <dd> |
4590 | 1612 | |||
4591 | 2248 | <p>Total file size backed up (as reported by smbclient, tar, rsync or ftp).</p> | 1613 | <p>Total file size backed up (as reported by smbclient, tar, rsync or ftp).</p> |
4620 | 2249 | </dd> | 1614 | |
4621 | 2250 | <dt><strong><a name="nfilesexist" class="item">nFilesExist</a></strong></dt> | 1615 | </dd> |
4622 | 2251 | 1616 | <dt id="nFilesExist">nFilesExist</dt> | |
4623 | 2252 | <dd> | 1617 | <dd> |
4624 | 2253 | <p>Number of files that were already in the pool | 1618 | |
4625 | 2254 | (as determined by BackupPC_dump and BackupPC_link).</p> | 1619 | <p>Number of files that were already in the pool (as determined by BackupPC_dump and BackupPC_link).</p> |
4626 | 2255 | </dd> | 1620 | |
4627 | 2256 | <dt><strong><a name="sizeexist" class="item">sizeExist</a></strong></dt> | 1621 | </dd> |
4628 | 2257 | 1622 | <dt id="sizeExist">sizeExist</dt> | |
4629 | 2258 | <dd> | 1623 | <dd> |
4630 | 2259 | <p>Total size of files that were already in the pool | 1624 | |
4631 | 2260 | (as determined by BackupPC_dump and BackupPC_link).</p> | 1625 | <p>Total size of files that were already in the pool (as determined by BackupPC_dump and BackupPC_link).</p> |
4632 | 2261 | </dd> | 1626 | |
4633 | 2262 | <dt><strong><a name="nfilesnew" class="item">nFilesNew</a></strong></dt> | 1627 | </dd> |
4634 | 2263 | 1628 | <dt id="nFilesNew">nFilesNew</dt> | |
4635 | 2264 | <dd> | 1629 | <dd> |
4636 | 2265 | <p>Number of files that were not in the pool | 1630 | |
4637 | 2266 | (as determined by BackupPC_link).</p> | 1631 | <p>Number of files that were not in the pool (as determined by BackupPC_link).</p> |
4638 | 2267 | </dd> | 1632 | |
4639 | 2268 | <dt><strong><a name="sizenew" class="item">sizeNew</a></strong></dt> | 1633 | </dd> |
4640 | 2269 | 1634 | <dt id="sizeNew">sizeNew</dt> | |
4641 | 2270 | <dd> | 1635 | <dd> |
4642 | 2271 | <p>Total size of files that were not in the pool | 1636 | |
4643 | 2272 | (as determined by BackupPC_link).</p> | 1637 | <p>Total size of files that were not in the pool (as determined by BackupPC_link).</p> |
4644 | 2273 | </dd> | 1638 | |
4645 | 2274 | <dt><strong><a name="xfererrs" class="item">xferErrs</a></strong></dt> | 1639 | </dd> |
4646 | 2275 | 1640 | <dt id="xferErrs">xferErrs</dt> | |
4647 | 2276 | <dd> | 1641 | <dd> |
4648 | 1642 | |||
4649 | 2277 | <p>Number of errors or warnings from smbclient, tar, rsync or ftp.</p> | 1643 | <p>Number of errors or warnings from smbclient, tar, rsync or ftp.</p> |
4650 | 1644 | |||
4651 | 2278 | </dd> | 1645 | </dd> |
4654 | 2279 | <dt><strong><a name="xferbadfile" class="item">xferBadFile</a></strong></dt> | 1646 | <dt id="xferBadFile">xferBadFile</dt> |
4653 | 2280 | |||
4655 | 2281 | <dd> | 1647 | <dd> |
4656 | 1648 | |||
4657 | 2282 | <p>Number of errors from smbclient that were bad file errors (zero otherwise).</p> | 1649 | <p>Number of errors from smbclient that were bad file errors (zero otherwise).</p> |
4658 | 1650 | |||
4659 | 2283 | </dd> | 1651 | </dd> |
4662 | 2284 | <dt><strong><a name="xferbadshare" class="item">xferBadShare</a></strong></dt> | 1652 | <dt id="xferBadShare">xferBadShare</dt> |
4661 | 2285 | |||
4663 | 2286 | <dd> | 1653 | <dd> |
4664 | 1654 | |||
4665 | 2287 | <p>Number of errors from smbclient that were bad share errors (zero otherwise).</p> | 1655 | <p>Number of errors from smbclient that were bad share errors (zero otherwise).</p> |
4666 | 1656 | |||
4667 | 2288 | </dd> | 1657 | </dd> |
4670 | 2289 | <dt><strong><a name="tarerrs" class="item">tarErrs</a></strong></dt> | 1658 | <dt id="tarErrs">tarErrs</dt> |
4669 | 2290 | |||
4671 | 2291 | <dd> | 1659 | <dd> |
4672 | 1660 | |||
4673 | 2292 | <p>Number of errors from BackupPC_tarExtract.</p> | 1661 | <p>Number of errors from BackupPC_tarExtract.</p> |
4715 | 2293 | </dd> | 1662 | |
4716 | 2294 | <dt><strong><a name="compress" class="item">compress</a></strong></dt> | 1663 | </dd> |
4717 | 2295 | 1664 | <dt id="compress">compress</dt> | |
4718 | 2296 | <dd> | 1665 | <dd> |
4719 | 2297 | <p>The compression level used on this backup. Zero or empty means no | 1666 | |
4720 | 2298 | compression.</p> | 1667 | <p>The compression level used on this backup. Zero or empty means no compression.</p> |
4721 | 2299 | </dd> | 1668 | |
4722 | 2300 | <dt><strong><a name="sizeexistcomp" class="item">sizeExistComp</a></strong></dt> | 1669 | </dd> |
4723 | 2301 | 1670 | <dt id="sizeExistComp">sizeExistComp</dt> | |
4724 | 2302 | <dd> | 1671 | <dd> |
4725 | 2303 | <p>Total compressed size of files that were already in the pool | 1672 | |
4726 | 2304 | (as determined by BackupPC_dump and BackupPC_link).</p> | 1673 | <p>Total compressed size of files that were already in the pool (as determined by BackupPC_dump and BackupPC_link).</p> |
4727 | 2305 | </dd> | 1674 | |
4728 | 2306 | <dt><strong><a name="sizenewcomp" class="item">sizeNewComp</a></strong></dt> | 1675 | </dd> |
4729 | 2307 | 1676 | <dt id="sizeNewComp">sizeNewComp</dt> | |
4730 | 2308 | <dd> | 1677 | <dd> |
4731 | 2309 | <p>Total compressed size of files that were not in the pool | 1678 | |
4732 | 2310 | (as determined by BackupPC_link).</p> | 1679 | <p>Total compressed size of files that were not in the pool (as determined by BackupPC_link).</p> |
4733 | 2311 | </dd> | 1680 | |
4734 | 2312 | <dt><strong><a name="nofill" class="item">noFill</a></strong></dt> | 1681 | </dd> |
4735 | 2313 | 1682 | <dt id="noFill">noFill</dt> | |
4736 | 2314 | <dd> | 1683 | <dd> |
4737 | 2315 | <p>Set if this backup has not been filled in with the most recent | 1684 | |
4738 | 2316 | previous filled or full backup. See <a href="#_conf_incrfill_">$Conf{IncrFill}</a>.</p> | 1685 | <p>Set if this backup has not been filled in with the most recent previous filled or full backup. See <a href="#_conf_incrfill_">$Conf{IncrFill}</a>.</p> |
4739 | 2317 | </dd> | 1686 | |
4740 | 2318 | <dt><strong><a name="fillfromnum" class="item">fillFromNum</a></strong></dt> | 1687 | </dd> |
4741 | 2319 | 1688 | <dt id="fillFromNum">fillFromNum</dt> | |
4742 | 2320 | <dd> | 1689 | <dd> |
4743 | 2321 | <p>If this backup was filled (ie: noFill is 0) then this is the | 1690 | |
4744 | 2322 | number of the backup that it was filled from</p> | 1691 | <p>If this backup was filled (ie: noFill is 0) then this is the number of the backup that it was filled from</p> |
4745 | 2323 | </dd> | 1692 | |
4746 | 2324 | <dt><strong><a name="mangle" class="item">mangle</a></strong></dt> | 1693 | </dd> |
4747 | 2325 | 1694 | <dt id="mangle">mangle</dt> | |
4748 | 2326 | <dd> | 1695 | <dd> |
4749 | 2327 | <p>Set if this backup has mangled file names and attributes. Always | 1696 | |
4750 | 2328 | true for backups in v1.4.0 and above. False for all backups prior | 1697 | <p>Set if this backup has mangled file names and attributes. Always true for backups in v1.4.0 and above. False for all backups prior to v1.4.0.</p> |
4751 | 2329 | to v1.4.0.</p> | 1698 | |
4752 | 2330 | </dd> | 1699 | </dd> |
4753 | 2331 | <dt><strong><a name="xfermethod" class="item">xferMethod</a></strong></dt> | 1700 | <dt id="xferMethod">xferMethod</dt> |
4754 | 2332 | 1701 | <dd> | |
4755 | 2333 | <dd> | 1702 | |
4756 | 2334 | <p>Set to the value of <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> when this dump was done.</p> | 1703 | <p>Set to the value of <a href="#_conf_xfermethod_">$Conf{XferMethod}</a> when this dump was done.</p> |
4757 | 1704 | |||
4758 | 2335 | </dd> | 1705 | </dd> |
4761 | 2336 | <dt><strong><a name="level" class="item">level</a></strong></dt> | 1706 | <dt id="level">level</dt> |
4760 | 2337 | |||
4762 | 2338 | <dd> | 1707 | <dd> |
4766 | 2339 | <p>The level of this dump. A full dump is level 0. Currently incrementals | 1708 | |
4767 | 2340 | are 1. But when multi-level incrementals are supported this will reflect | 1709 | <p>The level of this dump. A full dump is level 0. Currently incrementals are 1. But when multi-level incrementals are supported this will reflect each dump's incremental level.</p> |
4768 | 2341 | each dump's incremental level.</p> | 1710 | |
4769 | 2342 | </dd> | 1711 | </dd> |
4770 | 2343 | </dl> | 1712 | </dl> |
4771 | 1713 | |||
4772 | 2344 | </dd> | 1714 | </dd> |
4775 | 2345 | <dt><strong><a name="restores" class="item">restores</a></strong></dt> | 1715 | <dt id="restores">restores</dt> |
4774 | 2346 | |||
4776 | 2347 | <dd> | 1716 | <dd> |
4779 | 2348 | <p>A tab-delimited ascii table listing information about each requested | 1717 | |
4780 | 2349 | restore, one per row. The columns are:</p> | 1718 | <p>A tab-delimited ascii table listing information about each requested restore, one per row. The columns are:</p> |
4781 | 1719 | |||
4782 | 2350 | <dl> | 1720 | <dl> |
4783 | 2351 | <dt><strong>num</strong></dt> | ||
4784 | 2352 | 1721 | ||
4785 | 1722 | <dt id="num1">num</dt> | ||
4786 | 2353 | <dd> | 1723 | <dd> |
4789 | 2354 | <p>Restore number (matches the suffix of the RestoreInfo.nnn and | 1724 | |
4790 | 2355 | RestoreLOG.nnn.z file), unrelated to the backup number.</p> | 1725 | <p>Restore number (matches the suffix of the RestoreInfo.nnn and RestoreLOG.nnn.z file), unrelated to the backup number.</p> |
4791 | 1726 | |||
4792 | 2356 | </dd> | 1727 | </dd> |
4794 | 2357 | <dt><strong><a name="starttime2" class="item">startTime</a></strong></dt> | 1728 | <dt id="startTime1">startTime</dt> |
4795 | 1729 | <dd> | ||
4796 | 2358 | 1730 | ||
4797 | 2359 | <dd> | ||
4798 | 2360 | <p>Start time of the restore in unix seconds.</p> | 1731 | <p>Start time of the restore in unix seconds.</p> |
4799 | 1732 | |||
4800 | 2361 | </dd> | 1733 | </dd> |
4803 | 2362 | <dt><strong><a name="endtime2" class="item">endTime</a></strong></dt> | 1734 | <dt id="endTime1">endTime</dt> |
4802 | 2363 | |||
4804 | 2364 | <dd> | 1735 | <dd> |
4805 | 1736 | |||
4806 | 2365 | <p>End time of the restore in unix seconds.</p> | 1737 | <p>End time of the restore in unix seconds.</p> |
4807 | 1738 | |||
4808 | 2366 | </dd> | 1739 | </dd> |
4811 | 2367 | <dt><strong><a name="result" class="item">result</a></strong></dt> | 1740 | <dt id="result">result</dt> |
4810 | 2368 | |||
4812 | 2369 | <dd> | 1741 | <dd> |
4813 | 1742 | |||
4814 | 2370 | <p>Result (ok or failed).</p> | 1743 | <p>Result (ok or failed).</p> |
4815 | 1744 | |||
4816 | 2371 | </dd> | 1745 | </dd> |
4819 | 2372 | <dt><strong><a name="errormsg" class="item">errorMsg</a></strong></dt> | 1746 | <dt id="errorMsg">errorMsg</dt> |
4818 | 2373 | |||
4820 | 2374 | <dd> | 1747 | <dd> |
4821 | 1748 | |||
4822 | 2375 | <p>Error message if restore failed.</p> | 1749 | <p>Error message if restore failed.</p> |
4823 | 1750 | |||
4824 | 2376 | </dd> | 1751 | </dd> |
4827 | 2377 | <dt><strong><a name="nfiles2" class="item">nFiles</a></strong></dt> | 1752 | <dt id="nFiles1">nFiles</dt> |
4826 | 2378 | |||
4828 | 2379 | <dd> | 1753 | <dd> |
4829 | 1754 | |||
4830 | 2380 | <p>Number of files restored.</p> | 1755 | <p>Number of files restored.</p> |
4831 | 1756 | |||
4832 | 2381 | </dd> | 1757 | </dd> |
4835 | 2382 | <dt><strong>size</strong></dt> | 1758 | <dt id="size1">size</dt> |
4834 | 2383 | |||
4836 | 2384 | <dd> | 1759 | <dd> |
4837 | 1760 | |||
4838 | 2385 | <p>Size in bytes of the restored files.</p> | 1761 | <p>Size in bytes of the restored files.</p> |
4839 | 1762 | |||
4840 | 2386 | </dd> | 1763 | </dd> |
4843 | 2387 | <dt><strong><a name="tarcreateerrs" class="item">tarCreateErrs</a></strong></dt> | 1764 | <dt id="tarCreateErrs">tarCreateErrs</dt> |
4842 | 2388 | |||
4844 | 2389 | <dd> | 1765 | <dd> |
4845 | 1766 | |||
4846 | 2390 | <p>Number of errors from BackupPC_tarCreate during restore.</p> | 1767 | <p>Number of errors from BackupPC_tarCreate during restore.</p> |
4847 | 1768 | |||
4848 | 2391 | </dd> | 1769 | </dd> |
4851 | 2392 | <dt><strong><a name="xfererrs2" class="item">xferErrs</a></strong></dt> | 1770 | <dt id="xferErrs1">xferErrs</dt> |
4850 | 2393 | |||
4852 | 2394 | <dd> | 1771 | <dd> |
4853 | 1772 | |||
4854 | 2395 | <p>Number of errors from smbclient, tar, rsync or ftp during restore.</p> | 1773 | <p>Number of errors from smbclient, tar, rsync or ftp during restore.</p> |
4855 | 1774 | |||
4856 | 2396 | </dd> | 1775 | </dd> |
4857 | 2397 | </dl> | 1776 | </dl> |
4858 | 1777 | |||
4859 | 2398 | </dd> | 1778 | </dd> |
4862 | 2399 | <dt><strong><a name="archives" class="item">archives</a></strong></dt> | 1779 | <dt id="archives">archives</dt> |
4861 | 2400 | |||
4863 | 2401 | <dd> | 1780 | <dd> |
4866 | 2402 | <p>A tab-delimited ascii table listing information about each requested | 1781 | |
4867 | 2403 | archive, one per row. The columns are:</p> | 1782 | <p>A tab-delimited ascii table listing information about each requested archive, one per row. The columns are:</p> |
4868 | 1783 | |||
4869 | 2404 | <dl> | 1784 | <dl> |
4870 | 2405 | <dt><strong>num</strong></dt> | ||
4871 | 2406 | 1785 | ||
4872 | 1786 | <dt id="num2">num</dt> | ||
4873 | 2407 | <dd> | 1787 | <dd> |
4876 | 2408 | <p>Archive number (matches the suffix of the ArchiveInfo.nnn and | 1788 | |
4877 | 2409 | ArchiveLOG.nnn.z file), unrelated to the backup or restore number.</p> | 1789 | <p>Archive number (matches the suffix of the ArchiveInfo.nnn and ArchiveLOG.nnn.z file), unrelated to the backup or restore number.</p> |
4878 | 1790 | |||
4879 | 2410 | </dd> | 1791 | </dd> |
4881 | 2411 | <dt><strong><a name="starttime3" class="item">startTime</a></strong></dt> | 1792 | <dt id="startTime2">startTime</dt> |
4882 | 1793 | <dd> | ||
4883 | 2412 | 1794 | ||
4884 | 2413 | <dd> | ||
4885 | 2414 | <p>Start time of the restore in unix seconds.</p> | 1795 | <p>Start time of the restore in unix seconds.</p> |
4886 | 1796 | |||
4887 | 2415 | </dd> | 1797 | </dd> |
4890 | 2416 | <dt><strong><a name="endtime3" class="item">endTime</a></strong></dt> | 1798 | <dt id="endTime2">endTime</dt> |
4889 | 2417 | |||
4891 | 2418 | <dd> | 1799 | <dd> |
4892 | 1800 | |||
4893 | 2419 | <p>End time of the restore in unix seconds.</p> | 1801 | <p>End time of the restore in unix seconds.</p> |
4894 | 1802 | |||
4895 | 2420 | </dd> | 1803 | </dd> |
4898 | 2421 | <dt><strong>result</strong></dt> | 1804 | <dt id="result1">result</dt> |
4897 | 2422 | |||
4899 | 2423 | <dd> | 1805 | <dd> |
4900 | 1806 | |||
4901 | 2424 | <p>Result (ok or failed).</p> | 1807 | <p>Result (ok or failed).</p> |
4902 | 1808 | |||
4903 | 2425 | </dd> | 1809 | </dd> |
4906 | 2426 | <dt><strong><a name="errormsg2" class="item">errorMsg</a></strong></dt> | 1810 | <dt id="errorMsg1">errorMsg</dt> |
4905 | 2427 | |||
4907 | 2428 | <dd> | 1811 | <dd> |
4908 | 1812 | |||
4909 | 2429 | <p>Error message if archive failed.</p> | 1813 | <p>Error message if archive failed.</p> |
4972 | 2430 | </dd> | 1814 | |
4973 | 2431 | </dl> | 1815 | </dd> |
4974 | 2432 | </dd> | 1816 | </dl> |
4975 | 2433 | </dl> | 1817 | |
4976 | 2434 | </dd> | 1818 | </dd> |
4977 | 2435 | </dl> | 1819 | </dl> |
4978 | 2436 | </dd> | 1820 | |
4979 | 2437 | </dl> | 1821 | </dd> |
4980 | 2438 | <p> | 1822 | </dl> |
4981 | 2439 | </p> | 1823 | |
4982 | 2440 | <h2><a name="compressed_file_format">Compressed file format</a></h2> | 1824 | </dd> |
4983 | 2441 | <p>The compressed file format is as generated by Compress::Zlib::deflate | 1825 | </dl> |
4984 | 2442 | with one minor, but important, tweak. Since Compress::Zlib::inflate | 1826 | |
4985 | 2443 | fully inflates its argument in memory, it could take large amounts of | 1827 | <h2 id="Compressed-file-format">Compressed file format</h2> |
4986 | 2444 | memory if it was inflating a highly compressed file. For example, a | 1828 | |
4987 | 2445 | 200MB file of 0x0 bytes compresses to around 200K bytes. If | 1829 | <p>The compressed file format is as generated by Compress::Zlib::deflate with one minor, but important, tweak. Since Compress::Zlib::inflate fully inflates its argument in memory, it could take large amounts of memory if it was inflating a highly compressed file. For example, a 200MB file of 0x0 bytes compresses to around 200K bytes. If Compress::Zlib::inflate was called with this single 200K buffer, it would need to allocate 200MB of memory to return the result.</p> |
4988 | 2446 | Compress::Zlib::inflate was called with this single 200K buffer, it | 1830 | |
4989 | 2447 | would need to allocate 200MB of memory to return the result.</p> | 1831 | <p>BackupPC watches how efficiently a file is compressing. If a big file has very high compression (meaning it will use too much memory when it is inflated), BackupPC calls the flush() method, which gracefully completes the current compression. BackupPC then starts another deflate and simply appends the output file. So the BackupPC compressed file format is one or more concatenated deflations/flushes. The specific ratios that BackupPC uses is that if a 6MB chunk compresses to less than 64K then a flush will be done.</p> |
4990 | 2448 | <p>BackupPC watches how efficiently a file is compressing. If a big file | 1832 | |
4991 | 2449 | has very high compression (meaning it will use too much memory when it | 1833 | <p>Back to the example of the 200MB file of 0x0 bytes. Adding flushes every 6MB adds only 200 or so bytes to the 200K output. So the storage cost of flushing is negligible.</p> |
4992 | 2450 | is inflated), BackupPC calls the <code>flush()</code> method, which gracefully | 1834 | |
4993 | 2451 | completes the current compression. BackupPC then starts another | 1835 | <p>To easily decompress a BackupPC compressed file, the script BackupPC_zcat can be found in __INSTALLDIR__/bin. For each file name argument it inflates the file and writes it to stdout.</p> |
4994 | 2452 | deflate and simply appends the output file. So the BackupPC compressed | 1836 | |
4995 | 2453 | file format is one or more concatenated deflations/flushes. The specific | 1837 | <h2 id="Rsync-checksum-caching">Rsync checksum caching</h2> |
4996 | 2454 | ratios that BackupPC uses is that if a 6MB chunk compresses to less | 1838 | |
4997 | 2455 | than 64K then a flush will be done.</p> | 1839 | <p>An incremental backup with rsync compares attributes on the client with the last full backup. Any files with identical attributes are skipped. A full backup with rsync sets the --ignore-times option, which causes every file to be examined independent of attributes.</p> |
4998 | 2456 | <p>Back to the example of the 200MB file of 0x0 bytes. Adding flushes | 1840 | |
4999 | 2457 | every 6MB adds only 200 or so bytes to the 200K output. So the | 1841 | <p>Each file is examined by generating block checksums (default 2K blocks) on the receiving side (that's the BackupPC side), sending those checksums to the client, where the remote rsync matches those checksums with the corresponding file. The matching blocks and new data is sent back, allowing the client file to be reassembled. A checksum for the entire file is sent to as an extra check the the reconstructed file is correct.</p> |
5000 | 2458 | storage cost of flushing is negligible.</p> | 1842 | |
4939 | 2459 | <p>To easily decompress a BackupPC compressed file, the script | ||
4940 | 2460 | BackupPC_zcat can be found in __INSTALLDIR__/bin. For each | ||
4941 | 2461 | file name argument it inflates the file and writes it to stdout.</p> | ||
4942 | 2462 | <p> | ||
4943 | 2463 | </p> | ||
4944 | 2464 | <h2><a name="rsync_checksum_caching">Rsync checksum caching</a></h2> | ||
4945 | 2465 | <p>An incremental backup with rsync compares attributes on the client | ||
4946 | 2466 | with the last full backup. Any files with identical attributes | ||
4947 | 2467 | are skipped. A full backup with rsync sets the --ignore-times | ||
4948 | 2468 | option, which causes every file to be examined independent of | ||
4949 | 2469 | attributes.</p> | ||
4950 | 2470 | <p>Each file is examined by generating block checksums (default 2K | ||
4951 | 2471 | blocks) on the receiving side (that's the BackupPC side), sending | ||
4952 | 2472 | those checksums to the client, where the remote rsync matches those | ||
4953 | 2473 | checksums with the corresponding file. The matching blocks and new | ||
4954 | 2474 | data is sent back, allowing the client file to be reassembled. | ||
4955 | 2475 | A checksum for the entire file is sent to as an extra check the | ||
4956 | 2476 | the reconstructed file is correct.</p> | ||
4957 | 2477 | <p>This results in significant disk IO and computation for BackupPC: | ||
4958 | 2478 | every file in a full backup, or any file with non-matching attributes | ||
4959 | 2479 | in an incremental backup, needs to be uncompressed, block checksums | ||
4960 | 2480 | computed and sent. Then the receiving side reassembles the file and | ||
4961 | 2481 | has to verify the whole-file checksum. Even if the file is identical, | ||
4962 | 2482 | prior to 2.1.0, BackupPC had to read and uncompress the file twice, | ||
4963 | 2483 | once to compute the block checksums and later to verify the whole-file | ||
4964 | 2484 | checksum.</p> | ||
4965 | 2485 | <p>Starting in 2.1.0, BackupPC supports optional checksum caching, | ||
4966 | 2486 | which means the block and file checksums only need to be computed | ||
4967 | 2487 | once for each file. This results in a significant performance | ||
4968 | 2488 | improvement. This only works for compressed pool files. | ||
4969 | 2489 | It is enabled by adding</p> | ||
4970 | 2490 | <pre> | ||
4971 | 2491 | '--checksum-seed=32761',</pre> |
I was able to run sponsor-patch on this and it built locally just fine. I reviewed the debdiff and it looks ok.