418ea8be8f0f8307f9e2e63d9593cc8d03ddf778
[BackupPC.git] / ChangeLog
1 #========================================================================
2 #
3 # ChangeLog - change log for BackupPC.
4 #
5 # DESCRIPTION
6 #   Revision history for BackupPC, detailing significant changes between
7 #   versions, most recent first.
8 #
9 # AUTHOR
10 #   Craig Barratt  <cbarratt@users.sourceforge.net>
11 #
12 #========================================================================
13 #
14 # Version __VERSION__, released __RELEASEDATE__.
15 #
16 # See http://backuppc.sourceforge.net.
17 #
18 #========================================================================
19
20 #------------------------------------------------------------------------
21 # Version __VERSION__, __RELEASEDATE__
22 #------------------------------------------------------------------------
23
24 * Support for rsync and rsyncd backup and restore.  Changes to
25   BackupPC_dump, BackupPC_restore, and new modules BackupPC::Xfer::Rsync
26   and BackupPC::Xfer::RsyncFileIO.
27
28 * Added internationalization (i18n) code from Xavier Nicollet,
29   with additions from Guillaume Filion.  Voila!  BackupPC_Admin
30   now supports English and French, and adding more languages is
31   now easy.  New config paramater $Conf{Language} sets the language.
32
33 * Added optional user-defined pre/post dump/restore commands, allowing
34   things like database shutdown/startup for dumps.
35
36 * Changed the way hosts are found.
37
38 * Added $Conf{ClientNameAlias}, which allows the name of the physical
39   client machine to be set.  This allows several different backup
40   "hosts" to all refer to the same physical machine, which is
41   convenient if several different types of data need to be backed
42   up, or if different parameters are needed for different parts of
43   the host.
44
45 * Replaced $Conf{PingArgs} with $Conf{PingCmd}, added $Conf{DfCmd},
46   $Conf{NmbLookupCmd} allowing all these commands to be fully
47   configured.  Also, all commands can also now be fragments of
48   perl code.
49
50 * Moved all smbclient commands into the config.pl file so the specific
51   arguments can be customized.  New config parameters are
52   $Conf{SmbClientFullCmd}, $Conf{SmbClientIncrCmd} and
53   $Conf{SmbClientRestoreCmd}.
54
55 * Added new BackupPC::View module that creates views of backups
56   (handling merging etc).  Updated BackupPC_Admin, BackupPC_zipCreate
57   and BackupPC_tarCreate to use BackupPC::View.  This removes lots
58   of merging and mangling code from the higher-level code.
59
60 * Added code from Toby Johnson that allows additional users to be
61   specified in the hosts file; these users can also view/start/stop
62   and restore backups for that host.  Also added a new config
63   setting $Conf{CgiNavBarAdminAllHosts} that allows all hosts to
64   be listed in the left nav bar for admins.
65
66 * Added $Conf{HardLinkMax} (default 31999) which sets the limit on
67   the maximum number of hardlinks per file in the pool.  If a file
68   ever gets to this number of links a new pool file is created to
69   handle additional links.
70
71 * Added $Conf{PerlModuleLoad}, which allows optional additional perl
72   modules to be loaded.
73
74 * Added $Conf{EMailUserDestDomain} and other EMail config settings to
75   allow language-specific default messages to be overridden.
76
77 * Added BPC_FTYPE_DELETED to lib/BackupPC/Attrib.pm, allowing deleted
78   files to be represented in the attrib file correctly.
79
80 * Added support for environment variable BPC_SMB_PASSWD, which is the
81   client's smb password.  This overrides the old environment variable
82   PASSWD.
83
84 * Added taint cleanup for perl5.8 to lib/BackupPC/Lib.pm.
85
86 * Changed $tar_unpack_header format in BackupPC_tarExtract to correctly
87   handle files with trailing spaces.
88
89 * Added catching of SIG_PIPE to BackupPC_dump, and changed catch_signal
90   to ignore multiple signals of the same type.
91
92 * Added reporting of the largest number of hardlinks in the pool to the
93   log file.
94
95 * Adding reporting of syntax errors in the per-PC config.pl file.
96
97 * Updated BackupPC_sendEmail to handle language-specific email messages.
98
99 * Allow client (host) names to contain spaces.  Spaces in host names
100   need to be escaped via "\" in the hosts file.  The user of spaces in
101   host names is discouraged, but they should work.  One feature that
102   doesn't work with host names that contain spaces is the highlighting
103   of that name in the log file display in the CGI interface.  There are
104   no plans to fix this.
105
106 * Renamed $Conf{SmbClientTimeout} to $Conf{ClientTimeout}.
107
108 * Fixed all open() calls to use 3 argument form to fix handling of file
109   names with trailing whitespace.  Also fixed CGI interface so these
110   file names are displayed correctly.
111
112 * Fixed new 2.0.0 CGI navigation bug that causes the top-level directory
113   to have a URL "&share=//boot&dir=" instead of "&share=/boot&dir=/".
114   Reported by Pascal Schelcher.  Fixed similar problem reported by
115   Doug Lytle.
116
117 * Added "PerlTaintCheck On" to the mod_perl section in the docs,
118   suggested by Tim Demarest.
119
120 #------------------------------------------------------------------------
121 # Version 1.5.0, 2 Aug 2002
122 #------------------------------------------------------------------------
123
124 * Changed conf/config.pl so that $Conf{TarIncrArgs} uses the --newer
125   option instead of --newer-mtime.  Also removed --atime-preserve from
126   $Conf{TarClientCmd}.  This makes the default settings work better
127   with tripwire.
128
129 * Fixed configure.pl so it correctly detects a running BackupPC <= v1.4.0
130   so it can correctly warn the user to stop it before upgrading.  Reported
131   by David Holland.
132
133 * Added missing ";" to entity escape in EscapeHTML in BackupPC_Admin.
134   Reported by Guillaume Filion.
135
136 * Added LDAP setup to documentation from David Holland.
137
138 * Tar.pm now adds a "." to file paths that start with "/", so that all
139   tar paths are relative.  From Ludovic Drolez.
140
141 #------------------------------------------------------------------------
142 # Version 1.5.0beta0, 30 Jun 2002
143 #------------------------------------------------------------------------
144
145 * A full set of restore options is now supported, including direct
146   restore via smbclient or tar or downloading a zip or tar file.
147
148 * Major additions to CGI script to support better directory navigation,
149   restore features and mod_perl.  Also, file downloads from the CGI
150   interface now correctly preserve the file name and provide the
151   correct Content-Type for the most common types of files.  Improved
152   directory navigation was contributed by Ryan Kucera.
153
154 * New script BackupPC_zipCreate (contributed by Guillaume Filion) is the
155   zip analog of BackupPC_tarCreate.  BackupPC_zipCreate can be used to
156   create a zip archive of any portion of a backup.
157
158 * Substantial additions to BackupPC_tarCreate to support restore,
159   including modifying path names, handling hardlinks, fixing
160   support of old backups without attributes (pre-v1.4.0).  Plus
161   BackupPC_tarCreate is now an offical part of the release.
162   (Lack of support for hardlinks was reported by John Stanley.)
163
164 * BackupPC_tarExtract now supports hardlinks and fixed pooling of
165   attribute files.
166
167 * A unix domain socket is now used for communication between the CGI
168   interface and BackupPC.  The original TCP socket is optional.  Sockets
169   are correctly re-initialized if config.pl is updated with new socket
170   settings.
171
172 * For improved security messages over the unix or TCP socket are protected
173   via an MD5 digest based on a shared secret, a sequence number, a time
174   stamp and a unique per-connection number.
175
176 * Additions to configure.pl to support install of directory navigation
177   images.
178
179 * Fixed case where $Conf{BackupFilesOnly} or $Conf{BackupFilesExclude}
180   were set to a single string or list (in v1.4.0 only the case of
181   hash worked correctly).  Reported by Phillip Bertolus.
182
183 * Fixed case of $Conf{BackoutGoodCnt} == 0.  This setting now makes the
184   client always subject to blackout, matching the comments in config.pl.
185   Also fixed handling of $Conf{BackoutGoodCnt} < 0 in the CGI script
186   reported by Pascal Schelcher.
187
188 * Fixed byte and file totals for tar backups, reported by several users.
189
190 * Fixed --newer-mtime date/timestamp format to make it ISO 8601 compliant,
191   suggested by Erminio Baranzini.
192
193 * Fixed handling of $Conf{BackupFilesOnly} in BackupPC::Xfer::Tar.pm, as
194   well as shell escaping of tar arguments.
195
196 * Fixed entity encoding of 8-bit characters in the CGI interface.
197
198 * Added optional CGI headers in $Conf{CgiHeaders} that by default
199   is set to a no-cache pragma.  Suggested by Benno Zuure.
200
201 #------------------------------------------------------------------------
202 # Version 1.4.0, 16 Mar 2002
203 #------------------------------------------------------------------------
204
205 * BackupPC now supports tar (in addition to smb) for extracting host    
206   data.  This is the most convenient option for linux/unix hosts.
207   Tar can be configured to run over ssh, rsh or to backup a local
208   nfs mount from the host.
209
210 * Support for special files, including symbolic links, fifo, character
211   and block device files has been added, so that all native linux/unix
212   file types can be correctly backed up when using tar transport.
213   Special files are all stored as regular files and the type attributes
214   are used to remember the original file type.
215
216 * All unix file attributes are now saved (and pooled when possible).
217   This includes user and group ownership, permissions, and modification
218   time.  Smbclient also does a reasonable job of emulating unix 
219   permissions (such as mtime), and these attributes get saved too.
220
221 * The new default is to not fill incremental dumps.  configure.pl
222   automatically sets $Conf{IncrFill} to 0.  The default was 1
223   (incrementals were filled with hardlinks).  Since the CGI
224   script does filling at browsing time, there is no need to
225   fill incremental dumps.
226
227 * Backup file names are now stored in "mangled" form. Each node of a
228   path is preceded by "f", and special characters (\n, \r, % and /) are
229   URI-encoded as "%xx", where xx is the ascii character's hex value. So
230   c:/craig/example.txt is now stored as fc/fcraig/fexample.txt. This
231   was done mainly so meta-data could be stored alongside the backup
232   files without name collisions.  In particular, the attributes for the
233   files in a directory are stored in a file called "attrib", and
234   mangling avoids file name collisions (I discarded the idea of having
235   a duplicate directory tree for every backup just to store the
236   attributes). Other meta-data (eg: rsync checksums) could be stored in
237   file names preceded by, eg, "c".  There are two other benefits to
238   mangling: the share name might contain "/" (eg: "/home/craig" for tar
239   transport), and I wanted that represented as a single level in the
240   storage tree.  Secondly, as files are written to NewFileList for later
241   processing by BackupPC_link, embedded newlines in the file's path
242   will cause problems which are avoided by mangling.
243
244   The CGI script undoes the mangling, so it is invisibe to the user.
245   Of course, old (unmangled) backups are still supported by the CGI
246   interface.
247
248 * Various changes to the CGI interface, BackupPC_Admin:
249
250   + Added button that allows users to manually start a full dump in
251     addition to the existing incremental dump.
252
253   + Added display of file attributes when browsing backups.
254
255   + Added an optional holdoff time specified by the user when canceling
256     a backup. BackupPC will not attempt any new backups for at least the
257     specified time. This holdoff time can be changed whether or not a
258     backup is running.
259
260   + Added supports for file mangling, and correct merging of unfilled
261     backups from mangled or unmangled (and compressed or uncompressed)
262     fulls when browsing or restoring.
263
264   + Only displays a "Start Incr Backup" button if there are already some
265     backups.
266
267   + For DHCP hosts, when a user tries to manually start a backup, add
268     a check for the netbios name of both the host the request came
269     from (REMOTE_ADDR) and the last known DHCP address for that host
270     to see if either address matches the host. If not, an error
271     message is display. The previous behavior was that only requests
272     from the client itself succeeded, and requests from other machines
273     quietly failed.
274
275 * Changed the version numbering to X.Y.Z, instead of X.0Y. This release
276   is 1.4.0. The first digit is for major new releases, the middle digit
277   is for significant feature releases and improvements, and the last
278   digit is for bug fixes. You should think of the old 1.00, 1.01, 1.02
279   and 1.03 as 1.0.0, ..., 1.3.0.
280
281 * BackupPC and the CGI script BackupPC_Admin now check that the effective
282   user id is correct to avoid accidentally launching BackupPC as the
283   wrong user or detecting CGI configuration problems.  This behavior
284   can be turned off using the $Conf{BackupPCUserVerify} option.
285
286 * In numerous places changed "Smb" to "Xfer" (eg: log file names) to
287   support generic names for both smb and tar transport methods.  The
288   CGI script checks for old names for backward compatibility.
289
290 * Major changed to Backup_dump to support new tar transport.  All transport
291   specific code moved into BackupPC::Xfer::Smb and BackupPC::Xfer::Tar
292   objects.
293
294 * Added workaround for a bug in Samba's smbclient for files between 2GB
295   and 4GB.  The file size in the tar header is incorrect.  This allows
296   files up to 4GB to work with smbclient, rather than 2GB.  To support
297   files larger than 2GB you must make sure perl is compiled with the
298   uselargefiles option (use "perl -V | egrep largefiles" to check) and
299   the pool directory must be on a file system that supports large files.
300
301 * Moved the pool writing code into a module BackupPC::PoolWrite.  This
302   allows the clever file pool checking (digest, uncompressing, comparing
303   etc with minimum disk IO) to be used easily in multiple places (eg: it
304   is now used for writing attribute files so they can be pooled).
305
306 * Changed MD5 to Digest::MD5 to avoid use of the depreceated MD5 module.
307
308 * Shortened default $Conf{MyPath} so that perl's taint mode is more likely
309   to be happy.  The old $Conf{MyPath} contained /usr/local/bin, which
310   on one user's machine was world writable and perl -T correctly
311   complained about it.
312
313 * Fixed ping command options in Lib.pm so that it works on OpenBSD.
314   Thanks to Kyle Amon for sending the fix.  Decided to move the
315   ping options from Lib.pm into config.pl (as $Conf{PingArgs}) and
316   now configure.pl tries to come up with a sensible default based on
317   the OS.
318
319 * Fixed argument checking in BackupPC_tarExtract to allow '$' in the
320   share name (eg: C$).  Thanks to Jules Agee for this fix.  Also
321   changed the default config.pl so that single quotes are used
322   everywhere so that people don't get tripped up putting '$' inside
323   double-quoted strings.
324
325 #------------------------------------------------------------------------
326 # Version 1.03, 9 Dec 2001
327 #------------------------------------------------------------------------
328
329 * BackupPC now has full support for compression.  There are now two
330   pool areas, the original pool for uncompressed files, and cpool for
331   compressed files. The compression is done by Compress::Zlib.
332   Compression reduces the pool disk usage by around 40%, although your
333   mileage may vary.  Compression is optional and can also be specified on
334   a per-PC basis (although this will cost more pool storage since many
335   backup files will have to be stored in both compressed and
336   uncompressed forms.
337
338 * A new script, BackupPC_compressPool, can be run to compress the entire
339   pool.  This is used once to migrate all the pool data from uncompressed
340   to compressed on existing installations.  Read the documentation
341   (Installing BackupPC/Compressing an existing pool) before running
342   BackupPC_compressPool!
343
344   Alternatively, compression can simply be turned on and all new backups
345   will be compressed. Both old (uncompressed) and new (compressed)
346   backups can be browsed and viewed. Eventually, the old backups will
347   expire and all the pool data will be compressed.  However, until the
348   old backups expire, this approach could require 60% or more additional
349   pool storage space to store both uncompressed and compressed versions
350   of the backup files.
351
352 * Significant improvements to the cgi interface, BackupPC_Admin:
353
354     - much better layout navigation
355     - handles compressed backup files and compressed log files
356     - handles unfilled incremental dumps
357     - better backup directory browsing navigation
358     - reports compression statistics
359     - $Conf{CgiDateFormatMMDD} allows you to set date format (MM/DD or DD/MM)
360     - Additional customization with $Conf{CgiHeaderFontType},
361       $Conf{CgiHeaderFontSize}, $Conf{CgiNavBarBgColor}, and
362       $Conf{CgiHeaderBgColor}.
363
364 * Eliminated BackupPC_queueAll.  BackupPC directly reads the hosts
365   file and queues the PCs itself.  Like config.pl, BackupPC will
366   re-read the hosts file on each wakeup if its modification time
367   changes, or upon a SIGHUP.  This also makes for better behavior
368   when adding a host: if you add hosts, simply send a SIGHUP to
369   BackupPC or wait for the next wakeup.
370
371 * BackupPC_dump now compresses the SmbLOG file if compression is enabled.
372
373 * BackupPC_dump keeps track of compressed file sizes so that compression
374   statistics can be reported by the cgi interface.
375
376 * Aging of old log files now handles compressed log files (.z extension).
377
378 * Added configuration option $Conf{IncrFill} to specify whether
379   incremental dumps should be filled in.  Old behavior was that
380   filling was on.  Now it's optional.  See config.pl for more
381   details.
382
383 * BackupPC_nightly now cleans and generates statistics for both
384   the uncompressed pool and compressed pool (cpool).
385
386 * Added new utility script BackupPC_zcat that can be used to
387   uncompresses BackupPC files.
388
389 * configure.pl offers various options related to compression,
390   depending upon whether this is a new install or upgrade,
391   and whether or not Compress::Zlib is installed.
392
393 * configure.pl now makes a backup copy of config.pl before
394   config.pl is updated.
395
396 * added three new fields to the backups file to handle optional
397   filling and compression stats.
398
399 * Added -e option to BackupPC_dump.  BackupPC now invokes BackupPC_dump -e
400   on each dhcp host once each night to verify that very old backups are
401   expired.  This ensures that very old backups are expired even if
402   the dhcp host has not been on the network for a long time.
403
404 * fixed bug in BackupPC::FileZIO.pm that required Compress::Zlib,
405   even if compression was off.  Thanks to Steve Holmes for reporting
406   this.
407
408 * fixed bug that caused a BackupPC queue to get blocked when a backup
409   cancel attempt was made during the BackupPC_link phase.
410
411 #------------------------------------------------------------------------
412 # Version 1.02, 28 Oct 2001.
413 #------------------------------------------------------------------------
414
415 * Added new script BackupPC_tarExtract to extract the smbclient tar
416   archive. This reduces disk writes by perhaps 90-95% and disk reads by
417   50%. Previously, tar was used to extract and write everything to disk.
418   Then BackupPC_dump would read enough of each file to compute the MD5
419   digest, and then compare the full file with candidate pool files.  So
420   for each 1MB file that matches a single file in the pool, there would
421   be 1MB of disk writes and 2MB of disk reads (to compare two 1MB files).
422
423   BackupPC_tarExtract instead extracts the archive using a 1MB memory
424   buffer.  This allows the MD5 digest to be computed without touching the
425   disk.  Next, any potential pool file compares are done by comparing the
426   pool file against the incoming tar data in memory, which only requires
427   the pool file to be read.  So for each 1MB file that matches a single
428   file in the pool, there are now no disk writes, and only 1MB of reads.
429   BackupPC_tarExtract handles arbitrary size files and repeated
430   potential pool matches.  If the incoming file doesn't match the pool
431   then it is written to disk (once the pool is mature this happens maybe
432   5-10% of the time).
433
434 * Substantial changes to BackupPC_dump:
435
436     + BackupPC_tarExtract is now used in place of tar.
437
438     + BackupPC_dump now reads the output from both smbclient and
439       BackupPC_tarExtract and merges them into SmbLOG.
440
441     + Named pipes are no longer used to connect smbclient to tar
442       (now BackupPC_tarExtract).  Regular pipes are used instead.
443       This avoids the need to system mknod or mkfifo.
444
445     + Locked files on the client that can't be read by smbclient
446       previously were filled with 0x0 bytes by smbclient, meaning
447       tar extracted a useless file filled with 0x0 bytes.  Now,
448       BackupPC_dump watches the output of smbclient and removes
449       any files that smbclient couldn't read.  This avoids storing
450       useless files.  It tries to replace such files with a hard link
451       to a previous dump.  These actions appear in the log file.
452
453 * added new module lib/BackupPC/FileZIO.pm. This handles pool file
454   I/O and is used by BackupPC_tarExtract.  BackupPC::FileIO supports
455   reading and writing compressed and regular files and provides all the
456   hooks for compression support in BackupPC (should be supported in next
457   version). BackupPC::FileIO also does efficient writing of files that
458   contain leading 0x0 bytes (by seeking past the 0x0 bytes). This is
459   helpful when smbclient reads a locked file, and it fills the tar
460   output with a file of the correct size but all 0x0.  Such files will be
461   later removed by BackupPC_dump.  But in the meantime, BackupPC::FileIO
462   writes such files efficiently (as sparse files), meaning just a few
463   blocks of disk space will be needed even if the file is large.
464
465 * alive/dead counting for blackout now works correctly for DHCP hosts.
466
467 * BackupPC resets activeJob on startup, to fix bug when BackupPC was
468   killed and restarted with backups running.
469
470 * added extra non blocking select() in BackupPC to make sure the socket
471   reads don't block.
472
473 * BackupPC avoids queuing multiple BackupPC_queueAll's on the CmdQueue.
474
475 * Updated BackupPC_sendEmail to correctly parse the locked file
476   error from 2.2.1a smbclient, so that missing Outlook file emails
477   can be correctly sent.
478
479 * Changed HostInfoRead() in lib/BackupPC/Lib.pm to lowercase the
480   hostname read from the hosts file.
481
482 * BackupPC_Admin provides general summary when the host name is empty.
483
484 * configure.pl (and BackupPC) now requires perl 5.6.0 or later.
485
486 * configure.pl complains if BackupPC is already running, reminding you
487   to stop it before upgrading.
488
489 * updated documentation, and fixed auto-insertion of config.pl into
490   BackupPC.pod (previously the last config parameter was left out of
491   BackupPC.pod).
492
493 #------------------------------------------------------------------------
494 # Version 1.01, 30 Sep 2001
495 #------------------------------------------------------------------------
496
497 * Documentation cleanup in README, doc/BackupPC.pod, conf/config.pl.
498
499 * BackupPC_sendMail now reads the optional per-PC config file, allowing
500   email configuration parameters to be set on a per-PC basis.
501
502 * Removed the unused 4096-length MD5 digest code in lib/BackupPC/Lib.pm.
503
504 #------------------------------------------------------------------------
505 # Version 1.00, 21 Sep 2001
506 #------------------------------------------------------------------------
507
508 * Initial release of BackupPC on sourceforge.net.