summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupDaemon.cpp
Commit message (Collapse)AuthorAge
* 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.
* Use "more standard" Windows API functions FindFirstFileW and FindNextFileWChris Wilson2011-08-28
| | | | | | | | | | for directory enumeration instead of _wfindfirst and _wfindnext. Ignore reparse points when enumerating directories to avoid infinite loops. Convert VSS paths back to real paths when notifying users about backup progress.
* Fix incorrect "conversion failed" message when logging NULL VSS parameter.Chris Wilson2011-08-28
| | | | | | | Fix log level of VSS component type to TRACE instead of INFO. Fix VSS path generation for absolute paths including drive letters.
* Combine client and server protocols to make way for an offline/local protocol.Chris Wilson2011-08-27
| | | | | Rename ProtocolObject to Message.
* Log the number of files uploaded and directories created, as requested by ↵Chris Wilson2011-08-27
| | | | Achim, closes #61.
* Remove backslashes from comment, which could mean line continuation.Chris Wilson2011-04-22
|
* Remove duplicate code by caching the relative path of the backup locationChris Wilson2011-04-22
| | | | | after the volume name has been removed (VSS).
* Only initialise COM once, at bbackupd startup.Chris Wilson2011-04-14
| | | | | | | Reduce verbosity of some VSS messages. Fix erroneous errro message when VSS iterator reaches end.
* Actually try to back up from the VSS snapshot volume.Chris Wilson2011-04-09
| | | | | Clean up VSS resources at end of backup.
* Store the snapshot ID and lookup the resulting device name, building theChris Wilson2011-04-08
| | | | | Windows path to the snapshot for each location.
* Actually create a VSS snapshot.Chris Wilson2011-04-08
| | | | | Clean up writer metadata and writer status after use.
* Fix string access violation.Chris Wilson2011-04-06
|
* Add VSS: prefix to VSS log messages.Chris Wilson2011-04-06
| | | | | | | Start a snapshot set and add backup locations as volumes. Modularise IVssAsync waiting code.
* First attempt to extract some data from VSS, not useful yet.Chris Wilson2011-03-28
|