summaryrefslogtreecommitdiff
path: root/bin/bbackupd
Commit message (Collapse)AuthorAge
* 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.
* Whitespace fixesChris Wilson2014-09-18
|
* Improve exception message if a Daemon is used without being configured firstChris Wilson2014-09-18
|
* Add the new object ID to NotifyFileUploaded messages.Chris Wilson2014-09-04
|
* 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.
* Add EstimatedBytesToUpload to NotifyFileUploadingPatch.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* 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.
* Changed many uses of BackupProtocolClient to BackupProtocolCallable.Chris Wilson2014-09-04
| | | | | | Makes way for more use of local protocol objects and protocol subclasses. Merged back changes from the test refactor branch to reduce diffs.
* 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 deadlock waiting for read or write on closed connection.Chris Wilson2014-08-15
| | | | | | | | If the system is suspended then it may not realise that a TCP connection has been closed, while waiting for data to arrive on it. We didn't used to apply a timeout to this read operation. Now we use the connection's default timeout on all read and write operations. Network operations that don't pass a timeout will be logged with a backtrace, so that they can be fixed.
* 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.
* Replace switch statement of protocol errors with ↵Chris Wilson2014-08-15
| | | | | | | | BackupProtocolError::GetMessage(). Conflicts: bin/bbackupd/BackupDaemon.h
* Move code for creating/renaming remote dir to match local dir into own method.Chris Wilson2014-08-15
| | | | | | | | Reduces code indentation, scope leakage, and length of a long method. Conflicts: bin/bbackupd/BackupClientDirectoryRecord.h
* Rename rFilename argument to BackupClientDirectoryRecord::UploadFile, add ↵Chris Wilson2014-08-15
| | | | | | | | | | | remote path. rFilename renamed to rLocalPath to improve code clarity. rRemotePath added to allow it to be passed to notifier methods. Conflicts: bin/bbackupd/BackupClientDirectoryRecord.cpp
* 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
* 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.
* 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
|
* 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.
* 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.
* Whitespace, comments and log messages cleanups.Chris Wilson2014-03-02
|
* Make Protocol take control of the socket object passed in.Chris Wilson2014-03-01
| | | | | | | | | | | | | We pass a std::auto_ptr<SocketStream> to every Protocol subclass when we construct it, and it takes control of this object. This reduces the risk of: * accidentally reusing the same SocketStream for multiple Protocols (it happened to me in testbackupstore); * holding onto a reference to the SocketStream; * allowing a locally-scoped SocketStream to go out of scope and be released while still being referenced by a live Protocol.
* Simplify exception handling by using std::auto_ptr.Chris Wilson2014-02-27
| | | | | Will result in the directory automatically being freed, whether or not an exception occurs.
* 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.
* Use more efficient direct reset of Timers instead of assignment.Chris Wilson2012-11-17
|
* Fix compile failure due to removal of fields from BackupClientContext.Chris Wilson2012-11-08
|
* Replace magic number 1000 with MILLI_SEC_IN_SEC when initialising timers.Chris Wilson2012-11-07
| | | | | Add the start of ExperimentalSnapshotMode support.
* Fix compile error on MSVC due to attempt to convert a std::list::iteratorChris Wilson2012-07-20
| | | | | to a std::vector::iterator.
* Throw an exception if we fail to open inode database, even in release builds.Chris Wilson2012-06-29
|
* Allow BackupDaemon user to reset state for testing.Chris Wilson2012-04-28
|
* Treat corrupt filenames (not decryptable) as not existing, so thatChris Wilson2012-04-15
| | | | | | | | | the client will flag them for deletion, and the store will eventually prune them. We could probably recover better by flagging them for immediate deletion (Remove_ASAP) but this is a better-tested code path. Remove unused variable hasMultipleHardLinks.
* Use C++ string instead of converting to C string and back.Chris Wilson2012-04-15
|