wiki:011

Box Backup 0.11

Changes in This Release (since 0.10)

Data Integrity

  • Fixed some bugs with backing up, restoring and comparing files over 2GB in compressed size.
  • Fixed a bug with restoring symlinks to directories outside of the backed-up location, thanks to Hans-Joachim Baader.
  • Added support for nanosecond timestamps in struct stat on Linux, where supported by the filesystem. (0.11rc4 [2080])
  • Fixed the use of an unreasonably short type as the temporary storage for inode numbers on Windows, resulting in all inode numbers being coerced into 216 space and many duplicates on systems with large numbers of files being backed up, possibly resulting in store corruption due to unwanted file rename operations. (0.11rc4 [2395])
  • Removed check for soft limit being less than 97% of the hard limit, as some users want to set them equal to ensure that no files are ever deleted by housekeeping. (0.11rc5 [2560])

Reliability

  • Changed keepalive and diff timers to run in real time, not CPU time.
  • Enable KeepAliveTime by default on new installations, set to 120 seconds.
  • Fixed a number of bugs (race conditions and crashes) in the Windows client.
  • Fixed a (minor) bug where bbstoreaccounts could modify account limits while the account was locked by a running backup.
  • Fixed bbackupd mysteriously failing to back up if one of the location paths did not exist.
  • Added saving of the list of unused root directory entries to the StoreObjectInfoFile, so that they will persist across restarts of bbackup (thanks to Gary Niemcewicz).
  • Changed server-side object cache to always add file size to timestamp in release binaries, to help caching work better on machines where the platform supports high-res timestamps but the filesystem doesn't (e.g. Linux ext3, MacOS X hfs). (0.11rc4 [2085])
  • Fixed bbackupquery to check the return code from system commands, and if not zero, give a warning and set the bbackupquery return code to COMMAND_RETURN_ERROR. (0.11rc4 [2142])
  • Added check for Restore_TargetPathNotFound (restoring to nonexistent directory) on all platforms as it's not specific to Windows. (0.11rc4 [2142])
  • Added restore -f option to bbackupquery to force restore to continue after certain recoverable errors. (0.11rc4 [2157])
  • Fixed crash caused by failure to list a directory on the server during restore. (0.11rc4 [2158])
  • Fixed crash caused by attempted access to a directory that doesn't exist on the server, and return a protocol error message. (0.11rc4 [2179])
  • Use stat instead of lstat when checking the filesystem that's holding an entity, in case it's a symbolic link to a different filesystem. (0.11rc4 [2181])
  • Increased buffer size for extended attributes, and improved error handling. (0.11rc4 [2194])
  • Replaced some manual memory management with std::auto_ptr to reduce risk of memory allocation errors. (0.11rc4 [2228])
  • Fixed failure to read entire protocol object in some bbackupquery commands, resulting in a crash after an error occurs during a bbackupquery session. (0.11rc4 [2254] [2260])
  • Fixed directory record (internal state menagement) conflicts caused by including the same directory twice. (0.11rc4 [2316])
  • Fixed crash when freebsd (maybe *bsd) returns ECONNRESET on close(), which presumably means that the socket is already closed, causing bbackupd test to fail. Thanks to Victor Meirans for reporting the problem. (0.11rc4 [2451])
  • Added debugging for child processes terminating normally or abnormally, as Brendon Baumgartner reported symptoms that sound like a bbstored child process crashing, and nothing in the logs indicates what happened to it. (0.11rc6 [2592])

Control

  • Added bbackupctl commands for improved scripting of syncs.
  • Added bbackupd option to set the length of time before unused locations are deleted.
  • Improved command-line option handling.
  • Added command-line help (-h option) to bbackupd and bbstored.
  • Added a new -F option for daemons, which runs in the foreground but still accepts multiple connections, which is what SINGLEPROCESS used to do.
  • Added support for multiple Box Backup (bbackupd) services on Windows, with different service names and named pipe names, to implement redundancy.
  • Added configuration of the server port that the client will connect to (bbackupd and bbackupquery). (0.11rc4 [2116])
  • Fixed command-line parsing (getopt() reset) for Solaris, Windows and maybe other platforms. (0.11rc4 [1975] [2131] [2388])
  • Added -W<level> option to set log level explicitly by name. (0.11rc4 [2177])
  • Fixed Debian initscripts. (0.11rc4 [2191] [2192])
  • Fixed SuSE initscripts. (0.11rc4 [2193])
  • Added Mac OS X launchd files for bbackupd and bbstored. (0.11rc4 [2195])
  • Allowed housekeeping to stop during a run, between accounts, when the daemon is requested to terminate or to reload its configuration. (0.11rc4 [2281])
  • Added command to undelete a file, to complete the set of commands implemented by the bbstored server. (0.11rc4 [2282] [2283])
  • Removed the command socket thread on Windows. (0.11rc4 [2318])
  • Changed default location of configuration files from /etc/box to /etc/boxbackup. (0.11rc4 [2498])

