| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
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()).
|
|
|
|
| |
Prevents backup log files from becoming too large.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Makes way for more use of local protocol objects and protocol subclasses.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Hopefully all of these changes are inconsequential.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Avoid reporting an error if the file is missing or empty.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Allows us to remove code to handle cleanups after exceptions and on Location
destruction.
|
|
|
|
|
|
|
|
| |
BackupProtocolError::GetMessage().
Conflicts:
bin/bbackupd/BackupDaemon.h
|
|
|
|
|
|
|
|
| |
Reduces code indentation, scope leakage, and length of a long method.
Conflicts:
bin/bbackupd/BackupClientDirectoryRecord.h
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupDaemon.cpp
bin/bbackupd/BackupDaemon.h
test/bbackupd/testbbackupd.cpp
|
|
|
|
| |
To help with debugging.
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupClientDirectoryRecord.cpp
|
|
|
|
|
| |
Thanks to Brendon Baumgartner for the report on the mailing list, and for
helping to diagnose the problem.
|
|
|
|
| |
Was accidentally removed by the refactoring of the backup idle loop.
|
| |
|
| |
|
|
|
|
|
| |
Otherwise it interrupts us needlessly while we're sleeping waiting for
the next backup.
|
| |
|
|
|
|
|
| |
Enables bbackupd to be stopped, reloaded or status queried while scanning
a large directory.
|
| |
|
| |
|
|
|
|
| |
immediately after the end of the current one.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Caused an assertion failure and crash.
|
|
|
|
| |
Otherwise all callers need to initialise them, or get false positives.
|
|
|
|
|
| |
Makes the daemon responsive to polling and commands, even during a file
upload operation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Will result in the directory automatically being freed, whether or not an
exception occurs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Add the start of ExperimentalSnapshotMode support.
|
|
|
|
|
| |
to a std::vector::iterator.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|