summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupDaemon.cpp
Commit message (Collapse)AuthorAge
* Move reusable code out of bin directories.Chris Wilson2015-12-13
| | | | | Allows tests to depend on lib/bbackupd instead of bin/bbackupd, which was always a hack, and really doesn't work with CMake.
* Fix error message corruption in BackupDaemon.Chris Wilson2015-08-06
| | | | Was due to accessing the exception's string after it had gone out of scope.
* We do still need to #include autogen_ClientException.hChris Wilson2015-07-31
|
* Move InvalidConfiguration exception to CommonException.Chris Wilson2015-07-31
| | | | Allows it to be used by S3Store, or in fact anything that uses Configuration.
* Add AccountNumber to list of config keys checked at runtime.Chris Wilson2015-07-31
| | | | S3Stores don't have account numbers.
* Refactor to allow non-bbstored store configurations.Chris Wilson2015-06-28
| | | | | | Make some keys not required in BackupDaemonConfigVerify, and verify them afterwards instead, when the rest of the configuration file has been read (and in future, the store type would be known.)
* Fix missing snapshot path on subsequent locations.Chris Wilson2015-02-01
| | | | | | | | | Thanks to Kai Liebenau for finding and fixing this bug. Also use VssFreeSnapshotProperties instead of rolling our own, also thanks to Kai. This has not been compile tested on Windows.
* Add rudimentary support for Windows mutexes.Chris Wilson2015-01-02
| | | | Thanks to Achim for the patch! https://www.boxbackup.org/ticket/67
* Improve internal debug loggingChris Wilson2015-01-02
|
* Add missing timeouts on command socket writes.Chris Wilson2014-12-28
|
* Fix more compile errors on MinGWChris Wilson2014-12-26
|
* Replace sprintf() with snprintf(), fixes compile warnings on OpenBSD.Chris Wilson2014-12-22
| | | | | And compile errors on recent MinGW.
* Log start time of next backup when waiting with millisecond precision.Chris Wilson2014-12-21
| | | | | | | | Helps to debug tests that depend on subsecond timing. Log time to wait on command socket in fractional seconds instead of raw box_time_t.
* Don't stop waiitng until the deadline has actually expired.Chris Wilson2014-12-12
|
* Fix an unnecessary pass through backup loop when time for next backup arrives.Chris Wilson2014-12-10
|
* Whitespace and comment formatting fixes.Chris Wilson2014-12-10
|
* Allow users to configure the delay before retry on backup errors.Chris Wilson2014-12-03
|
* Fix compile errors introduced by previous commit.Chris Wilson2014-11-23
| | | | | | Add a LogFileOverwrite option to allow configuring whether LogFile is overwritten or appended to. Overwriting happens at startup, and the start of each backup in bbackupd (via ResetLogFile()).
* Add option to truncate log file at start of every backup.Chris Wilson2014-11-16
| | | | Prevents backup log files from becoming too large.
* Allow changing exclude lists when reconfiguring BackupDaemon.Chris Wilson2014-09-04
| | | | | Some tests need to do this. I don't think it happens in normal use, because the daemon's response to HUP takes a different path, I think.
* Allow access to BackupDaemon's BackupClientContext for tests.Chris Wilson2014-09-04
| | | | | | | | | | | | | | | | | | The std::auto_ptr is now returned unclosed. If the caller of RunSyncNow() does nothing with the return value, then it will be released, closing the connection. However the caller can save the std::auto_ptr locally and poke around in it if necessary. This interface is designed for tests only! Merged back changes from the test refactor branch to reduce diffs. Fix failure to record client store marker, after BackupClientContext refactor. This caused the daemon not to abort safely if the CSM changed under our feet, meaning that our cached data is invalid. Fix for earlier patch to allow tests to access the BackupClientContext after backup completes, because a new CSM wasn't generated in time for bbackupd to record it, because the connection wasn't closed yet.
* Backport Timers::Cleanup that's safe to use in test cleanup.Chris Wilson2014-09-04
| | | | | | | | | | Allows it not to throw an exception if timers weren't initialised when cleanup was requested. Normally we want an exception thrown, but not while we're cleaning up a test that might have failed with timers uninitialised. More timers fixes after cleanup no-exception option. Merged back changes from the test refactor branch to reduce diffs.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Fix timing issue with bbackupd test for recovery after error.Chris Wilson2014-08-24
| | | | | | | For some reason the timing changed and the test was no longer waiting for the same length of time as bbackupd, causing it to fail. Merged back changes from the test refactor branch to reduce diffs.
* Improve StoreObjectInfoFile messages.Chris Wilson2014-08-15
| | | | Avoid reporting an error if the file is missing or empty.
* Fix crash when there's no background task to execute.Chris Wilson2014-08-15
|
* Use std::auto_ptrs instead of bare pointers for exclude lists.Chris Wilson2014-08-15
| | | | | Allows us to remove code to handle cleanups after exceptions and on Location destruction.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp
* 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
|
* Rewrap some lines to reduce unnecessary wrapping.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.
* Fix BackgroundTask timer being destroyed after timer system cleaned up.Chris Wilson2014-04-17
| | | | Caused an assertion failure and crash.
* Initialise sync flags in WaitOnCommandSocket.Chris Wilson2014-04-12
| | | | Otherwise all callers need to initialise them, or get false positives.
* 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.
* Fix unnecessarily verbose log message about SyncAllowScript.Chris Wilson2014-02-10
|
* Pass std::auto_ptr objects to Protocol for upload.Chris Wilson2013-08-22
| | | | | | | | | | | Passing raw pointers is bad C++ style, and dangerous, because Protocol will free the passed-in pointers after uploading them, so we should not keep using them. Reduce code duplication in BackupClientDirectoryRecord patch/normal upload. Return a std::auto_ptr<BackupStoreFileEncodeStream> instead of a std::auto_ptr<IOStream> from BackupStoreFile::EncodeFile* functions.
* Fix compile error on MSVC due to attempt to convert a std::list::iteratorChris Wilson2012-07-20
| | | | | to a std::vector::iterator.
* Allow BackupDaemon user to reset state for testing.Chris Wilson2012-04-28
|
* Use C++ string instead of converting to C string and back.Chris Wilson2012-04-15
|
* Really fix compile error this time.Chris Wilson2012-03-16
|
* Add support for SyncAllowScript to set maximum upload bandwidth dynamically.Chris Wilson2012-03-10
|
* Add experimental "TCP Nice" mode, disabled by default.Chris Wilson2012-02-12
|
* Fix compile error, thanks to James and Buildbot :)Chris Wilson2012-02-02
|
* If a location was not present (on disk) when bbackupd started, don't forgetChris Wilson2012-02-02
| | | | | about it but start backing it up if it appears subsequently.
* Delete any incomplete ID map database that we find, so that we can startChris Wilson2011-10-25
| | | | | | afresh with a new one, should solve most corrupt database errors such as the ones reported by Achim.