Usability

  • Fixed entering of international characters into bbackupquery on Windows (instructions) and Unixes with editline.

Output

  • Added new logging infrastructure, allows more control over whether messages are sent to the console or system logs, and at what level of detail.
  • Added option to send Extended Logs to a file instead of to system logs.
  • Added option to log all file access, for debugging when a file is not backed up or causes the backup to fail mysteriously. (improved in 0.11rc4 by [2143])
  • Improved error messages to identify the causes of some errors which were difficult to track down before.
  • Added new backup-start and backup-finish events to the NotifyScript, which can be used to implement more advanced functionality such as snapshotting databases. (fixed in 0.11rc4 by [2148])
  • Added a new sample NotifySysAdmin script for Windows, written by James O'Gorman in VBscript.
  • Added object cache debugging traces to bbstored. (0.11rc4 [2079])
  • Added support for microsecond timestamps and PID logging on console log for daemons. (0.11rc4 [2081])
  • Switched to using logging framework for streaming messages. (0.11rc4 [2084])
  • Fixed double logging of protocol commands on the server side. (0.11rc4 [2084])
  • Changed log level for protocol errors to WARNING. (0.11rc4 [2084])
  • Improved error messages when loading SSL key files fails. (0.11rc4 [2090])
  • Added support for logging just to syslog (not console) at a given priority. (0.11rc4 [2102])
  • Changed logging of daemon banner to syslog only, not to console, as this is probably what users expect (and they have no way to control verbosity on the console this early). (0.11rc4 [2103])
  • Removed error message for ERR_NO_DATA while writing to control socket on Windows, as it just means that the Pope is being closed. (0.11rc4 [2105])
  • Added an option to disable all logging on Windows. (0.11rc4 [2317])
  • Reduced log level of message from server child from WARNING to NOTICE, as it's just the IP and port of the remote side of the connection. (0.11rc4 [2114])
  • Improved error logging with macros that consistently output strerror(errno) and errno, replacing almost all use of strerror() in the main code. 0.11rc4 [2115])
  • Added logging of a more detailed error message before throwing an exception for some more system call failures. (0.11rc4 [2115])
  • Replaced all remaining use of TRACEx() macros with logging framework. (0.11rc4 [2119] [2122])
  • Made usage output (from bbstoreaccounts info and bbackupquery usage) consistent and easier to read, with blocks, B/kB/MB/GB, % and an ASCII bar graph. (0.11rc4 [2121])
  • Added machine-readable output mode to bbstoreaccounts info and bbackupquery usage. (0.11rc4 [2222] [2353])
  • Fixed Windows Event Logging of international characters. (0.11rc4 [1942] [1944] [2133] [2134])
  • Fixed console output of international characters on Windows. (0.11rc4 [2231])
  • Added bbreporter.py log checker script, thanks to cbkm (0.11rc4 [2136] [2137] [2138] [2147] [2189])
  • Added an error message giving the file name when an expected raidfile does not exist, to help server operators to figure out what's wrong. (0.11rc4 [2146])
  • Added backtrace on exception in release builds, with C++ name demangling where supported. (0.11rc4 [2169] [2178] [2187] [2221])
  • Added logging of removal of directories by housekeeping. (0.11rc4 [2176])
  • Added logging of file deletions by name. (0.11rc4 [2181])
  • Fixed notification state for backup-error to reset after a successful backup, thanks to Wolfgang Trexler. (0.11rc4 [2197])
  • Added tracking of the last backup status notification sent (excluding backup-start and backup-finish) and send a notification whenever it

