summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Remove ServerException.h and the exception code aliases that it defines.Chris Wilson2014-08-15
| | | | We don't really need these, so clean up by removing them.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp
* Add message to ClientMarkerNotAsExpected exception.Chris Wilson2014-08-15
| | | | To help with debugging.
* Trailing whitespace fixes.Chris Wilson2014-08-15
| | | | | | Conflicts: bin/bbackupd/BackupClientDirectoryRecord.cpp
* Whitespace fixes.Chris Wilson2014-04-29
|
* Add a ToString method to IOStream and some subclasses.Chris Wilson2014-04-29
| | | | | Useful to help debug problems such as invalid file headers when the source of the stream might not be too obvious.
* Fix error when modifying a directory with missing entry in parent.Chris Wilson2014-04-29
| | | | This is hopefully the cause of the segfaults reported by Brendon Baumgartner.
* Add a comment explaining why we can't move detached dirs back into place.Chris Wilson2014-04-29
|
* Fix crash uploading empty attributes when directory disappears during scan.Chris Wilson2014-04-26
| | | | | Thanks to Brendon Baumgartner for the report on the mailing list, and for helping to diagnose the problem.
* Don't just eat the exception, rethrow it after logging details.Chris Wilson2014-04-25
|
* Update configure scripts to latest version.Chris Wilson2014-04-18
| | | | | | Was having problems compiling on MinGW x86_64, with the scripts failing to properly detect the platform and recommending upgrading them. It may not have fixed the problem, but doesn't seem like a bad idea.
* Add debugging code for when SendStream() fails during client command.Chris Wilson2014-04-18
| | | | | | | | | Will hopefully help to debug Brendon Baumgartner's issue with backups not completing and repeating over and over, due to this error: > Apr 18 11:14:09 hosting bbackupd[18990]: WARNING: Exception thrown: > ServerException(Protocol_BadUsage) (Sending a stream with a definite > size of zero is not allowed in the protocol) at Protocol.cpp:703
* Restore correct initialisation of mCurrentSyncStartTime.Chris Wilson2014-04-18
| | | | Was accidentally removed by the refactoring of the backup idle loop.
* Eliminate duplicate call to GetCurrentBoxTime().Chris Wilson2014-04-18
|
* Rewrap long lines (whitespace only).Chris Wilson2014-04-18
|
* Stop the CommandSocketPollTimer at end of each backup.Chris Wilson2014-04-18
| | | | | Otherwise it interrupts us needlessly while we're sleeping waiting for the next backup.
* Simplify the sync start logic some more, log when force-sync overrides script.Chris Wilson2014-04-18
|
* Make bbackupctl status display the human-readable daemon state name.Chris Wilson2014-04-18
|
* Call RunBackgroundTask while scanning directories as well.Chris Wilson2014-04-17
| | | | | Enables bbackupd to be stopped, reloaded or status queried while scanning a large directory.
* Rewrap some lines to reduce unnecessary wrapping.Chris Wilson2014-04-17
|
* Fix warnings about member variables being initialised in a different order.Chris Wilson2014-04-17
|
* Don't consider inode database errors enough reason to run the next backupChris Wilson2014-04-17
| | | | immediately after the end of the current one.
* Rewrite backup idle/poll loop for clarity.Chris Wilson2014-04-17
| | | | | | | | Add helpful debugging messages about why the decision was taken to sleep or start a backup, and how long the system will wait until the next backup. Flatten the code to avoid the double loop.
* More updates to Win32 build instructions.Chris Wilson2014-04-17
|
* Fix BackgroundTask timer being destroyed after timer system cleaned up.Chris Wilson2014-04-17
| | | | Caused an assertion failure and crash.
* Fix compilation on Debian 7 (Wheezy) by including bsd/unistd.h.Chris Wilson2014-04-12
| | | | | | | If libedit is installed then -ledit will be detected and added to the link line, which makes the test for getpeereid pass. Then SocketStream.cpp tries to use it, but that won't work unless we include bsd/unistd.h where the prototype is declared.
* Initialise sync flags in WaitOnCommandSocket.Chris Wilson2014-04-12
| | | | Otherwise all callers need to initialise them, or get false positives.
* Add missing BackgroundTask headerChris Wilson2014-04-12
|
* Poll command socket regularly during file uploads.Chris Wilson2014-04-09
| | | | | Makes the daemon responsive to polling and commands, even during a file upload operation.
* Use shared code for logging options in bbackupctl and bbackupquery.Chris Wilson2014-04-09
| | | | Enables all standard logging options and reduces code duplication.
* Refactor logging option processing out of Daemon class.Chris Wilson2014-04-09
| | | | Allows command-line tools to reuse the same option processing.
* Improve error message when fatal exception aborts a command-line tool.Chris Wilson2014-04-09
| | | | | Report the exception message details if it's a BoxException, so it's more user friendly.
* Improve error messages when FileHandleGuard fails to open a file.Chris Wilson2014-04-09
| | | | | Use the standard macros to report file error messages in the standard format, including a filename and message in the exception.
* Add a status command to bbackupctl.Chris Wilson2014-04-09
| | | | | Allows polling the daemon to see if it's running, without telling it to actually do anything.
* Remove NoObject reply, and adapt BackupQueries accordingly.Chris Wilson2014-04-09
|
* Add a capturing logger.Chris Wilson2014-04-09
| | | | Useful in testing whether code logs the expected messages or not.
* Add a guard that can temporarily add a Logger to the logging system.Chris Wilson2014-04-09
| | | | This is very useful with the forthcoming Capture logger.
* Remove the global logging level.Chris Wilson2014-04-09
| | | | | It's incompatible with having a logger that logs everything, regardless of the global log level.
* Directories' entries in parent directory should track current size.Chris Wilson2014-04-09
| | | | | | | | | | | | | | | | | | | | | | When entries are added to a directory by a command (BackupStoreContext), and when entries are removed from a directory (by housekeeping), update the parent directory's entry for us if our size has changed. Make BackupStoreCheck check for, report and fix errors when directory entries are directories and the size is wrong (as well as files). Conflicts: test/backupstore/testbackupstore.cpp Fix directories loaded without size being set, leading to warnings later. We can't check that the old size in the parent entry matched the old real size of the directory, unless we set the old real size in the directory. And we don't need to pass the old directory size to HousekeepStoreAccount::DeleteFile, because we can get it from the directory itself.
* Add some test helper _OR macros to execute commands when conditions fail.Chris Wilson2014-04-09
| | | | | | | | This is useful to return from a test if an assertion/check fails, instead of throwing an exception. Also add logging of the actual error code received (with name) to TEST_COMMAND_RETURNS_ERROR(_OR).
* Replace magic numbers with named constants for readability.Chris Wilson2014-04-09
|
* Add a Reopen method to BackupProtocolLocal2 for convenience.Chris Wilson2014-04-09
|
* Add a utility to check account for errors, expecting that there are some.Chris Wilson2014-04-09
| | | | Returns the number of errors found and fixed.
* Fix a (currently cosmetic) bug in BackupProtocolLocal2 account ID.Chris Wilson2014-04-09
| | | | It was hardcoded to 0x01234567 due to a copy and paste error.
* Don't require passing the object ID into BackupStoreContext::SaveDirectory.Chris Wilson2014-04-09
| | | | | | | Passing the wrong object ID would just result in an assertion being thrown (in debug builds) or silently doing the wrong thing (in release builds). I can't see any useful use for this extra parameter, since we can get the container ID from the directory anyway.
* Add a static GetMessage() to BackupProtocolError.Chris Wilson2014-04-09
| | | | | | | | | Allows retrieving the error message for a given code, when we no longer have the protocol object handy. Conflicts: lib/server/makeprotocol.pl.in
* Support microsecond timestamps for files on Linux.Chris Wilson2014-04-09
|
* Don't pass AttributesModTime as the hash of the new directory's attributes.Chris Wilson2014-04-09
| | | | | An incorrect comment led me to believe that this parameter was the new directory's AttributesModTime, but actually it was its hash.
* Fix an exception checking refcounts in housekeeping.Chris Wilson2014-03-02
| | | | | | | | | If the old refcount database was shorter than the new one, then we could end up trying to access a nonexistent refcount, triggering an exception, which prevented all comparison of the old and new refcount databases. Also, from now on, a mismatch between old and new refcounts is treated as a housekeeping error, which is detectable in tests.
* Whitespace, comments and log messages cleanups.Chris Wilson2014-03-02
|