summaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAge
* 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
|
* 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.
* 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.
* Use shared code for logging options in bbackupctl and bbackupquery.Chris Wilson2014-04-09
| | | | Enables all standard logging options and reduces code duplication.
* 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
|
* 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.
* 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 crash in BackupStoreContext with no HousekeepingInterface pointer.Chris Wilson2014-02-27
| | | | | | Rename mrDaemon to mpHousekeeping and make it a pointer, so that it can officially be NULL, and don't crash if it is, and we fail to get a lock on the account.
* Fix memory leak in bbackupquery readline completion.Chris Wilson2014-02-27
|
* Fix unnecessarily verbose log message about SyncAllowScript.Chris Wilson2014-02-10
|
* Fix use of wrong config file in bbstoreaccounts.Chris Wilson2014-02-09
|
* Revert "Get backup connection stats from BackupProtocolServer."Chris Wilson2014-02-09
| | | | | | | Until the groundwork is prepared by changing Protocol's use of IOStream to SocketStream. This reverts commit 78531354753f3ce9bb3ef1d906b2aeaac5b73d58.
* Get backup connection stats from BackupProtocolServer.Chris Wilson2014-02-09
| | | | One less reason to hang onto a Stream reference, that will go away soon.
* Print a newline when user presses Ctrl+D at bbackupquery prompt.Chris Wilson2014-02-07
| | | | Makes the output look a little nicer as bbackupquery dies.
* Fix bbackupquery accepting a command starting with options.Chris Wilson2014-02-07
| | | | | | | This should never have been a valid command, but was accepted before, and silently ignored because it was treated as an empty command. This obscured bad quoting of bbackupquery command-line arguments, allowing commands to appear to work, but not do what you expected.
* Split bbstoreaccounts commands out into a separate class.Chris Wilson2014-02-07
| | | | | Allows us to call them from tests without shelling out, making debugging easier.
* Show more details when bbackupquery command parsing failsChris Wilson2014-02-07
|
* Fix getopt header confusion.Chris Wilson2013-09-30
| | | | | | | | Our copy of getopt.h in lib/win32 was beating the system getopt.h in the search path, and providing different definitions, which clang picked up. Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide whether to include this one instead of the system getopt.h.
* Clang complains that "enabled" is not initialised.Chris Wilson2013-09-28
| | | | | | | It doesn't know that we call a function that exits the program prematurely. In any case, this patch stops it from complaining.
* 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 failure to list files properly when not using a console on Win32Chris Wilson2012-11-27
| | | | | (e.g. from Cygwin command prompt).
* Log reason for housekeeping, or not (timer status).Chris Wilson2012-11-27
|
* Add a helper in BackupStoreAccounts to get a write lock on an account.Chris Wilson2012-11-18
| | | | | | Use it in two places to simplify code (not in BackupStoreContext yet, because that wants to communicate with HK process as well).
* Fix duplicate tagging of housekeeping messages.Chris Wilson2012-11-17
|
* Use more efficient direct reset of Timers instead of assignment.Chris Wilson2012-11-17
|
* Fix account deletion on Windows by removing write lock before deletingChris Wilson2012-11-17
| | | | | files.
* 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.
* Refactor bbstoreaccounts code to reduce duplication.Chris Wilson2012-10-22
| | | | | | Add a bbstoreaccounts command to change the value of the AccountEnabled flag, and print its value in "bbstoreaccounts info" output.
* 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
|
* Add housekeep command to bbstoreaccounts to run housekeeping right now.Chris Wilson2012-06-29
|