changes. (0.11rc4 [2302])

  • Added an option to override that tracking and always send all notifications. (0.11rc4 [2302])
  • Removed warnings about ignoring sockets and FIFOs during backup, thanks to Tollef Fog Heen (0.11rc4 [2198])
  • Added logging of any error code returned by NotifyScript. (0.11rc4 [2213])
  • Added logging of the file name and error when opening or writing a file or getting file attributes fails. (0.11rc4 [2217] [2297])
  • Added notification during compare when directory modification time is later than last sync time as a possible cause of compare failure, just as we do with files. (0.11rc4 [2261])
  • Added support for logging to a file, with independent control of detail level. (0.11rc4 [2302])
  • Added ability to specify a named log facility for syslog logging, requested by Kenny Millington. (0.11rc4 [2466])
  • Fixed use of encrypted filename in deleted file message, thanks to Kenny Millington for reporting. (0.11rc4 [2481])
  • Removed logging of stat() errors on excluded directories. (0.11rc4 [2528])
  • Added location of config file as an additional parameter to the SyncAllowScript? and the NotifyScript, thanks to Achim J. Latz. (0.11rc6 [2593])

Performance

  • Fixed O(n2) algorithm in bbstoreaccounts check fix when inserting lost objects into a directory, which would become very slow with large directories (e.g. 100,000 files unattached) due to repeated reading and writing of the directory. (0.11rc4 [2159] [2160])

Security

  • Use SecureZeroMemory rather than memset() to wipe key material on Windows. (0.11rc4 [2272])
  • Use Windows Crypto API to seed the random number generator, and remove warning that it hasn't been seeded on Windows. (0.11rc4 [2343])

