summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupDaemon.cpp
Commit message (Collapse)AuthorAge
* 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
|
* Fix abort if the local data directory doesn't exist.Chris Wilson2011-03-27
|
* Rate limit file uploads using the configured MaxUploadRate, if any.Chris Wilson2011-01-12
|
* Quick fix to stop deletion of redundant locations when Chris Wilson2010-10-07
| | | | | | DeleteRedundantLocationsAfter is set to zero, which is supposed to mean that it's disabled.
* Add support for account numbers greater than 0x7fffffff without wrapping.Chris Wilson2010-06-06
|
* Undo compile breakage due to bad paste.Chris Wilson2010-02-24
|
* Remove all references to bdb databases, use QDBM instead.Chris Wilson2010-02-22
|
* Revert the quotes part of [2588] as it breaks the unit tests.Chris Wilson2010-01-24
| | | | | Make LocalProcessStream constructor take a std::string& for C++ style.
* Add location of config file as an additional parameter to the Chris Wilson2009-11-26
| | | | | SyncAllowScript and the NotifyScript, thanks to Achim J. Latz.
* Wrap long lines for readability.Chris Wilson2009-03-19
|
* Rename NDEBUG flag to BOX_RELEASE_BUILD, as other projects use NDEBUG as Chris Wilson2008-12-30
| | | | | | well (e.g. wxWidgets) and it causes conflicts which are difficult to resolve.
* Reformat comment.Chris Wilson2008-12-27
|
* Reduce severity of some log messages about notifying systemChris Wilson2008-12-01
| | | | | administrator. It's not an error to have no NotifyScript.
* Log statistics before BackupFinish event, so that they can be usedChris Wilson2008-10-04
| | | | | in reporting in the NotifyScript.
* Remove Win32 command socket thread, as it has caused too much trouble.Chris Wilson2008-10-03
| | | | | | | | | | | Handle command socket on Win32 the same as all other platforms, removing #ifdefs from BackupDaemon. Will replace this thread with regular but not excessive command socket polling using timers in future. Change error messages when command socket comms fail to make them clearer.
* Add file logging support (LogFile and LogFileLevel config options).Chris Wilson2008-09-26
| | | | | | | | | | | | | | | | Ensure that backup-finish is always called, and add a new event, backup-ok, which is called just before backup-finish when the backup run was successful. Keep track of the last backup status notification sent (excluding backup-start and backup-finish) and send a notification whenever it changes. Add a new boolean option, NotifyAlways, to override that check and always send notifications to the NotifyScript after every backup run, for notify scripts which do their own state tracking or otherwise require notification on every event.
* Prefix event log application name with Box Backup, and remove it fromChris Wilson2008-09-14
| | | | | | | | | | all calls to SetProgramName, for better consistency on Unix. Make bbstoreaccounts and bbackupctl set their program names for logging. Don't override supplied tag with service name when BackupDaemon is run as a service.
* Handle sysadmin notifications and calculate next sync time in Chris Wilson2008-08-21
| | | | | | | BackupDaemon::RunSyncNow, moved from RunSyncNowWithExceptionHandling, which just does the exception handling. We want to replace the exception handling in Boxi, but not the other stuff.
* Pass a RunStatusProvider and a ReadLoggingStream::Logger from Chris Wilson2008-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BackupDaemon through BackupClientDirectoryRecord, BackupStoreFile and BackupStoreFileEncodeStream to ReadLoggingStream, to allow progress callbacks during file upload and cancelling upload part-way. Implement ReadLoggingStream::Logger in BackupClientDirectoryRecord::SyncParams, which thunks the notifications back to the ProgressNotifier. Add the SysadminNotifier interface from Boxi. Add NotifyIDMapsSetup() to ProgressNotifier. Change BackupClientDirectoryRecord::SyncParams to store references to the individual callback interfaces rather than BackupDaemon. Initialise all members in BackupDaemon. Add ability for BackupDaemon user to override the ProgressNotifier, LocationResolver, SysadminNotifier and RunStatusProvider that will be used during the backup. Make BackupDaemon::Location class public and provide access to the configured locations for Boxi (dangerous, they could be modified without BackupDaemon knowing it).
* Move the code that runs a backup with exception handling into its ownChris Wilson2008-08-10
| | | | | method, to allow testbbackupd to call it.
* Fix redundant logging of command socket messages.Chris Wilson2008-08-08
| | | | | Reformat for readability.
* Log the error code returned by NotifyScript.Chris Wilson2008-08-03
|
* Add missing #include, thanks to Alex Howansky.Chris Wilson2008-07-02
| | | | | | Reset notification state for backup-error after a successful backup, thanks to Wolfgang Trexler.
* Track and log file deletions by name.Chris Wilson2008-05-28
| | | | | | | | | | | | Split crypto init and file sync process into its own method, to reduce call depth and facilitate calling in process from tests. Differentiate between 3 uses of stat in BackupClientDirectoryRecord by renaming the structures. Use stat instead of lstat when checking the filesystem that's holding an entity, in case it's a symbolic link to a different filesystem.
* Fix crash when notifying sysadmin of an invalid event code.Chris Wilson2008-04-09
| | | | | Disable some debug logging.
* Undo mangling by tailorChris Wilson2008-04-04
|
* TailorizationChris Wilson2008-04-04
| | | | | | | | | | | Import of the upstream sources from Repository: http://localhost:8000/ Kind: hg Revision: 7807b7768163f1c2537756abe5416063989cebb1 Original author: tailor@rocio.int.aidworld.org Date: 2008-03-16 19:44:36+00:00
* Allow configuration of the server port that the client will connect to Chris Wilson2008-03-28
| | | | | | | | | | | | | (bbackupd and bbackupquery). Redesign ConfigurationVerify to use classes instead of structs. Use port 22011 instead of 2201 during tests, to reduce the chances of conflicting with a running bbstored or other process. Ignore autogen_* in svn:ignore everywhere instead of individual per-file ignores.
* Improve logging with macros that consistently output strerror(errno) andChris Wilson2008-03-28
| | | | | | | | | | | | | | | errno, replacing almost all use of strerror() in the main code. Log a more detailed error message before throwing an exception for some more system call failures. Make FileStream store its filename on all platforms, not just Windows. Wrap some long lines at less than 80 characters to improve readability. Fix some minor violations of coding standard (white space) and a typo in a comment.
* Use logging framework rather than printf to log when messages are sent Chris Wilson2008-03-13
| | | | | to the control client.
* Sun CC compile fix: doesn't like assigning an iterator to a const_iterator.Chris Wilson2008-01-22
|
* Use the specified service name when installing and removing the service.Chris Wilson2007-10-17
| | | | | | | | Pass the service name on the service command line, and use it for event log messages. (merges [1856])
* Add "-h" and "/?" options to display usage in Daemon.Chris Wilson2007-10-17
| | | | | | | | | Extend usage info with service commands in BackupDaemon. Disable useless -D, -V and -k options on Windows. (merges 1855])
* Use Daemon's delegated option processing instead of our own hacks.Chris Wilson2007-10-17
| | | | | | Move Windows service startup, installation and removal to BackupDaemon. (merges [1854])
* Don't initialise the command socket thread (on Win32) until theChris Wilson2007-10-17
| | | | | | | | | | | | configuration is known. Create the command socket (on Win32) with the specified pipe name in the configuration file. Commonise some code between Windows and Unix daemon startup. (merges [1831])
* Don't abort if one of the location paths doesn't exist, just print a Chris Wilson2007-10-17
| | | | | | | | | | warning and continue. Use an auto_ptr to avoid memory leaks when setting up a location fails. (merges [1828])
* Allow configuration of the time to delete redundant store locations.Chris Wilson2007-10-08
|
* Fix crash when notifyscript is called for BackupStart or BackupFinish.Chris Wilson2007-10-08
|
* Fix error message when failing to create remote directory for location.Chris Wilson2007-09-01
|
* Call the notify script whenever backup starts or finishes, but theChris Wilson2007-09-01
| | | | | | default script does nothing in this case. Requested by scott <scott@lubetech.com.au>.
* Fixed object use after delete, thanks Gary! (refs #3, merges [1673])Chris Wilson2007-07-26
|
* Fixed object store read/write, fixes #18 properly, thanks Gary!Chris Wilson2007-07-26
| | | | | (refs #3, merges [1672])