Testing

  • Ported unit tests for Windows.
  • Added full unit tests for keep-alives and diff timer on most platforms.
  • Fixed compare of timestamps on filesystems which cannot set them more accurately than 1 second.
  • Fixed raidfile tests on FreeBSD 7. (0.11rc4 [2059])
  • Fixed test failures reported by Alex Harper on MacOS X. (0.11rc4 [2083])
  • Added support for verbosity control in tests. (0.11rc4 [2082])
  • Added help text on test failures, thanks to Stuart Hickinbottom. (0.11rc4 [2086] [2087])
  • Fixed deletion of bbstore PID file after killing the daemon on Windows, as the daemon can't clean up after itself. (0.11rc4 [2096])
  • Changed port used by tests from 2201 (default) to 22011, to reduce the chances of conflicting with a running bbstored or other process. (0.11rc4 [2116])
  • Improved debugging when failing to create the large file for diff speed tests. (0.11rc4 [1946] [2135])
  • Improved console and system log readability by setting program name in tests to module name, e.g. test/bbackupd. (0.11rc4 [2166])
  • Added option to show PID in logs (-P) in tests. (0.11rc4 [2166])
  • Added test that reading a nonexistent directory on the server doesn't crash server or client. (0.11rc4 [2184])
  • Added test that bbackupd` does continue backup run and delete files when storage limit is exceeded. (0.11rc4 [2184])
  • Silenced some expected warnings in testbbackupd. (0.11rc4 [2184])
  • Removed apparently pointless listing files on server at the end of testbbackupd. (0.11rc4 [2184])
  • Fixed test for process liveness on Windows XP. (0.11rc4 [2205])
  • Added names to timers to help with debugging. (0.11rc4 [2215])
  • Added test that bbackupd responds correctly to a dropped connection (0.11rc4 [2237])
  • Added reasons for waiting to be displayed during bbackupd and backupstorepatch tests, to help with interpreting test output. (0.11rc4 [2496])

Compilation and Portability

  • Improve Makefiles by reducing verbosity during build, so that any errors and warnings can be seen more easily.
  • Improved build targets, thanks to James O'Gorman.
  • Use const char pointers to static strings, to silence warnings on various platforms. Thanks to Reinhard Tartler and the Debian project for their buildds. (0.11rc4 [2050] [2051] [2058])
  • Fix compile problems on Solaris with Sun CC. (0.11rc4 [2052] [2053])
  • Detect whether struct DIR has d_fd or dd_fd member and define the dirfd() macro accordingly. (0.11rc4 [2054])
  • Made autoconf check for zlib.h and fail if we don't have it. (0.11rc4 [1988] [2128])
  • Added support for PCRE 7.x. (0.11rc4 [1996] [2129])
  • Added missing cleanups on Windows platform, thanks to Charles Lecklider. (0.11rc4 [1939] [2132])
  • Added missing #includes, thanks to the T2 Project [2149], Martin [2190], Alex Howansky [2197] (0.11rc4)
  • Added check for cxxabi.h to enable C++ name demangling for stack traces on libstdc++. (0.11rc4 [2167])
  • Fixed strerror() compile error on RedHat? 9, thanks to Alex Howansky. (0.11rc4 [2196])
  • Replaced our custom thread timers on Windows with TimerQueue? API. (0.11rc4 [2206])
  • Log an error when rename over RaidFile? fails on Windows. (0.11rc4 [2210])
  • Changed make clean to remove built binaries and libraries, for consistency. (0.11rc4 [2241])
  • Changed module dependency rebuild test to use make -q, to rebuild more quietly. (0.11rc4 [2241])
  • Added proper parcel dependencies for faster rebuild with GNU make. (0.11rc4 [2241])
  • Use cp -p to update parcel contents to avoid rebuilding parcel when not necessary. (0.11rc4 [2241])
  • Use getpeerucred() to identify connecting socket clients on Solaris, and silence warnings that the peer cannot be identified on this platform. (0.11rc4 [2348])
  • Fixed compile on gcc 4.3 and 4.4, thanks to Reinhard Tartler and the Debian project [2493] and Martin [2506] [2507]. (0.11rc4)

Documentation

  • Updated built-in documentation (program manuals, installation guide and administrator's guide).
  • Improved Windows compilation and cross-compile documentation, thanks to Achim. (0.11rc4 [2101] [2486])
  • Updated man sections, corrected typos, thanks to James O'Gorman (0.11rc4 [2112])
  • Added a favicon to the website :-) [2265]
  • Added documentation for bbackupd, bbstored and configuration files, thanks to James O'Gorman. (0.11rc4 [2305])

Packaging

  • Changed default location of bbackupd.conf on Windows to the same directory as bbackupd.exe.
  • On Unix platforms, changed the default location for configuration files from /etc/box to /etc/boxbackup, and made it movable with --sysconfdir=/usr/etc to place them in /usr/etc/boxbackup. Thanks to Eric Cronin for testing. (0.11rc4 [2061] [2062] [2063])
  • On Unix platforms, changed the default location for temporary state files to /var/run. (0.11rc4 [2063] [2070] [2077])
  • On Unix platforms, allowed configuration of the directory prefix under which binaries will be installed. (0.11rc4 [2063])
  • On Unix platforms, moved all commands from bin to sbin directories. (0.11rc4 [2094] [2095])
  • On Unix platforms, made the parcel install scripts use $DESTDIR from the environment, to help porters and packagers. (0.11rc4 [2064])
  • Added Windows Installer (written with InstallJammer?) to version control, thanks to Pete Jalajas. (0.11rc4 [2274] [2330] [2331] [2332] [2333] [2334] [2335] [2340] [2344])
  • Create destination directory before installing into it, as requested by David Kaufman for Gentoo. (0.11rc4 [2357])
  • Include DocBook? XML sources in distributions, as requested by Reinhard Tartler. (0.11rc4 [2374])

APIs

Utilities

  • Added the beginnings of a web management interface for bbstored servers. (0.11rc4 [2375])

Source Code

The source code for all platforms can be downloaded here, although for Windows Native builds please read the Windows installation notes.

Upgrading

It was previously recommended to upgrade all clients and servers to 0.10 first. This allows a smooth and staged transition to 0.11, as previous versions cannot communicate with a 0.10 or later server due to protocol changes. However, 0.10 no longer builds on recent distributions. Therefore, we now recommend that if you are running a version older than 0.10, that you follow the 0.10 upgrade instructions (upgrade each server and all of its clients simultaneously), but that you use the latest available version of Box Backup instead of 0.10.

Remove any Windows services before upgrading (with bbackupd -r) and reinstall after upgrading (with bbackupd -i).

New logging options (LogAllFileAccess, ExtendedLogging? and command-line options) are useful but not required. To use LogAllFileAccess you need to start the daemon with the -V option as well.

The protocol is the same, so it shouldn't require the store server to be updated at the same time as the clients, or even fix the order of updating them. We would recommend that you upgrade the store server first, and then the clients one at a time.

You might want to either regenerate their configs, or look at the difference between a fresh config and their current one, to enable some useful options like KeepAliveTime (which is enabled by default in new installations) and to think about enabling StoreObjectInfoFile.

Most syslog messages have changed their format, so any scripts which parse syslog will have to be updated.

Anyone using SINGLEPROCESS in anger (e.g. to run bbstored as a managed service under daemontools or similar) should shoot themselves quietly in the foot and prepare to change it to -F after the upgrade. (this was never a documented option, and now behaves a little differently).

If you have problems with large files (over 2GB compressed) not being backed up, restored or compared, you will need to delete them from the store server to fix them properly. You can do this before or after upgrading, but if they are uploaded again by the 0.10 client then the problem will not be solved.

You will probably get this error message every backup run:

BACKUP PROBLEM on host your.client.host (unknown)

To fix this, edit the NotifyScript (usually /etc/box/bbackupd/NotifyScript.sh), find the line that starts with the word else, and add these three lines immediately before it:

elif [ "$1" = backup-start -o "$1" = backup-finish -o "$1" = backup-ok ]; then
        # do nothing by default
        true

Known Issues

#4
Port Box Backup to AIX
#6
Contribute code: SMTP client, HTTP server, Database drivers, Web app framework
#7
Improve restore speed on local repositories
#8
Improve handling of directories with many files
#13
Fix file locking on Windows
#16
Restore deleted directories may fail
#17
List files using wildcards
#20
bbackupctl reload reports prior settings
#45
File diff performance patch (reduced disk IO and wall time
#46
bbackupd only ever saves reverse diffs, corrupted files on store may be unrecoverable
#47
Account numbers greater than 2^31 (0x7fffffff) do not work correctly
#48
Locations that don't exist on first run are never tried again
#51
No way to force bbackupd to re-upload files under Windows
#52
Unable to control the maintenance of old vs. deleted files
#53
Comparing root directory locations does not work under Windows
#54
Locations not found on disk (e.g. unmounted filesystems) cannot be protected
#55
Should store and preserve directory timestamps
#56
Windows: User can polute restore directory by adding a trailing backslash to the restore destination
#57
Create boxbackupresume and other files in DataDirectory
#58
bbackupquery connection timeout results in error message, should be more graceful
#62
Backups of deleted files may be removed very quickly by housekeeping
#63
Support hard links in directories
#65
Some file attributes under Windows are not backed up
#66
Windows ACL support
#68
More details when ReadError occurs
#69
CRTL+C closes bbackupquery console window under Windows
#70
Non-ascii character cause error for notifyscript path
#74
Reconnect bbackupquery automatically, or at least have a "connect" commadn to do so from inside
#77
Min verbosity switch broken for bbackupquery
#78
Error level for "bbackupquery.exe -u"

Credits

  • Martin Ebourne reviewed code from Windows port for merge;
  • Pierre-Henri Lavigne created and started maintaining fink packages for MacOS X;
  • Stuart Hickinbottom, Mark, Nestor Arocha Rodriguez and James Stark contributed code;
  • Pete Jalajas contributed the Windows installer
  • Charles Lecklider reviewed code from Windows port for merge;
  • Kenny Millington provided the bbreporter.py Python script;
  • Gary Niemcewicz tested and fixed support for Microsoft Visual Studio as a compiler;
  • James O'Gorman hosts our website, wrote a lot of documentation, bought us a real SSL certificate and fixed autoconf problems;
  • Ben Summers contributed ideas and reviewed code from Windows port for merge;
  • Reinhard Tartler created and started maintaining Debian packages;
  • Per Thomsen wrote the Docbook documentation;
  • Chris Wilson implemented most of the new features, tested Solaris, FreeBSD and MacOS X and helped out on the mailing list;
  • Testing and bug reports (in alphabetical order)
    • Tom Albers
    • Tobias Balle-Petersen
    • Damien B
    • Dave Bamford
    • Torsten Boob
    • Matt Brown (who also lent us a MacOS X laptop for testing)
    • Eric Cronin
    • Johann Glaser
    • Alex Harper
    • Guno Heitman
    • Stuart Hickinbottom
    • Richard Hurt
    • Pete Jalajas
    • David Kaufman
    • kiru
    • Paul MacKenzie?
    • Mitja Muzenic
    • Tuukka Pasanen
    • Phil Shelley
  • Please let us know if we've missed you out!
Last modified 7 years ago Last modified on Feb 7, 2010, 10:10:02 PM