summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE.txt79
-rw-r--r--VERSION.txt4
-rw-r--r--bin/bbackupctl/bbackupctl.cpp8
-rw-r--r--bin/bbackupd/BackupClientContext.cpp171
-rw-r--r--bin/bbackupd/BackupClientContext.h20
-rw-r--r--bin/bbackupd/BackupClientDeleteList.cpp2
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp818
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.h54
-rw-r--r--bin/bbackupd/BackupClientInodeToIDMap.cpp250
-rw-r--r--bin/bbackupd/BackupClientInodeToIDMap.h26
-rw-r--r--bin/bbackupd/BackupDaemon.cpp1366
-rw-r--r--bin/bbackupd/BackupDaemon.h101
-rw-r--r--bin/bbackupd/BackupDaemonInterface.h6
-rwxr-xr-xbin/bbackupd/bbackupd-config.in4
-rw-r--r--bin/bbackupd/bbackupd.cpp5
-rw-r--r--bin/bbackupd/win32/installer.iss51
-rw-r--r--bin/bbackupquery/BackupQueries.cpp688
-rw-r--r--bin/bbackupquery/BackupQueries.h119
-rw-r--r--bin/bbackupquery/BoxBackupCompareParams.h5
-rw-r--r--bin/bbackupquery/CommandCompletion.cpp602
-rw-r--r--bin/bbackupquery/bbackupquery.cpp282
-rw-r--r--bin/bbackupquery/documentation.txt7
-rw-r--r--bin/bbstoreaccounts/bbstoreaccounts.cpp500
-rw-r--r--bin/bbstored/BBStoreDHousekeeping.cpp37
-rw-r--r--bin/bbstored/BackupStoreDaemon.cpp19
-rw-r--r--bin/bbstored/BackupStoreDaemon.h5
-rw-r--r--bin/bbstored/bbstored.cpp8
-rw-r--r--configure.ac286
-rw-r--r--contrib/mac_osx/org.boxbackup.bbackupd.plist.in5
-rw-r--r--contrib/mac_osx/org.boxbackup.bbstored.plist.in8
-rw-r--r--contrib/suse/bbstored.service26
-rw-r--r--contrib/windows/installer/bbackupd.conf.template176
-rwxr-xr-xcontrib/windows/installer/boxbackup.mpi.in2646
-rw-r--r--distribution/boxbackup/DISTRIBUTION-MANIFEST.txt7
-rw-r--r--distribution/boxbackup/VERSION.txt4
-rw-r--r--docs/api-notes/win32_build_on_cygwin_using_mingw.txt96
-rw-r--r--docs/xsl-generic/html/biblio-iso690.xsl2
-rw-r--r--infrastructure/BoxPlatform.pm.in41
-rw-r--r--infrastructure/buildenv-testmain-template.cpp140
-rw-r--r--infrastructure/m4/ax_check_ssl.m45
-rw-r--r--infrastructure/m4/boxbackup_tests.m4315
-rw-r--r--infrastructure/m4/vl_lib_readline.m453
-rwxr-xr-xinfrastructure/makebuildenv.pl.in126
-rwxr-xr-xinfrastructure/makeparcels.pl.in69
-rwxr-xr-xinfrastructure/mingw/configure.sh18
-rw-r--r--infrastructure/msvc/2010/bbackupctl.vcxproj109
-rw-r--r--infrastructure/msvc/2010/bbackupd.vcxproj139
-rw-r--r--infrastructure/msvc/2010/bbstoreaccounts.vcxproj84
-rw-r--r--infrastructure/msvc/2010/bbstored.vcxproj93
-rw-r--r--infrastructure/msvc/2010/boxbackup.sln89
-rw-r--r--infrastructure/msvc/2010/boxquery.vcxproj123
-rw-r--r--infrastructure/msvc/2010/common.vcxproj251
-rw-r--r--infrastructure/msvc/2010/libbackupclient.vcxproj94
-rw-r--r--infrastructure/msvc/2010/libbackupstore.vcxproj151
-rw-r--r--infrastructure/msvc/2010/qdbm.vcxproj81
-rw-r--r--infrastructure/msvc/2010/win32test.vcxproj108
-rw-r--r--infrastructure/msvc/fake-config.sub.pl18
-rw-r--r--infrastructure/msvc/getversion.pl23
-rw-r--r--lib/backupclient/BackupClientRestore.cpp19
-rw-r--r--lib/backupclient/BackupClientRestore.h10
-rw-r--r--lib/backupclient/BackupDaemonConfigVerify.cpp13
-rw-r--r--lib/backupstore/BackupClientFileAttributes.cpp1223
-rw-r--r--lib/backupstore/BackupClientFileAttributes.h82
-rw-r--r--lib/backupstore/BackupCommands.cpp970
-rw-r--r--lib/backupstore/BackupConstants.h21
-rw-r--r--lib/backupstore/BackupStoreAccountDatabase.cpp8
-rw-r--r--lib/backupstore/BackupStoreAccountDatabase.h8
-rw-r--r--lib/backupstore/BackupStoreAccounts.cpp56
-rw-r--r--lib/backupstore/BackupStoreAccounts.h13
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp482
-rw-r--r--lib/backupstore/BackupStoreCheck.h53
-rw-r--r--lib/backupstore/BackupStoreCheck2.cpp145
-rw-r--r--lib/backupstore/BackupStoreCheckData.cpp12
-rw-r--r--lib/backupstore/BackupStoreConfigVerify.cpp4
-rw-r--r--lib/backupstore/BackupStoreConstants.h44
-rw-r--r--lib/backupstore/BackupStoreContext.cpp1808
-rw-r--r--lib/backupstore/BackupStoreContext.h211
-rw-r--r--lib/backupstore/BackupStoreDirectory.cpp578
-rw-r--r--lib/backupstore/BackupStoreDirectory.h289
-rw-r--r--lib/backupstore/BackupStoreException.h17
-rw-r--r--lib/backupstore/BackupStoreException.txt72
-rw-r--r--lib/backupstore/BackupStoreFile.cpp1558
-rw-r--r--lib/backupstore/BackupStoreFile.h234
-rw-r--r--lib/backupstore/BackupStoreFileCmbDiff.cpp326
-rw-r--r--lib/backupstore/BackupStoreFileCmbIdx.cpp324
-rw-r--r--lib/backupstore/BackupStoreFileCombine.cpp410
-rw-r--r--lib/backupstore/BackupStoreFileCryptVar.cpp31
-rw-r--r--lib/backupstore/BackupStoreFileCryptVar.h39
-rw-r--r--lib/backupstore/BackupStoreFileDiff.cpp1047
-rw-r--r--lib/backupstore/BackupStoreFileEncodeStream.cpp717
-rw-r--r--lib/backupstore/BackupStoreFileEncodeStream.h137
-rw-r--r--lib/backupstore/BackupStoreFileRevDiff.cpp258
-rw-r--r--lib/backupstore/BackupStoreFileWire.h74
-rw-r--r--lib/backupstore/BackupStoreFilename.cpp281
-rw-r--r--lib/backupstore/BackupStoreFilename.h107
-rw-r--r--lib/backupstore/BackupStoreFilenameClear.cpp347
-rw-r--r--lib/backupstore/BackupStoreFilenameClear.h61
-rw-r--r--lib/backupstore/BackupStoreInfo.cpp385
-rw-r--r--lib/backupstore/BackupStoreInfo.h125
-rw-r--r--lib/backupstore/BackupStoreObjectMagic.h31
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.cpp38
-rw-r--r--lib/backupstore/HousekeepStoreAccount.cpp1110
-rw-r--r--lib/backupstore/HousekeepStoreAccount.h113
-rw-r--r--lib/backupstore/Makefile.extra15
-rw-r--r--lib/backupstore/RunStatusProvider.h29
-rw-r--r--lib/backupstore/backupprotocol.txt235
-rw-r--r--lib/common/Archive.h48
-rw-r--r--lib/common/BannerText.h10
-rw-r--r--lib/common/Box.h63
-rw-r--r--lib/common/BoxConfig-MSVC.h10
-rw-r--r--lib/common/BoxException.h4
-rw-r--r--lib/common/BoxPlatform.h16
-rw-r--r--lib/common/BoxPortsAndFiles.h.in12
-rw-r--r--lib/common/BoxTime.cpp52
-rw-r--r--lib/common/BoxTime.h26
-rw-r--r--lib/common/CommonException.txt13
-rw-r--r--lib/common/Database.h31
-rw-r--r--lib/common/DebugMemLeakFinder.cpp144
-rw-r--r--lib/common/ExcludeList.cpp20
-rw-r--r--lib/common/FdGetLine.cpp64
-rw-r--r--lib/common/FdGetLine.h28
-rw-r--r--lib/common/FileModificationTime.cpp12
-rw-r--r--lib/common/FileModificationTime.h6
-rw-r--r--lib/common/FileStream.cpp81
-rw-r--r--lib/common/GetLine.cpp176
-rw-r--r--lib/common/GetLine.h67
-rw-r--r--lib/common/IOStreamGetLine.cpp34
-rw-r--r--lib/common/IOStreamGetLine.h34
-rw-r--r--lib/common/Logging.cpp79
-rw-r--r--lib/common/Logging.h184
-rw-r--r--lib/common/MainHelper.h21
-rw-r--r--lib/common/MemBlockStream.cpp20
-rw-r--r--lib/common/MemBlockStream.h9
-rw-r--r--lib/common/MemLeakFinder.h13
-rw-r--r--lib/common/RateLimitingStream.cpp95
-rw-r--r--lib/common/RateLimitingStream.h71
-rw-r--r--lib/common/StreamableMemBlock.cpp4
-rw-r--r--lib/common/StreamableMemBlock.h5
-rw-r--r--lib/common/Test.cpp15
-rw-r--r--lib/common/Test.h48
-rw-r--r--lib/common/Timer.cpp227
-rw-r--r--lib/common/Timer.h15
-rw-r--r--lib/common/UnixUser.cpp8
-rw-r--r--lib/common/UnixUser.h4
-rw-r--r--lib/common/Utils.cpp147
-rw-r--r--lib/common/Utils.h5
-rw-r--r--lib/common/ZeroStream.cpp4
-rwxr-xr-xlib/common/makeexception.pl.in4
-rw-r--r--lib/crypto/CipherAES.h12
-rw-r--r--lib/crypto/CipherBlowfish.h12
-rw-r--r--lib/crypto/CipherContext.cpp130
-rw-r--r--lib/crypto/CipherContext.h24
-rw-r--r--lib/crypto/CipherDescription.h24
-rw-r--r--lib/crypto/CryptoUtils.cpp46
-rw-r--r--lib/crypto/CryptoUtils.h27
-rw-r--r--lib/raidfile/RaidFileController.cpp13
-rw-r--r--lib/raidfile/RaidFileController.h4
-rw-r--r--lib/raidfile/RaidFileRead.cpp112
-rw-r--r--lib/raidfile/RaidFileWrite.cpp189
-rw-r--r--lib/raidfile/RaidFileWrite.h19
-rw-r--r--lib/server/Daemon.cpp169
-rw-r--r--lib/server/Daemon.h12
-rw-r--r--lib/server/Message.cpp125
-rw-r--r--lib/server/Message.h69
-rw-r--r--lib/server/Protocol.cpp99
-rw-r--r--lib/server/Protocol.h52
-rw-r--r--lib/server/SSLLib.cpp13
-rw-r--r--lib/server/SSLLib.h3
-rw-r--r--lib/server/ServerException.txt4
-rw-r--r--lib/server/ServerStream.h35
-rw-r--r--lib/server/Socket.cpp25
-rw-r--r--lib/server/SocketListen.h63
-rw-r--r--lib/server/SocketStream.cpp18
-rw-r--r--lib/server/SocketStream.h11
-rw-r--r--lib/server/SocketStreamTLS.cpp37
-rw-r--r--lib/server/TLSContext.cpp20
-rw-r--r--lib/server/TcpNice.cpp235
-rw-r--r--lib/server/TcpNice.h174
-rwxr-xr-xlib/server/makeprotocol.pl.in897
-rw-r--r--lib/win32/emu.cpp183
-rw-r--r--lib/win32/emu.h79
-rw-r--r--lib/win32/emu_winver.h37
-rwxr-xr-xlib/win32/getopt_long.cpp4
-rw-r--r--modules.txt18
-rw-r--r--parcels.txt11
-rw-r--r--qdbm/COPYING504
-rw-r--r--qdbm/ChangeLog990
-rw-r--r--qdbm/LTmakefile.in318
-rw-r--r--qdbm/Makefile.in646
-rw-r--r--qdbm/NEWS43
-rw-r--r--qdbm/NO-AUTO-GEN0
-rw-r--r--qdbm/README50
-rw-r--r--qdbm/RISCmakefile140
-rw-r--r--qdbm/THANKS45
-rw-r--r--qdbm/VCmakefile248
-rw-r--r--qdbm/cabin.c3529
-rw-r--r--qdbm/cabin.h1544
-rw-r--r--qdbm/cbcodec.c1079
-rw-r--r--qdbm/cbtest.c924
-rwxr-xr-xqdbm/configure3913
-rw-r--r--qdbm/configure.in312
-rw-r--r--qdbm/crmgr.c956
-rw-r--r--qdbm/crtest.c873
-rw-r--r--qdbm/crtsv.c266
-rw-r--r--qdbm/curia.c1192
-rw-r--r--qdbm/curia.h474
-rw-r--r--qdbm/depot.c2219
-rw-r--r--qdbm/depot.h492
-rw-r--r--qdbm/dpmgr.c916
-rw-r--r--qdbm/dptest.c836
-rw-r--r--qdbm/dptsv.c261
-rw-r--r--qdbm/hovel.c568
-rw-r--r--qdbm/hovel.h278
-rw-r--r--qdbm/hvmgr.c582
-rw-r--r--qdbm/hvtest.c272
-rw-r--r--qdbm/misc/COPYING.txt504
-rw-r--r--qdbm/misc/README-win32.txt101
-rw-r--r--qdbm/misc/VCmakefile-old169
-rw-r--r--qdbm/misc/benchmark.pdfbin0 -> 52196 bytes
-rw-r--r--qdbm/misc/icon16.pngbin0 -> 339 bytes
-rw-r--r--qdbm/misc/icon20.pngbin0 -> 275 bytes
-rw-r--r--qdbm/misc/index.html202
-rw-r--r--qdbm/misc/index.ja.html209
-rw-r--r--qdbm/misc/logo.pngbin0 -> 11430 bytes
-rwxr-xr-xqdbm/misc/makevcdef48
-rw-r--r--qdbm/misc/mymemo-ja.html34
-rw-r--r--qdbm/misc/tutorial-ja.html622
-rw-r--r--qdbm/misc/win32check.bat111
-rw-r--r--qdbm/myconf.c1113
-rw-r--r--qdbm/myconf.h593
-rw-r--r--qdbm/odeum.c2090
-rw-r--r--qdbm/odeum.h590
-rw-r--r--qdbm/odidx.c890
-rw-r--r--qdbm/odmgr.c1085
-rw-r--r--qdbm/odtest.c694
-rw-r--r--qdbm/qdbm.def424
-rw-r--r--qdbm/qdbm.pc.in14
-rw-r--r--qdbm/qdbm.spec.in218
-rw-r--r--qdbm/qmttest.c300
-rw-r--r--qdbm/relic.c266
-rw-r--r--qdbm/relic.h170
-rw-r--r--qdbm/rlmgr.c465
-rw-r--r--qdbm/rltest.c241
-rw-r--r--qdbm/spex-ja.html4348
-rw-r--r--qdbm/spex.html4343
-rw-r--r--qdbm/villa.c2666
-rw-r--r--qdbm/villa.h758
-rw-r--r--qdbm/vista.c171
-rw-r--r--qdbm/vista.h138
-rw-r--r--qdbm/vlmgr.c968
-rw-r--r--qdbm/vltest.c1507
-rw-r--r--qdbm/vltsv.c261
-rwxr-xr-xruntest.pl.in4
-rw-r--r--test/backupstore/Makefile.extra4
-rw-r--r--test/backupstore/testbackupstore.cpp1118
-rw-r--r--test/backupstorefix/testbackupstorefix.cpp746
-rwxr-xr-xtest/backupstorefix/testfiles/testbackupstorefix.pl.in4
-rw-r--r--test/backupstorepatch/testbackupstorepatch.cpp48
-rw-r--r--test/basicserver/Makefile.extra11
-rw-r--r--test/basicserver/TestCommands.cpp53
-rw-r--r--test/basicserver/testbasicserver.cpp37
-rw-r--r--test/bbackupd/Makefile.extra11
-rw-r--r--test/bbackupd/testbbackupd.cpp916
-rw-r--r--test/bbackupd/testfiles/bbackupd-temploc.conf.in58
-rw-r--r--test/common/testcommon.cpp40
-rw-r--r--win32.bat24
266 files changed, 81666 insertions, 1918 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00000000..70b513ac
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,79 @@
+Box Backup, http://www.boxbackup.org/
+
+Copyright (c) 2003-2010, Ben Summers and contributors.
+All rights reserved.
+
+The license of the code was changed on 23-Jan-2010 in order to meet the
+Fedora Project's definition of Free Software, and therefore allow inclusion
+in Fedora, Red Hat Linux and CentOS. This also solves a long-standing
+incompatibility with the GNU Readline library that prevented us from
+distributing Box Backup binaries compiled against that library. You can
+review our discussions of the change in the mailing list archives at:
+http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000005.html
+
+Note that this project uses mixed licensing. Different parts of the project
+may be used and distributed under different licenses, as described below.
+The two licenses used are "Box Backup GPL" and a BSD-style license.
+
+For full details of the license, please read the included COPYING.txt file.
+
+Unless stated otherwise in the file, all files in the following directories
+fall under the "Box Backup GPL" license, described below:
+
+bin/bbackupctl
+bin/bbackupd
+bin/bbackupobjdump
+bin/bbackupquery
+bin/bbstoreaccounts
+bin/bbstored
+bin/s3simulator
+lib/backupclient
+lib/backupstore
+test/backupdiff
+test/backupstore
+test/backupstorefix
+test/backupstorepatch
+test/bbackupd
+contrib/bbadmin
+contrib/bbreporter
+contrib/cygwin
+contrib/debian
+contrib/mac_osx
+contrib/redhat
+contrib/rpm
+contrib/solaris
+contrib/suse
+contrib/windows
+distribution/boxbackup
+
+The "Box Backup GPL" license text may be found in the file
+LICENSE-GPL.txt, or online at:
+[https://www.boxbackup.org/svn/box/trunk/LICENSE-GPL.txt]
+
+Unless stated otherwise in the file, all files in the following directories
+are dual licensed under the BSD and GPL licenses. You may use and distribute
+them providing that you comply EITHER with the terms of the BSD license,
+OR the GPL license. It is not necessary to comply with both licenses,
+only one.
+
+lib/common
+lib/compress
+lib/crypto
+lib/httpserver
+lib/intercept
+lib/raidfile
+lib/server
+lib/win32
+test/basicserver
+test/common
+test/compress
+test/crypto
+test/httpserver
+test/raidfile
+test/win32
+infrastructure
+distribution
+
+The dual license text may be found in the file
+LICENSE-DUAL.txt, or online at:
+[https://www.boxbackup.org/svn/box/trunk/LICENSE-DUAL.txt] \ No newline at end of file
diff --git a/VERSION.txt b/VERSION.txt
index c29321a1..2201711b 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
USE_SVN_VERSION
+=======
+0.12
+>>>>>>> 0.12
boxbackup
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp
index 8dc8f30e..39f15baf 100644
--- a/bin/bbackupctl/bbackupctl.cpp
+++ b/bin/bbackupctl/bbackupctl.cpp
@@ -67,13 +67,7 @@ int main(int argc, const char *argv[])
Logging::SetProgramName("bbackupctl");
// Filename for configuration file?
- std::string configFilename;
-
- #ifdef WIN32
- configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
- #else
- configFilename = BOX_FILE_BBACKUPD_DEFAULT_CONFIG;
- #endif
+ std::string configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
// Quiet?
bool quiet = false;
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index 6b51b9e8..26df04be 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -25,9 +25,10 @@
#include "BackupStoreConstants.h"
#include "BackupStoreException.h"
#include "BackupDaemon.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
#include "BackupStoreFile.h"
#include "Logging.h"
+#include "TcpNice.h"
#include "MemLeakFindOn.h"
@@ -49,29 +50,30 @@ BackupClientContext::BackupClientContext
bool ExtendedLogging,
bool ExtendedLogToFile,
std::string ExtendedLogFile,
- ProgressNotifier& rProgressNotifier
+ ProgressNotifier& rProgressNotifier,
+ bool TcpNiceMode
)
- : mrResolver(rResolver),
- mrTLSContext(rTLSContext),
- mHostname(rHostname),
- mPort(Port),
- mAccountNumber(AccountNumber),
- mpSocket(0),
- mpConnection(0),
- mExtendedLogging(ExtendedLogging),
- mExtendedLogToFile(ExtendedLogToFile),
- mExtendedLogFile(ExtendedLogFile),
- mpExtendedLogFileHandle(NULL),
- mClientStoreMarker(ClientStoreMarker_NotKnown),
- mpDeleteList(0),
- mpCurrentIDMap(0),
- mpNewIDMap(0),
- mStorageLimitExceeded(false),
- mpExcludeFiles(0),
- mpExcludeDirs(0),
- mKeepAliveTimer(0, "KeepAliveTime"),
- mbIsManaged(false),
- mrProgressNotifier(rProgressNotifier)
+: mExperimentalSnapshotMode(false),
+ mrResolver(rResolver),
+ mrTLSContext(rTLSContext),
+ mHostname(rHostname),
+ mPort(Port),
+ mAccountNumber(AccountNumber),
+ mExtendedLogging(ExtendedLogging),
+ mExtendedLogToFile(ExtendedLogToFile),
+ mExtendedLogFile(ExtendedLogFile),
+ mpExtendedLogFileHandle(NULL),
+ mClientStoreMarker(ClientStoreMarker_NotKnown),
+ mpDeleteList(0),
+ mpCurrentIDMap(0),
+ mpNewIDMap(0),
+ mStorageLimitExceeded(false),
+ mpExcludeFiles(0),
+ mpExcludeDirs(0),
+ mKeepAliveTimer(0, "KeepAliveTime"),
+ mbIsManaged(false),
+ mrProgressNotifier(rProgressNotifier),
+ mTcpNiceMode(TcpNiceMode)
{
}
@@ -107,40 +109,44 @@ BackupClientContext::~BackupClientContext()
BackupProtocolClient &BackupClientContext::GetConnection()
{
// Already got it? Just return it.
- if(mpConnection != 0)
+ if(mapConnection.get())
{
- return *mpConnection;
+ return *mapConnection;
}
- // Get a socket connection
- if(mpSocket == 0)
- {
- mpSocket = new SocketStreamTLS;
- ASSERT(mpSocket != 0); // will have exceptioned if this was a problem
- }
+ // there shouldn't be a connection open
+ ASSERT(mapSocket.get() == 0);
+ // Defensive. Must close connection before releasing any old socket.
+ mapConnection.reset();
+ mapSocket.reset(new SocketStreamTLS);
try
{
// Defensive.
- if(mpConnection != 0)
- {
- delete mpConnection;
- mpConnection = 0;
- }
+ mapConnection.reset();
// Log intention
BOX_INFO("Opening connection to server '" <<
mHostname << "'...");
// Connect!
- mpSocket->Open(mrTLSContext, Socket::TypeINET,
- mHostname.c_str(), mPort);
+ ((SocketStreamTLS *)(mapSocket.get()))->Open(mrTLSContext,
+ Socket::TypeINET, mHostname, mPort);
- // And create a procotol object
- mpConnection = new BackupProtocolClient(*mpSocket);
+ if(mTcpNiceMode)
+ {
+ // Pass control of mapSocket to NiceSocketStream,
+ // which will take care of destroying it for us.
+ mapNice.reset(new NiceSocketStream(mapSocket));
+ mapConnection.reset(new BackupProtocolClient(*mapNice));
+ }
+ else
+ {
+ mapConnection.reset(new BackupProtocolClient(*mapSocket));
+ }
// Set logging option
- mpConnection->SetLogToSysLog(mExtendedLogging);
+ mapConnection->SetLogToSysLog(mExtendedLogging);
if (mExtendedLogToFile)
{
@@ -156,16 +162,17 @@ BackupProtocolClient &BackupClientContext::GetConnection()
}
else
{
- mpConnection->SetLogToFile(mpExtendedLogFileHandle);
+ mapConnection->SetLogToFile(mpExtendedLogFileHandle);
}
}
// Handshake
- mpConnection->Handshake();
+ mapConnection->Handshake();
// Check the version of the server
{
- std::auto_ptr<BackupProtocolClientVersion> serverVersion(mpConnection->QueryVersion(BACKUP_STORE_SERVER_VERSION));
+ std::auto_ptr<BackupProtocolVersion> serverVersion(
+ mapConnection->QueryVersion(BACKUP_STORE_SERVER_VERSION));
if(serverVersion->GetVersion() != BACKUP_STORE_SERVER_VERSION)
{
THROW_EXCEPTION(BackupStoreException, WrongServerVersion)
@@ -173,7 +180,8 @@ BackupProtocolClient &BackupClientContext::GetConnection()
}
// Login -- if this fails, the Protocol will exception
- std::auto_ptr<BackupProtocolClientLoginConfirmed> loginConf(mpConnection->QueryLogin(mAccountNumber, 0 /* read/write */));
+ std::auto_ptr<BackupProtocolLoginConfirmed> loginConf(
+ mapConnection->QueryLogin(mAccountNumber, 0 /* read/write */));
// Check that the client store marker is the one we expect
if(mClientStoreMarker != ClientStoreMarker_NotKnown)
@@ -183,9 +191,9 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// Not good... finish the connection, abort, etc, ignoring errors
try
{
- mpConnection->QueryFinished();
- mpSocket->Shutdown();
- mpSocket->Close();
+ mapConnection->QueryFinished();
+ mapNice.reset();
+ mapSocket.reset();
}
catch(...)
{
@@ -213,14 +221,13 @@ BackupProtocolClient &BackupClientContext::GetConnection()
catch(...)
{
// Clean up.
- delete mpConnection;
- mpConnection = 0;
- delete mpSocket;
- mpSocket = 0;
+ mapConnection.reset();
+ mapNice.reset();
+ mapSocket.reset();
throw;
}
- return *mpConnection;
+ return *mapConnection;
}
// --------------------------------------------------------------------------
@@ -233,7 +240,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// --------------------------------------------------------------------------
void BackupClientContext::CloseAnyOpenConnection()
{
- if(mpConnection)
+ if(mapConnection.get())
{
try
{
@@ -244,14 +251,14 @@ void BackupClientContext::CloseAnyOpenConnection()
box_time_t marker = GetCurrentBoxTime();
// Set it on the store
- mpConnection->QuerySetClientStoreMarker(marker);
+ mapConnection->QuerySetClientStoreMarker(marker);
// Record it so that it can be picked up later.
mClientStoreMarker = marker;
}
// Quit nicely
- mpConnection->QueryFinished();
+ mapConnection->QueryFinished();
}
catch(...)
{
@@ -259,26 +266,18 @@ void BackupClientContext::CloseAnyOpenConnection()
}
// Delete it anyway.
- delete mpConnection;
- mpConnection = 0;
+ mapConnection.reset();
}
-
- if(mpSocket)
+
+ try
{
- try
- {
- // Be nice about closing the socket
- mpSocket->Shutdown();
- mpSocket->Close();
- }
- catch(...)
- {
- // Ignore errors
- }
-
- // Delete object
- delete mpSocket;
- mpSocket = 0;
+ // Be nice about closing the socket
+ mapNice.reset();
+ mapSocket.reset();
+ }
+ catch(...)
+ {
+ // Ignore errors
}
// Delete any pending list
@@ -307,9 +306,9 @@ void BackupClientContext::CloseAnyOpenConnection()
// --------------------------------------------------------------------------
int BackupClientContext::GetTimeout() const
{
- if(mpConnection)
+ if(mapConnection.get())
{
- return mpConnection->GetTimeout();
+ return mapConnection->GetTimeout();
}
return (15*60*1000);
@@ -419,20 +418,20 @@ bool BackupClientContext::FindFilename(int64_t ObjectID, int64_t ContainingDirec
// Request filenames from the server, in a "safe" manner to ignore errors properly
{
- BackupProtocolClientGetObjectName send(ObjectID, ContainingDirectory);
+ BackupProtocolGetObjectName send(ObjectID, ContainingDirectory);
connection.Send(send);
}
- std::auto_ptr<BackupProtocolObjectCl> preply(connection.Receive());
+ std::auto_ptr<BackupProtocolMessage> preply(connection.Receive());
// Is it of the right type?
- if(preply->GetType() != BackupProtocolClientObjectName::TypeID)
+ if(preply->GetType() != BackupProtocolObjectName::TypeID)
{
// Was an error or something
return false;
}
// Cast to expected type.
- BackupProtocolClientObjectName *names = (BackupProtocolClientObjectName *)(preply.get());
+ BackupProtocolObjectName *names = (BackupProtocolObjectName *)(preply.get());
// Anything found?
int32_t numElements = names->GetNumNameElements();
@@ -482,10 +481,10 @@ bool BackupClientContext::FindFilename(int64_t ObjectID, int64_t ContainingDirec
}
// Is it a directory?
- rIsDirectoryOut = ((names->GetFlags() & BackupProtocolClientListDirectory::Flags_Dir) == BackupProtocolClientListDirectory::Flags_Dir);
+ rIsDirectoryOut = ((names->GetFlags() & BackupProtocolListDirectory::Flags_Dir) == BackupProtocolListDirectory::Flags_Dir);
// Is it the current version?
- rIsCurrentVersionOut = ((names->GetFlags() & (BackupProtocolClientListDirectory::Flags_OldVersion | BackupProtocolClientListDirectory::Flags_Deleted)) == 0);
+ rIsCurrentVersionOut = ((names->GetFlags() & (BackupProtocolListDirectory::Flags_OldVersion | BackupProtocolListDirectory::Flags_Deleted)) == 0);
// And other information which may be required
if(pModTimeOnServer) *pModTimeOnServer = names->GetModificationTime();
@@ -509,7 +508,7 @@ void BackupClientContext::SetKeepAliveTime(int iSeconds)
{
mKeepAliveTime = iSeconds < 0 ? 0 : iSeconds;
BOX_TRACE("Set keep-alive time to " << mKeepAliveTime << " seconds");
- mKeepAliveTimer = Timer(mKeepAliveTime, "KeepAliveTime");
+ mKeepAliveTimer.Reset(mKeepAliveTime * MILLI_SEC_IN_SEC);
}
// --------------------------------------------------------------------------
@@ -551,7 +550,7 @@ void BackupClientContext::UnManageDiffProcess()
// --------------------------------------------------------------------------
void BackupClientContext::DoKeepAlive()
{
- if (!mpConnection)
+ if (!mapConnection.get())
{
return;
}
@@ -567,9 +566,9 @@ void BackupClientContext::DoKeepAlive()
}
BOX_TRACE("KeepAliveTime reached, sending keep-alive message");
- mpConnection->QueryGetIsAlive();
+ mapConnection->QueryGetIsAlive();
- mKeepAliveTimer = Timer(mKeepAliveTime, "KeepAliveTime");
+ mKeepAliveTimer.Reset(mKeepAliveTime * MILLI_SEC_IN_SEC);
}
int BackupClientContext::GetMaximumDiffingTime()
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h
index 404d2d77..1fcc6ede 100644
--- a/bin/bbackupd/BackupClientContext.h
+++ b/bin/bbackupd/BackupClientContext.h
@@ -16,6 +16,7 @@
#include "BackupDaemonInterface.h"
#include "BackupStoreFile.h"
#include "ExcludeList.h"
+#include "TcpNice.h"
#include "Timer.h"
class TLSContext;
@@ -49,7 +50,8 @@ public:
bool ExtendedLogging,
bool ExtendedLogToFile,
std::string ExtendedLogFile,
- ProgressNotifier &rProgressNotifier
+ ProgressNotifier &rProgressNotifier,
+ bool TcpNiceMode
);
virtual ~BackupClientContext();
private:
@@ -207,6 +209,16 @@ public:
{
return mrProgressNotifier;
}
+
+ void SetNiceMode(bool enabled)
+ {
+ if(mTcpNiceMode)
+ {
+ mapNice->SetEnabled(enabled);
+ }
+ }
+
+ bool mExperimentalSnapshotMode;
private:
LocationResolver &mrResolver;
@@ -214,8 +226,9 @@ private:
std::string mHostname;
int mPort;
uint32_t mAccountNumber;
- SocketStreamTLS *mpSocket;
- BackupProtocolClient *mpConnection;
+ std::auto_ptr<SocketStream> mapSocket;
+ std::auto_ptr<NiceSocketStream> mapNice;
+ std::auto_ptr<BackupProtocolClient> mapConnection;
bool mExtendedLogging;
bool mExtendedLogToFile;
std::string mExtendedLogFile;
@@ -232,6 +245,7 @@ private:
int mKeepAliveTime;
int mMaximumDiffingTime;
ProgressNotifier &mrProgressNotifier;
+ bool mTcpNiceMode;
};
#endif // BACKUPCLIENTCONTEXT__H
diff --git a/bin/bbackupd/BackupClientDeleteList.cpp b/bin/bbackupd/BackupClientDeleteList.cpp
index b9b5b53e..c0414b78 100644
--- a/bin/bbackupd/BackupClientDeleteList.cpp
+++ b/bin/bbackupd/BackupClientDeleteList.cpp
@@ -13,7 +13,7 @@
#include "BackupClientDeleteList.h"
#include "BackupClientContext.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
#include "MemLeakFindOn.h"
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index 84c17dab..90caf2e7 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -17,21 +17,26 @@
#include <errno.h>
#include <string.h>
-#include "BackupClientDirectoryRecord.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
+#include "autogen_CipherException.h"
+#include "autogen_ClientException.h"
+#include "Archive.h"
#include "BackupClientContext.h"
-#include "IOStream.h"
-#include "MemBlockStream.h"
-#include "CommonException.h"
-#include "CollectInBufferStream.h"
-#include "BackupStoreFile.h"
+#include "BackupClientDirectoryRecord.h"
#include "BackupClientInodeToIDMap.h"
-#include "FileModificationTime.h"
#include "BackupDaemon.h"
#include "BackupStoreException.h"
-#include "Archive.h"
-#include "PathUtils.h"
+#include "BackupStoreFile.h"
+#include "BackupStoreFileEncodeStream.h"
+#include "BufferedStream.h"
+#include "CommonException.h"
+#include "CollectInBufferStream.h"
+#include "FileModificationTime.h"
+#include "IOStream.h"
#include "Logging.h"
+#include "MemBlockStream.h"
+#include "PathUtils.h"
+#include "RateLimitingStream.h"
#include "ReadLoggingStream.h"
#include "MemLeakFindOn.h"
@@ -51,6 +56,7 @@ BackupClientDirectoryRecord::BackupClientDirectoryRecord(int64_t ObjectID, const
mSubDirName(rSubDirName),
mInitialSyncDone(false),
mSyncDone(false),
+ mSuppressMultipleLinksWarning(false),
mpPendingEntries(0)
{
::memset(mStateChecksum, 0, sizeof(mStateChecksum));
@@ -98,6 +104,32 @@ void BackupClientDirectoryRecord::DeleteSubDirectories()
mSubDirectories.clear();
}
+std::string BackupClientDirectoryRecord::ConvertVssPathToRealPath(
+ const std::string &rVssPath,
+ const Location& rBackupLocation)
+{
+#ifdef ENABLE_VSS
+ BOX_TRACE("VSS: ConvertVssPathToRealPath: mIsSnapshotCreated = " <<
+ rBackupLocation.mIsSnapshotCreated);
+ BOX_TRACE("VSS: ConvertVssPathToRealPath: File/Directory Path = " <<
+ rVssPath.substr(0, rBackupLocation.mSnapshotPath.length()));
+ BOX_TRACE("VSS: ConvertVssPathToRealPath: Snapshot Path = " <<
+ rBackupLocation.mSnapshotPath);
+ if (rBackupLocation.mIsSnapshotCreated &&
+ rVssPath.substr(0, rBackupLocation.mSnapshotPath.length()) ==
+ rBackupLocation.mSnapshotPath)
+ {
+ std::string convertedPath = rBackupLocation.mPath +
+ rVssPath.substr(rBackupLocation.mSnapshotPath.length());
+ BOX_TRACE("VSS: ConvertVssPathToRealPath: Converted Path = " <<
+ convertedPath);
+ return convertedPath;
+ }
+#endif
+
+ return rVssPath;
+}
+
// --------------------------------------------------------------------------
//
// Function
@@ -115,6 +147,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
int64_t ContainingDirectoryID,
const std::string &rLocalPath,
const std::string &rRemotePath,
+ const Location& rBackupLocation,
bool ThisDirHasJustBeenCreated)
{
BackupClientContext& rContext(rParams.mrContext);
@@ -160,10 +193,16 @@ void BackupClientDirectoryRecord::SyncDirectory(
// just ignore this error. In a future scan, this
// deletion will be noticed, deleted from server,
// and this object deleted.
- rNotifier.NotifyDirStatFailed(this, rLocalPath,
+ rNotifier.NotifyDirStatFailed(this,
+ ConvertVssPathToRealPath(rLocalPath, rBackupLocation),
strerror(errno));
return;
}
+
+ BOX_TRACE("Stat dir '" << rLocalPath << "' "
+ "found device/inode " <<
+ dest_st.st_dev << "/" << dest_st.st_ino);
+
// Store inode number in map so directories are tracked
// in case they're renamed
{
@@ -204,12 +243,12 @@ void BackupClientDirectoryRecord::SyncDirectory(
{
// Report the error (logs and
// eventual email to administrator)
- rNotifier.NotifyFileStatFailed(this, rLocalPath,
+ rNotifier.NotifyFileStatFailed(this,
+ ConvertVssPathToRealPath(rLocalPath, rBackupLocation),
strerror(errno));
// FIXME move to NotifyFileStatFailed()
- SetErrorWhenReadingFilesystemObject(rParams,
- rLocalPath.c_str());
+ SetErrorWhenReadingFilesystemObject(rParams, rLocalPath);
// This shouldn't happen, so we'd better not continue
THROW_EXCEPTION(CommonException, OSFileError)
@@ -221,7 +260,9 @@ void BackupClientDirectoryRecord::SyncDirectory(
DIR *dirHandle = 0;
try
{
- rNotifier.NotifyScanDirectory(this, rLocalPath);
+ std::string nonVssDirPath = ConvertVssPathToRealPath(rLocalPath,
+ rBackupLocation);
+ rNotifier.NotifyScanDirectory(this, nonVssDirPath);
dirHandle = ::opendir(rLocalPath.c_str());
if(dirHandle == 0)
@@ -231,18 +272,20 @@ void BackupClientDirectoryRecord::SyncDirectory(
if (errno == EACCES)
{
rNotifier.NotifyDirListFailed(this,
- rLocalPath, "Access denied");
+ nonVssDirPath,
+ "Access denied");
}
else
{
rNotifier.NotifyDirListFailed(this,
- rLocalPath, strerror(errno));
+ nonVssDirPath,
+ strerror(errno));
}
// Report the error (logs and eventual email
// to administrator)
SetErrorWhenReadingFilesystemObject(rParams,
- rLocalPath.c_str());
+ nonVssDirPath);
// Ignore this directory for now.
return;
}
@@ -279,6 +322,8 @@ void BackupClientDirectoryRecord::SyncDirectory(
// Stat file to get info
filename = MakeFullPath(rLocalPath, en->d_name);
+ std::string realFileName = ConvertVssPathToRealPath(filename,
+ rBackupLocation);
#ifdef WIN32
// Don't stat the file just yet, to ensure
@@ -289,9 +334,18 @@ void BackupClientDirectoryRecord::SyncDirectory(
// Our emulated readdir() abuses en->d_type,
// which would normally contain DT_REG,
// DT_DIR, etc, but we only use it here and
- // prefer S_IFREG, S_IFDIR...
- int type = en->d_type;
- #else
+ // prefer to have the full file attributes.
+ int type;
+ if (en->d_type & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ type = S_IFDIR;
+ }
+ else
+ {
+ type = S_IFREG;
+ }
+
+ #else // !WIN32
if(EMU_LSTAT(filename.c_str(), &file_st) != 0)
{
if(!(rParams.mrContext.ExcludeDir(
@@ -306,15 +360,52 @@ void BackupClientDirectoryRecord::SyncDirectory(
// FIXME move to
// NotifyFileStatFailed()
- SetErrorWhenReadingFilesystemObject(
- rParams, filename.c_str());
+ SetErrorWhenReadingFilesystemObject(rParams, filename);
}
// Ignore this entry for now.
continue;
}
- if(file_st.st_dev != dest_st.st_dev)
+ int type = file_st.st_mode & S_IFMT;
+
+ // ecryptfs reports nlink > 1 for directories
+ // with contents, but no filesystem supports
+ // hardlinking directories? so we can ignore
+ // this if the entry is a directory.
+ if(file_st.st_nlink != 1 && type == S_IFDIR)
+ {
+ BOX_INFO("Ignoring apparent hard link "
+ "count on directory: " <<
+ filename << ", nlink=" <<
+ file_st.st_nlink);
+ }
+ else if(file_st.st_nlink > 1)
+ {
+ if(!mSuppressMultipleLinksWarning)
+ {
+ BOX_WARNING("File is hard linked, this may "
+ "cause rename tracking to fail and "
+ "move files incorrectly in your "
+ "backup! " << filename <<
+ ", nlink=" << file_st.st_nlink <<
+ " (suppressing further warnings)");
+ mSuppressMultipleLinksWarning = true;
+ }
+ SetErrorWhenReadingFilesystemObject(rParams, filename);
+ }
+
+ BOX_TRACE("Stat entry '" << filename << "' "
+ "found device/inode " <<
+ file_st.st_dev << "/" <<
+ file_st.st_ino);
+
+ /* Workaround for apparent btrfs bug, where
+ symlinks appear to be on a different filesystem
+ than their containing directory, thanks to
+ Toke Hoiland-Jorgensen */
+ if(type == S_IFDIR &&
+ file_st.st_dev != dest_st.st_dev)
{
if(!(rParams.mrContext.ExcludeDir(
filename)))
@@ -324,8 +415,6 @@ void BackupClientDirectoryRecord::SyncDirectory(
}
continue;
}
-
- int type = file_st.st_mode & S_IFMT;
#endif
if(type == S_IFREG || type == S_IFLNK)
@@ -333,12 +422,9 @@ void BackupClientDirectoryRecord::SyncDirectory(
// File or symbolic link
// Exclude it?
- if(rParams.mrContext.ExcludeFile(filename))
+ if(rParams.mrContext.ExcludeFile(realFileName))
{
- rNotifier.NotifyFileExcluded(
- this,
- filename);
-
+ rNotifier.NotifyFileExcluded(this, realFileName);
// Next item!
continue;
}
@@ -351,38 +437,50 @@ void BackupClientDirectoryRecord::SyncDirectory(
// Directory
// Exclude it?
- if(rParams.mrContext.ExcludeDir(filename))
+ if(rParams.mrContext.ExcludeDir(realFileName))
{
- rNotifier.NotifyDirExcluded(
- this,
- filename);
+ rNotifier.NotifyDirExcluded(this, realFileName);
// Next item!
continue;
}
+ #ifdef WIN32
+ // exclude reparse points, as Application Data points to the
+ // parent directory under Vista and later, and causes an
+ // infinite loop:
+ // http://social.msdn.microsoft.com/forums/en-US/windowscompatibility/thread/05d14368-25dd-41c8-bdba-5590bf762a68/
+ if (en->d_type & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ rNotifier.NotifyMountPointSkipped(this, realFileName);
+ continue;
+ }
+ #endif
+
// Store on list
dirs.push_back(std::string(en->d_name));
}
- else
+ else // not a file or directory, what is it?
{
- if (type == S_IFSOCK || type == S_IFIFO)
+ if (type == S_IFSOCK
+# ifndef WIN32
+ || type == S_IFIFO
+# endif
+ )
{
// removed notification for these types
// see Debian bug 479145, no objections
}
- else if(rParams.mrContext.ExcludeFile(filename))
+ else if(rParams.mrContext.ExcludeFile(realFileName))
{
- rNotifier.NotifyFileExcluded(
- this,
- filename);
+ rNotifier.NotifyFileExcluded(this, realFileName);
}
else
{
- rNotifier.NotifyUnsupportedFileType(
- this, filename);
- SetErrorWhenReadingFilesystemObject(
- rParams, filename.c_str());
+ rNotifier.NotifyUnsupportedFileType(this,
+ realFileName);
+ SetErrorWhenReadingFilesystemObject(rParams,
+ realFileName);
}
continue;
@@ -397,13 +495,12 @@ void BackupClientDirectoryRecord::SyncDirectory(
if(emu_stat(filename.c_str(), &file_st) != 0)
{
rNotifier.NotifyFileStatFailed(this,
- filename,
+ ConvertVssPathToRealPath(filename, rBackupLocation),
strerror(errno));
// Report the error (logs and
// eventual email to administrator)
- SetErrorWhenReadingFilesystemObject(
- rParams, filename.c_str());
+ SetErrorWhenReadingFilesystemObject(rParams, filename);
// Ignore this entry for now.
continue;
@@ -412,7 +509,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
if(file_st.st_dev != link_st.st_dev)
{
rNotifier.NotifyMountPointSkipped(this,
- filename);
+ ConvertVssPathToRealPath(filename, rBackupLocation));
continue;
}
#endif
@@ -432,8 +529,8 @@ void BackupClientDirectoryRecord::SyncDirectory(
// Log that this has happened
if(!rParams.mHaveLoggedWarningAboutFutureFileTimes)
{
- rNotifier.NotifyFileModifiedInFuture(
- this, filename);
+ rNotifier.NotifyFileModifiedInFuture(this,
+ ConvertVssPathToRealPath(filename, rBackupLocation));
rParams.mHaveLoggedWarningAboutFutureFileTimes = true;
}
}
@@ -507,7 +604,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
// Do the directory reading
bool updateCompleteSuccess = UpdateItems(rParams, rLocalPath,
- rRemotePath, pdirOnStore, entriesLeftOver, files, dirs);
+ rRemotePath, rBackupLocation, pdirOnStore, entriesLeftOver, files, dirs);
// LAST THING! (think exception safety)
// Store the new checksum -- don't fetch things unnecessarily in the future
@@ -564,10 +661,11 @@ BackupStoreDirectory *BackupClientDirectoryRecord::FetchDirectoryListing(BackupC
BackupProtocolClient &connection(rParams.mrContext.GetConnection());
// Query the directory
- std::auto_ptr<BackupProtocolClientSuccess> dirreply(connection.QueryListDirectory(
+ std::auto_ptr<BackupProtocolSuccess> dirreply(connection.QueryListDirectory(
mObjectID,
- BackupProtocolClientListDirectory::Flags_INCLUDE_EVERYTHING, // both files and directories
- BackupProtocolClientListDirectory::Flags_Deleted | BackupProtocolClientListDirectory::Flags_OldVersion, // exclude old/deleted stuff
+ BackupProtocolListDirectory::Flags_INCLUDE_EVERYTHING, // both files and directories
+ BackupProtocolListDirectory::Flags_Deleted |
+ BackupProtocolListDirectory::Flags_OldVersion, // exclude old/deleted stuff
true /* want attributes */));
// Retrieve the directory from the stream following
@@ -630,11 +728,38 @@ void BackupClientDirectoryRecord::UpdateAttributes(BackupClientDirectoryRecord::
BackupProtocolClient &connection(rParams.mrContext.GetConnection());
// Exception thrown if this doesn't work
- MemBlockStream attrStream(attr);
+ std::auto_ptr<IOStream> attrStream(new MemBlockStream(attr));
connection.QueryChangeDirAttributes(mObjectID, attrModTime, attrStream);
}
}
+std::string BackupClientDirectoryRecord::DecryptFilename(
+ BackupStoreDirectory::Entry *en,
+ const std::string& rRemoteDirectoryPath)
+{
+ BackupStoreFilenameClear fn(en->GetName());
+ return DecryptFilename(fn, en->GetObjectID(), rRemoteDirectoryPath);
+}
+
+std::string BackupClientDirectoryRecord::DecryptFilename(
+ BackupStoreFilenameClear fn, int64_t filenameObjectID,
+ const std::string& rRemoteDirectoryPath)
+{
+ std::string filenameClear;
+ try
+ {
+ filenameClear = fn.GetClearFilename();
+ }
+ catch(BoxException &e)
+ {
+ BOX_ERROR("Failed to decrypt filename for object " <<
+ BOX_FORMAT_OBJECTID(filenameObjectID) << " in "
+ "directory " << BOX_FORMAT_OBJECTID(mObjectID) <<
+ " (" << rRemoteDirectoryPath << ")");
+ throw;
+ }
+ return filenameClear;
+}
// --------------------------------------------------------------------------
//
@@ -649,6 +774,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
BackupClientDirectoryRecord::SyncParams &rParams,
const std::string &rLocalPath,
const std::string &rRemotePath,
+ const Location& rBackupLocation,
BackupStoreDirectory *pDirOnStore,
std::vector<BackupStoreDirectory::Entry *> &rEntriesLeftOver,
std::vector<std::string> &rFiles,
@@ -673,7 +799,19 @@ bool BackupClientDirectoryRecord::UpdateItems(
BackupStoreDirectory::Entry *en = 0;
while((en = i.Next()) != 0)
{
- decryptedEntries[BackupStoreFilenameClear(en->GetName()).GetClearFilename()] = en;
+ std::string filenameClear;
+ try
+ {
+ filenameClear = DecryptFilename(en,
+ rRemotePath);
+ decryptedEntries[filenameClear] = en;
+ }
+ catch (CipherException &e)
+ {
+ BOX_ERROR("Failed to decrypt a filename, "
+ "pretending that the file doesn't "
+ "exist");
+ }
}
}
@@ -686,26 +824,26 @@ bool BackupClientDirectoryRecord::UpdateItems(
// Filename of this file
std::string filename(MakeFullPath(rLocalPath, *f));
+ std::string nonVssFilePath = ConvertVssPathToRealPath(filename,
+ rBackupLocation);
// Get relevant info about file
box_time_t modTime = 0;
uint64_t attributesHash = 0;
int64_t fileSize = 0;
InodeRefType inodeNum = 0;
- bool hasMultipleHardLinks = true;
// BLOCK
{
// Stat the file
EMU_STRUCT_STAT st;
if(EMU_LSTAT(filename.c_str(), &st) != 0)
{
- rNotifier.NotifyFileStatFailed(this,
- filename, strerror(errno));
+ rNotifier.NotifyFileStatFailed(this, nonVssFilePath,
+ strerror(errno));
// Report the error (logs and
// eventual email to administrator)
- SetErrorWhenReadingFilesystemObject(rParams,
- filename.c_str());
+ SetErrorWhenReadingFilesystemObject(rParams, nonVssFilePath);
// Ignore this entry for now.
continue;
@@ -715,7 +853,6 @@ bool BackupClientDirectoryRecord::UpdateItems(
modTime = FileModificationTime(st);
fileSize = st.st_size;
inodeNum = st.st_ino;
- hasMultipleHardLinks = (st.st_nlink > 1);
attributesHash = BackupClientFileAttributes::GenerateAttributeHash(st, filename, *f);
}
@@ -734,7 +871,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
}
// Check that the entry which might have been found is in fact a file
- if((en != 0) && ((en->GetFlags() & BackupStoreDirectory::Entry::Flags_File) == 0))
+ if((en != 0) && !(en->IsFile()))
{
// Directory exists in the place of this file -- sort it out
RemoveDirectoryInPlaceOfFile(rParams, pDirOnStore,
@@ -760,7 +897,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
bool isCurrentVersion = false;
box_time_t srvModTime = 0, srvAttributesHash = 0;
BackupStoreFilenameClear oldLeafname;
- if(rContext.FindFilename(renameObjectID, renameInDirectory, localPotentialOldName, isDir, isCurrentVersion, &srvModTime, &srvAttributesHash, &oldLeafname))
+ if(rContext.FindFilename(renameObjectID, renameInDirectory,
+ localPotentialOldName, isDir, isCurrentVersion,
+ &srvModTime, &srvAttributesHash, &oldLeafname))
{
// Only interested if it's a file and the latest version
if(!isDir && isCurrentVersion)
@@ -780,8 +919,11 @@ bool BackupClientDirectoryRecord::UpdateItems(
if(!rContext.StorageLimitExceeded())
{
// Rename the existing files (ie include old versions) on the server
- connection.QueryMoveObject(renameObjectID, renameInDirectory, mObjectID /* move to this directory */,
- BackupProtocolClientMoveObject::Flags_MoveAllWithSameName | BackupProtocolClientMoveObject::Flags_AllowMoveOverDeletedObject,
+ connection.QueryMoveObject(renameObjectID,
+ renameInDirectory,
+ mObjectID /* move to this directory */,
+ BackupProtocolMoveObject::Flags_MoveAllWithSameName |
+ BackupProtocolMoveObject::Flags_AllowMoveOverDeletedObject,
storeFilename);
// Stop the attempt to delete the file in the original location
@@ -790,8 +932,11 @@ bool BackupClientDirectoryRecord::UpdateItems(
// Create new entry in the directory for it
// -- will be near enough what's actually on the server for the rest to work.
- en = pDirOnStore->AddEntry(storeFilename, srvModTime, renameObjectID, 0 /* size in blocks unknown, but not needed */,
- BackupStoreDirectory::Entry::Flags_File, srvAttributesHash);
+ en = pDirOnStore->AddEntry(storeFilename,
+ srvModTime, renameObjectID,
+ 0 /* size in blocks unknown, but not needed */,
+ BackupStoreDirectory::Entry::Flags_File,
+ srvAttributesHash);
// Store the object ID for the inode lookup map later
latestObjectID = renameObjectID;
@@ -833,6 +978,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
// and if we know about it from a directory listing, that it hasn't got the same upload time as on the store
bool doUpload = false;
+ std::string decisionReason = "unknown";
// Only upload a file if the mod time locally is
// different to that on the server.
@@ -848,16 +994,12 @@ bool BackupClientDirectoryRecord::UpdateItems(
if (pDirOnStore != 0 && en == 0)
{
doUpload = true;
- BOX_TRACE("Upload decision: " <<
- filename << ": will upload "
- "(not on server)");
+ decisionReason = "not on server";
}
else if (modTime >= rParams.mSyncPeriodStart)
{
doUpload = true;
- BOX_TRACE("Upload decision: " <<
- filename << ": will upload "
- "(modified since last sync)");
+ decisionReason = "modified since last sync";
}
}
@@ -874,9 +1016,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
> rParams.mMaxUploadWait)
{
doUpload = true;
- BOX_TRACE("Upload decision: " <<
- filename << ": will upload "
- "(continually modified)");
+ decisionReason = "continually modified";
}
// Then make sure that if files are added with a
@@ -892,9 +1032,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
en->GetModificationTime() != modTime)
{
doUpload = true;
- BOX_TRACE("Upload decision: " <<
- filename << ": will upload "
- "(mod time changed)");
+ decisionReason = "mod time changed";
}
// And just to catch really badly off clocks in
@@ -905,17 +1043,14 @@ bool BackupClientDirectoryRecord::UpdateItems(
rParams.mUploadAfterThisTimeInTheFuture)
{
doUpload = true;
- BOX_TRACE("Upload decision: " <<
- filename << ": will upload "
- "(mod time in the future)");
+ decisionReason = "mod time in the future";
}
}
if (en != 0 && en->GetModificationTime() == modTime)
{
- BOX_TRACE("Upload decision: " <<
- filename << ": will not upload "
- "(not modified since last upload)");
+ doUpload = false;
+ decisionReason = "not modified since last upload";
}
else if (!doUpload)
{
@@ -924,22 +1059,26 @@ bool BackupClientDirectoryRecord::UpdateItems(
box_time_t now = GetCurrentBoxTime();
int age = BoxTimeToSeconds(now -
modTime);
- BOX_TRACE("Upload decision: " <<
- filename << ": will not upload "
- "(modified too recently: "
- "only " << age << " seconds ago)");
+ std::ostringstream s;
+ s << "modified too recently: "
+ "only " << age << " seconds ago";
+ decisionReason = s.str();
}
else
{
- BOX_TRACE("Upload decision: " <<
- filename << ": will not upload "
- "(mod time is " << modTime <<
+ std::ostringstream s;
+ s << "mod time is " << modTime <<
" which is outside sync window, "
<< rParams.mSyncPeriodStart << " to "
- << rParams.mSyncPeriodEnd << ")");
+ << rParams.mSyncPeriodEnd;
+ decisionReason = s.str();
}
}
+ BOX_TRACE("Upload decision: " << nonVssFilePath << ": " <<
+ (doUpload ? "will upload" : "will not upload") <<
+ " (" << decisionReason << ")");
+
bool fileSynced = true;
if (doUpload)
@@ -968,7 +1107,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
try
{
latestObjectID = UploadFile(rParams,
- filename, storeFilename,
+ filename,
+ nonVssFilePath,
+ storeFilename,
fileSize, modTime,
attributesHash,
noPreviousVersionOnServer);
@@ -992,7 +1133,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
// retries would probably just cause
// more problems.
rNotifier.NotifyFileUploadException(
- this, filename, e);
+ this, nonVssFilePath, e);
throw;
}
catch(BoxException &e)
@@ -1009,9 +1150,10 @@ bool BackupClientDirectoryRecord::UpdateItems(
// code false, to show error in directory
allUpdatedSuccessfully = false;
// Log it.
- SetErrorWhenReadingFilesystemObject(rParams, filename.c_str());
- rNotifier.NotifyFileUploadException(
- this, filename, e);
+ SetErrorWhenReadingFilesystemObject(rParams,
+ nonVssFilePath);
+ rNotifier.NotifyFileUploadException(this,
+ nonVssFilePath, e);
}
// Update structures if the file was uploaded
@@ -1029,8 +1171,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
}
else
{
- rNotifier.NotifyFileSkippedServerFull(this,
- filename);
+ rNotifier.NotifyFileSkippedServerFull(this, nonVssFilePath);
}
}
else if(en != 0 && en->GetAttributesHash() != attributesHash)
@@ -1050,22 +1191,23 @@ bool BackupClientDirectoryRecord::UpdateItems(
{
try
{
- rNotifier.NotifyFileUploadingAttributes(
- this, filename);
+ rNotifier.NotifyFileUploadingAttributes(this,
+ nonVssFilePath);
// Update store
BackupClientFileAttributes attr;
- attr.ReadAttributes(filename.c_str(), false /* put mod times in the attributes, please */);
- MemBlockStream attrStream(attr);
+ attr.ReadAttributes(filename,
+ false /* put mod times in the attributes, please */);
+ std::auto_ptr<IOStream> attrStream(
+ new MemBlockStream(attr));
connection.QuerySetReplacementFileAttributes(mObjectID, attributesHash, storeFilename, attrStream);
fileSynced = true;
}
catch (BoxException &e)
{
- BOX_ERROR("Failed to read or store "
- "file attributes for '" <<
- filename << "', will try "
- "again later");
+ BOX_ERROR("Failed to read or store file attributes "
+ "for '" << nonVssFilePath << "', will try again "
+ "later");
}
}
}
@@ -1109,7 +1251,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
{
// Use this one
BOX_TRACE("Storing uploaded file ID " <<
- inodeNum << " (" << filename << ") "
+ inodeNum << " (" << nonVssFilePath << ") "
"in ID map as object " <<
latestObjectID << " with parent " <<
mObjectID);
@@ -1126,7 +1268,12 @@ bool BackupClientDirectoryRecord::UpdateItems(
// Found
if (dirid != mObjectID)
{
- BOX_WARNING("Found conflicting parent ID for file ID " << inodeNum << " (" << filename << "): expected " << mObjectID << " but found " << dirid << " (same directory used in two different locations?)");
+ BOX_WARNING("Found conflicting parent ID for "
+ "file ID " << inodeNum << " (" <<
+ nonVssFilePath << "): expected " <<
+ mObjectID << " but found " << dirid <<
+ " (same directory used in two different "
+ "locations?)");
}
ASSERT(dirid == mObjectID);
@@ -1136,11 +1283,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
// into it. However, in a long running process this may happen occasionally and
// not indicate anything wrong.
// Run the release version for real life use, where this check is not made.
- BOX_TRACE("Storing found file ID " <<
- inodeNum << " (" << filename <<
- ") in ID map as object " <<
- objid << " with parent " <<
- mObjectID);
+ BOX_TRACE("Storing found file ID " << inodeNum <<
+ " (" << nonVssFilePath << ") in ID map as "
+ "object " << objid << " with parent " << mObjectID);
idMap.AddToMap(inodeNum, objid,
mObjectID /* containing directory */);
}
@@ -1149,7 +1294,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
if (fileSynced)
{
- rNotifier.NotifyFileSynchronised(this, filename,
+ rNotifier.NotifyFileSynchronised(this, nonVssFilePath,
fileSize);
}
}
@@ -1175,6 +1320,8 @@ bool BackupClientDirectoryRecord::UpdateItems(
// Get the local filename
std::string dirname(MakeFullPath(rLocalPath, *d));
+ std::string nonVssDirPath = ConvertVssPathToRealPath(dirname,
+ rBackupLocation);
// See if it's in the listing (if we have one)
BackupStoreFilenameClear storeFilename(*d);
@@ -1189,14 +1336,17 @@ bool BackupClientDirectoryRecord::UpdateItems(
}
// Check that the entry which might have been found is in fact a directory
- if((en != 0) && ((en->GetFlags() & BackupStoreDirectory::Entry::Flags_Dir) == 0))
+ if((en != 0) && !(en->IsDir()))
{
// Entry exists, but is not a directory. Bad.
// Get rid of it.
BackupProtocolClient &connection(rContext.GetConnection());
connection.QueryDeleteFile(mObjectID /* in directory */, storeFilename);
+
+ std::string filenameClear = DecryptFilename(en,
+ rRemotePath);
rNotifier.NotifyFileDeleted(en->GetObjectID(),
- storeFilename.GetClearFilename());
+ filenameClear);
// Nothing found
en = 0;
@@ -1266,7 +1416,7 @@ bool BackupClientDirectoryRecord::UpdateItems(
BOX_WARNING("Failed to read attributes "
"of directory, cannot check "
"for rename, assuming new: '"
- << dirname << "'");
+ << nonVssDirPath << "'");
failedToReadAttributes = true;
}
@@ -1284,7 +1434,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
std::string localPotentialOldName;
bool isDir = false;
bool isCurrentVersion = false;
- if(rContext.FindFilename(renameObjectID, renameInDirectory, localPotentialOldName, isDir, isCurrentVersion))
+ if(rContext.FindFilename(renameObjectID,
+ renameInDirectory, localPotentialOldName,
+ isDir, isCurrentVersion))
{
// Only interested if it's a directory
if(isDir && isCurrentVersion)
@@ -1309,13 +1461,16 @@ bool BackupClientDirectoryRecord::UpdateItems(
// in the else if(...) above will be correct.
// Build attribute stream for sending
- MemBlockStream attrStream(attr);
+ std::auto_ptr<IOStream> attrStream(new MemBlockStream(attr));
if(renameDir)
{
// Rename the existing directory on the server
- connection.QueryMoveObject(renameObjectID, renameInDirectory, mObjectID /* move to this directory */,
- BackupProtocolClientMoveObject::Flags_MoveAllWithSameName | BackupProtocolClientMoveObject::Flags_AllowMoveOverDeletedObject,
+ connection.QueryMoveObject(renameObjectID,
+ renameInDirectory,
+ mObjectID /* move to this directory */,
+ BackupProtocolMoveObject::Flags_MoveAllWithSameName |
+ BackupProtocolMoveObject::Flags_AllowMoveOverDeletedObject,
storeFilename);
// Put the latest attributes on it
@@ -1332,12 +1487,22 @@ bool BackupClientDirectoryRecord::UpdateItems(
else
{
// Create a new directory
- std::auto_ptr<BackupProtocolClientSuccess> dirCreate(connection.QueryCreateDirectory(
- mObjectID, attrModTime, storeFilename, attrStream));
+ std::auto_ptr<BackupProtocolSuccess> dirCreate(
+ connection.QueryCreateDirectory(
+ mObjectID, attrModTime,
+ storeFilename, attrStream));
subDirObjectID = dirCreate->GetObjectID();
// Flag as having done this for optimisation later
haveJustCreatedDirOnServer = true;
+
+ std::string filenameClear =
+ DecryptFilename(storeFilename,
+ subDirObjectID,
+ rRemotePath);
+ rNotifier.NotifyDirectoryCreated(
+ subDirObjectID, filenameClear,
+ nonVssDirPath);
}
}
@@ -1365,8 +1530,8 @@ bool BackupClientDirectoryRecord::UpdateItems(
if(psubDirRecord)
{
// Sync this sub directory too
- psubDirRecord->SyncDirectory(rParams, mObjectID,
- dirname, rRemotePath + "/" + *d,
+ psubDirRecord->SyncDirectory(rParams, mObjectID, dirname,
+ rRemotePath + "/" + *d, rBackupLocation,
haveJustCreatedDirOnServer);
}
@@ -1397,10 +1562,26 @@ bool BackupClientDirectoryRecord::UpdateItems(
// If there's an error during the process, it doesn't matter if things
// aren't actually deleted, as the whole state will be reset anyway.
BackupClientDeleteList &rdel(rContext.GetDeleteList());
+ std::string filenameClear;
+ bool isCorruptFilename = false;
+
+ try
+ {
+ filenameClear = DecryptFilename(en,
+ rRemotePath);
+ }
+ catch (CipherException &e)
+ {
+ BOX_ERROR("Failed to decrypt a filename, "
+ "scheduling that file for deletion");
+ filenameClear = "<corrupt filename>";
+ isCorruptFilename = true;
+ }
- BackupStoreFilenameClear clear(en->GetName());
std::string localName = MakeFullPath(rLocalPath,
- clear.GetClearFilename());
+ filenameClear);
+ std::string nonVssLocalName = ConvertVssPathToRealPath(localName,
+ rBackupLocation);
// Delete this entry -- file or directory?
if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_File) != 0)
@@ -1418,20 +1599,17 @@ bool BackupClientDirectoryRecord::UpdateItems(
// If there's a directory record for it in
// the sub directory map, delete it now
BackupStoreFilenameClear dirname(en->GetName());
- std::map<std::string, BackupClientDirectoryRecord *>::iterator e(mSubDirectories.find(dirname.GetClearFilename()));
- if(e != mSubDirectories.end())
+ std::map<std::string, BackupClientDirectoryRecord *>::iterator
+ e(mSubDirectories.find(filenameClear));
+ if(e != mSubDirectories.end() && !isCorruptFilename)
{
// Carefully delete the entry from the map
BackupClientDirectoryRecord *rec = e->second;
mSubDirectories.erase(e);
delete rec;
- std::string name = MakeFullPath(
- rLocalPath,
- dirname.GetClearFilename());
-
- BOX_TRACE("Deleted directory record "
- "for " << name);
+ BOX_TRACE("Deleted directory record for " <<
+ nonVssLocalName);
}
}
}
@@ -1498,6 +1676,7 @@ void BackupClientDirectoryRecord::RemoveDirectoryInPlaceOfFile(
int64_t BackupClientDirectoryRecord::UploadFile(
BackupClientDirectoryRecord::SyncParams &rParams,
const std::string &rFilename,
+ const std::string &rNonVssFilePath,
const BackupStoreFilename &rStoreFilename,
int64_t FileSize,
box_time_t ModificationTime,
@@ -1512,11 +1691,14 @@ int64_t BackupClientDirectoryRecord::UploadFile(
// Info
int64_t objID = 0;
- bool doNormalUpload = true;
+ int64_t uploadedSize = -1;
// Use a try block to catch store full errors
try
{
+ std::auto_ptr<BackupStoreFileEncodeStream> apStreamToUpload;
+ int64_t diffFromID = 0;
+
// Might an old version be on the server, and is the file
// size over the diffing threshold?
if(!NoPreviousVersionOnServer &&
@@ -1524,14 +1706,14 @@ int64_t BackupClientDirectoryRecord::UploadFile(
{
// YES -- try to do diff, if possible
// First, query the server to see if there's an old version available
- std::auto_ptr<BackupProtocolClientSuccess> getBlockIndex(connection.QueryGetBlockIndexByName(mObjectID, rStoreFilename));
- int64_t diffFromID = getBlockIndex->GetObjectID();
+ std::auto_ptr<BackupProtocolSuccess> getBlockIndex(connection.QueryGetBlockIndexByName(mObjectID, rStoreFilename));
+ diffFromID = getBlockIndex->GetObjectID();
if(diffFromID != 0)
{
// Found an old version
- rNotifier.NotifyFileUploadingPatch(this,
- rFilename);
+ rNotifier.NotifyFileUploadingPatch(this,
+ rNonVssFilePath);
// Get the index
std::auto_ptr<IOStream> blockIndexStream(connection.ReceiveStream());
@@ -1543,55 +1725,68 @@ int64_t BackupClientDirectoryRecord::UploadFile(
rContext.ManageDiffProcess();
bool isCompletelyDifferent = false;
- std::auto_ptr<IOStream> patchStream(
- BackupStoreFile::EncodeFileDiff(
- rFilename.c_str(),
- mObjectID, /* containing directory */
- rStoreFilename, diffFromID, *blockIndexStream,
- connection.GetTimeout(),
- &rContext, // DiffTimer implementation
- 0 /* not interested in the modification time */,
- &isCompletelyDifferent));
-
- rContext.UnManageDiffProcess();
- //
- // Upload the patch to the store
- //
- std::auto_ptr<BackupProtocolClientSuccess> stored(connection.QueryStoreFile(mObjectID, ModificationTime,
- AttributesHash, isCompletelyDifferent?(0):(diffFromID), rStoreFilename, *patchStream));
-
- // Get object ID from the result
- objID = stored->GetObjectID();
+ apStreamToUpload = BackupStoreFile::EncodeFileDiff(
+ rFilename,
+ mObjectID, /* containing directory */
+ rStoreFilename, diffFromID, *blockIndexStream,
+ connection.GetTimeout(),
+ &rContext, // DiffTimer implementation
+ 0 /* not interested in the modification time */,
+ &isCompletelyDifferent);
- // Don't attempt to upload it again!
- doNormalUpload = false;
+ if(isCompletelyDifferent)
+ {
+ diffFromID = 0;
+ }
+
+ rContext.UnManageDiffProcess();
}
}
- if(doNormalUpload)
+ if(!apStreamToUpload.get()) // No patch upload, so do a normal upload
{
// below threshold or nothing to diff from, so upload whole
- rNotifier.NotifyFileUploading(this, rFilename);
+ rNotifier.NotifyFileUploading(this, rNonVssFilePath);
// Prepare to upload, getting a stream which will encode the file as we go along
- std::auto_ptr<IOStream> upload(
- BackupStoreFile::EncodeFile(rFilename.c_str(),
- mObjectID, rStoreFilename, NULL,
- &rParams,
- &(rParams.mrRunStatusProvider)));
-
- // Send to store
- std::auto_ptr<BackupProtocolClientSuccess> stored(
- connection.QueryStoreFile(
- mObjectID, ModificationTime,
- AttributesHash,
- 0 /* no diff from file ID */,
- rStoreFilename, *upload));
-
- // Get object ID from the result
- objID = stored->GetObjectID();
+ apStreamToUpload = BackupStoreFile::EncodeFile(
+ rFilename, mObjectID, /* containing directory */
+ rStoreFilename, NULL, &rParams,
+ &(rParams.mrRunStatusProvider));
+ }
+
+ rContext.SetNiceMode(true);
+ std::auto_ptr<IOStream> apWrappedStream;
+
+ if(rParams.mMaxUploadRate > 0)
+ {
+ apWrappedStream.reset(new RateLimitingStream(
+ *apStreamToUpload, rParams.mMaxUploadRate));
+ }
+ else
+ {
+ // Wrap the stream in *something*, so that
+ // QueryStoreFile() doesn't delete the original
+ // stream (upload object) and we can retrieve
+ // the byte counter.
+ apWrappedStream.reset(new BufferedStream(
+ *apStreamToUpload));
}
+
+ // Send to store
+ std::auto_ptr<BackupProtocolSuccess> stored(
+ connection.QueryStoreFile(
+ mObjectID, ModificationTime,
+ AttributesHash,
+ diffFromID,
+ rStoreFilename, apWrappedStream));
+
+ rContext.SetNiceMode(false);
+
+ // Get object ID from the result
+ objID = stored->GetObjectID();
+ uploadedSize = apStreamToUpload->GetTotalBytesSent();
}
catch(BoxException &e)
{
@@ -1605,8 +1800,8 @@ int64_t BackupClientDirectoryRecord::UploadFile(
int type, subtype;
if(connection.GetLastError(type, subtype))
{
- if(type == BackupProtocolClientError::ErrorType
- && subtype == BackupProtocolClientError::Err_StorageLimitExceeded)
+ if(type == BackupProtocolError::ErrorType
+ && subtype == BackupProtocolError::Err_StorageLimitExceeded)
{
// The hard limit was exceeded on the server, notify!
rParams.mrSysadminNotifier.NotifySysadmin(
@@ -1617,7 +1812,7 @@ int64_t BackupClientDirectoryRecord::UploadFile(
return 0;
}
rNotifier.NotifyFileUploadServerError(this,
- rFilename, type, subtype);
+ rNonVssFilePath, type, subtype);
}
}
@@ -1625,7 +1820,8 @@ int64_t BackupClientDirectoryRecord::UploadFile(
throw;
}
- rNotifier.NotifyFileUploaded(this, rFilename, FileSize);
+ rNotifier.NotifyFileUploaded(this, rNonVssFilePath, FileSize,
+ uploadedSize);
// Return the new object ID of this file
return objID;
@@ -1641,7 +1837,9 @@ int64_t BackupClientDirectoryRecord::UploadFile(
// Created: 29/3/04
//
// --------------------------------------------------------------------------
-void BackupClientDirectoryRecord::SetErrorWhenReadingFilesystemObject(BackupClientDirectoryRecord::SyncParams &rParams, const char *Filename)
+void BackupClientDirectoryRecord::SetErrorWhenReadingFilesystemObject(
+ BackupClientDirectoryRecord::SyncParams &rParams,
+ const std::string& rFilename)
{
// Zero hash, so it gets synced properly next time round.
::memset(mStateChecksum, 0, sizeof(mStateChecksum));
@@ -1671,19 +1869,20 @@ BackupClientDirectoryRecord::SyncParams::SyncParams(
SysadminNotifier &rSysadminNotifier,
ProgressNotifier &rProgressNotifier,
BackupClientContext &rContext)
- : mSyncPeriodStart(0),
- mSyncPeriodEnd(0),
- mMaxUploadWait(0),
- mMaxFileTimeInFuture(99999999999999999LL),
- mFileTrackingSizeThreshold(16*1024),
- mDiffingUploadSizeThreshold(16*1024),
- mrRunStatusProvider(rRunStatusProvider),
- mrSysadminNotifier(rSysadminNotifier),
- mrProgressNotifier(rProgressNotifier),
- mrContext(rContext),
- mReadErrorsOnFilesystemObjects(false),
- mUploadAfterThisTimeInTheFuture(99999999999999999LL),
- mHaveLoggedWarningAboutFutureFileTimes(false)
+: mSyncPeriodStart(0),
+ mSyncPeriodEnd(0),
+ mMaxUploadWait(0),
+ mMaxFileTimeInFuture(99999999999999999LL),
+ mFileTrackingSizeThreshold(16*1024),
+ mDiffingUploadSizeThreshold(16*1024),
+ mrRunStatusProvider(rRunStatusProvider),
+ mrSysadminNotifier(rSysadminNotifier),
+ mrProgressNotifier(rProgressNotifier),
+ mrContext(rContext),
+ mReadErrorsOnFilesystemObjects(false),
+ mMaxUploadRate(0),
+ mUploadAfterThisTimeInTheFuture(99999999999999999LL),
+ mHaveLoggedWarningAboutFutureFileTimes(false)
{
}
@@ -1874,3 +2073,220 @@ void BackupClientDirectoryRecord::Serialize(Archive & rArchive) const
pSubItem->Serialize(rArchive);
}
}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: Location::Location()
+// Purpose: Constructor
+// Created: 11/11/03
+//
+// --------------------------------------------------------------------------
+Location::Location()
+ : mIDMapIndex(0),
+ mpExcludeFiles(0),
+ mpExcludeDirs(0)
+{
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: Location::~Location()
+// Purpose: Destructor
+// Created: 11/11/03
+//
+// --------------------------------------------------------------------------
+Location::~Location()
+{
+ // Clean up exclude locations
+ if(mpExcludeDirs != 0)
+ {
+ delete mpExcludeDirs;
+ mpExcludeDirs = 0;
+ }
+ if(mpExcludeFiles != 0)
+ {
+ delete mpExcludeFiles;
+ mpExcludeFiles = 0;
+ }
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: Location::Serialize(Archive & rArchive)
+// Purpose: Serializes this object instance into a stream of bytes,
+// using an Archive abstraction.
+//
+// Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void Location::Serialize(Archive & rArchive) const
+{
+ //
+ //
+ //
+ rArchive.Write(mName);
+ rArchive.Write(mPath);
+ rArchive.Write(mIDMapIndex);
+
+ //
+ //
+ //
+ if(mpDirectoryRecord.get() == NULL)
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+ rArchive.Write(aMagicMarker);
+ }
+ else
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+ rArchive.Write(aMagicMarker);
+
+ mpDirectoryRecord->Serialize(rArchive);
+ }
+
+ //
+ //
+ //
+ if(!mpExcludeFiles)
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+ rArchive.Write(aMagicMarker);
+ }
+ else
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+ rArchive.Write(aMagicMarker);
+
+ mpExcludeFiles->Serialize(rArchive);
+ }
+
+ //
+ //
+ //
+ if(!mpExcludeDirs)
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+ rArchive.Write(aMagicMarker);
+ }
+ else
+ {
+ int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+ rArchive.Write(aMagicMarker);
+
+ mpExcludeDirs->Serialize(rArchive);
+ }
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: Location::Deserialize(Archive & rArchive)
+// Purpose: Deserializes this object instance from a stream of bytes, using an Archive abstraction.
+//
+// Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void Location::Deserialize(Archive &rArchive)
+{
+ //
+ //
+ //
+ mpDirectoryRecord.reset(NULL);
+ if(mpExcludeFiles)
+ {
+ delete mpExcludeFiles;
+ mpExcludeFiles = NULL;
+ }
+ if(mpExcludeDirs)
+ {
+ delete mpExcludeDirs;
+ mpExcludeDirs = NULL;
+ }
+
+ //
+ //
+ //
+ rArchive.Read(mName);
+ rArchive.Read(mPath);
+ rArchive.Read(mIDMapIndex);
+
+ //
+ //
+ //
+ int64_t aMagicMarker = 0;
+ rArchive.Read(aMagicMarker);
+
+ if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+ {
+ // NOOP
+ }
+ else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+ {
+ BackupClientDirectoryRecord *pSubRecord = new BackupClientDirectoryRecord(0, "");
+ if(!pSubRecord)
+ {
+ throw std::bad_alloc();
+ }
+
+ mpDirectoryRecord.reset(pSubRecord);
+ mpDirectoryRecord->Deserialize(rArchive);
+ }
+ else
+ {
+ // there is something going on here
+ THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
+ }
+
+ //
+ //
+ //
+ rArchive.Read(aMagicMarker);
+
+ if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+ {
+ // NOOP
+ }
+ else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+ {
+ mpExcludeFiles = new ExcludeList;
+ if(!mpExcludeFiles)
+ {
+ throw std::bad_alloc();
+ }
+
+ mpExcludeFiles->Deserialize(rArchive);
+ }
+ else
+ {
+ // there is something going on here
+ THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
+ }
+
+ //
+ //
+ //
+ rArchive.Read(aMagicMarker);
+
+ if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+ {
+ // NOOP
+ }
+ else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+ {
+ mpExcludeDirs = new ExcludeList;
+ if(!mpExcludeDirs)
+ {
+ throw std::bad_alloc();
+ }
+
+ mpExcludeDirs->Deserialize(rArchive);
+ }
+ else
+ {
+ // there is something going on here
+ THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
+ }
+}
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.h b/bin/bbackupd/BackupClientDirectoryRecord.h
index fce3fc04..fb9d7fc8 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.h
+++ b/bin/bbackupd/BackupClientDirectoryRecord.h
@@ -12,6 +12,7 @@
#include <string>
#include <map>
+#include <memory>
#include "BackupClientFileAttributes.h"
#include "BackupDaemonInterface.h"
@@ -21,9 +22,18 @@
#include "ReadLoggingStream.h"
#include "RunStatusProvider.h"
+#ifdef ENABLE_VSS
+# include <comdef.h>
+# include <Vss.h>
+# include <VsWriter.h>
+# include <VsBackup.h>
+#endif
+
class Archive;
class BackupClientContext;
class BackupDaemon;
+class ExcludeList;
+class Location;
// --------------------------------------------------------------------------
//
@@ -86,6 +96,7 @@ public:
ProgressNotifier &mrProgressNotifier;
BackupClientContext &mrContext;
bool mReadErrorsOnFilesystemObjects;
+ int64_t mMaxUploadRate;
// Member variables modified by syncing process
box_time_t mUploadAfterThisTimeInTheFuture;
@@ -124,8 +135,14 @@ public:
int64_t ContainingDirectoryID,
const std::string &rLocalPath,
const std::string &rRemotePath,
+ const Location& rBackupLocation,
bool ThisDirHasJustBeenCreated = false);
+ std::string ConvertVssPathToRealPath(const std::string &rVssPath,
+ const Location& rBackupLocation);
+
+ int64_t GetObjectID() const { return mObjectID; }
+
private:
void DeleteSubDirectories();
BackupStoreDirectory *FetchDirectoryListing(SyncParams &rParams);
@@ -134,27 +151,34 @@ private:
const std::string &rLocalPath);
bool UpdateItems(SyncParams &rParams, const std::string &rLocalPath,
const std::string &rRemotePath,
+ const Location& rBackupLocation,
BackupStoreDirectory *pDirOnStore,
std::vector<BackupStoreDirectory::Entry *> &rEntriesLeftOver,
std::vector<std::string> &rFiles,
const std::vector<std::string> &rDirs);
int64_t UploadFile(SyncParams &rParams,
const std::string &rFilename,
+ const std::string &rNonVssFilePath,
const BackupStoreFilename &rStoreFilename,
int64_t FileSize, box_time_t ModificationTime,
box_time_t AttributesHash, bool NoPreviousVersionOnServer);
void SetErrorWhenReadingFilesystemObject(SyncParams &rParams,
- const char *Filename);
+ const std::string& rFilename);
void RemoveDirectoryInPlaceOfFile(SyncParams &rParams,
BackupStoreDirectory* pDirOnStore,
BackupStoreDirectory::Entry* pEntry,
const std::string &rFilename);
+ std::string DecryptFilename(BackupStoreDirectory::Entry *en,
+ const std::string& rRemoteDirectoryPath);
+ std::string DecryptFilename(BackupStoreFilenameClear fn,
+ int64_t filenameObjectID,
+ const std::string& rRemoteDirectoryPath);
-private:
int64_t mObjectID;
std::string mSubDirName;
bool mInitialSyncDone;
bool mSyncDone;
+ bool mSuppressMultipleLinksWarning;
// Checksum of directory contents and attributes, used to detect changes
uint8_t mStateChecksum[MD5Digest::DigestLength];
@@ -166,6 +190,32 @@ private:
// waste a lot of memory because of STL allocation policies.
};
+class Location
+{
+public:
+ Location();
+ ~Location();
+
+ void Deserialize(Archive & rArchive);
+ void Serialize(Archive & rArchive) const;
+private:
+ Location(const Location &); // copy not allowed
+ Location &operator=(const Location &);
+public:
+ std::string mName;
+ std::string mPath;
+ std::auto_ptr<BackupClientDirectoryRecord> mpDirectoryRecord;
+ int mIDMapIndex;
+ ExcludeList *mpExcludeFiles;
+ ExcludeList *mpExcludeDirs;
+
+#ifdef ENABLE_VSS
+ bool mIsSnapshotCreated;
+ VSS_ID mSnapshotVolumeId;
+ std::string mSnapshotPath;
+#endif
+};
+
#endif // BACKUPCLIENTDIRECTORYRECORD__H
diff --git a/bin/bbackupd/BackupClientInodeToIDMap.cpp b/bin/bbackupd/BackupClientInodeToIDMap.cpp
index b9f56c5a..8240d62c 100644
--- a/bin/bbackupd/BackupClientInodeToIDMap.cpp
+++ b/bin/bbackupd/BackupClientInodeToIDMap.cpp
@@ -9,32 +9,53 @@
#include "Box.h"
-#ifdef HAVE_DB
- // Include db headers and other OS files if they're needed for the disc implementation
- #include <sys/types.h>
- #include <fcntl.h>
- #include <limits.h>
- #include <db.h>
- #include <sys/stat.h>
-#endif
+#include <stdlib.h>
+#include <depot.h>
#define BACKIPCLIENTINODETOIDMAP_IMPLEMENTATION
#include "BackupClientInodeToIDMap.h"
+#undef BACKIPCLIENTINODETOIDMAP_IMPLEMENTATION
#include "BackupStoreException.h"
-
#include "MemLeakFindOn.h"
-// What type of Berkeley DB shall we use?
-#define TABLE_DATABASE_TYPE DB_HASH
-
typedef struct
{
int64_t mObjectID;
int64_t mInDirectory;
} IDBRecord;
+#define BOX_DBM_MESSAGE(stuff) stuff << " (qdbm): " << dperrmsg(dpecode)
+
+#define BOX_LOG_DBM_ERROR(stuff) \
+ BOX_ERROR(BOX_DBM_MESSAGE(stuff))
+
+#define THROW_DBM_ERROR(message, filename, exception, subtype) \
+ BOX_LOG_DBM_ERROR(message << ": " << filename); \
+ THROW_EXCEPTION_MESSAGE(exception, subtype, \
+ BOX_DBM_MESSAGE(message << ": " << filename));
+
+#define ASSERT_DBM_OK(operation, message, filename, exception, subtype) \
+ if(!(operation)) \
+ { \
+ THROW_DBM_ERROR(message, filename, exception, subtype); \
+ }
+
+#define ASSERT_DBM_OPEN() \
+ if(mpDepot == 0) \
+ { \
+ THROW_EXCEPTION_MESSAGE(BackupStoreException, InodeMapNotOpen, \
+ "Inode database not open"); \
+ }
+
+#define ASSERT_DBM_CLOSED() \
+ if(mpDepot != 0) \
+ { \
+ THROW_EXCEPTION_MESSAGE(CommonException, Internal, \
+ "Inode database already open: " << mFilename); \
+ }
+
// --------------------------------------------------------------------------
//
// Function
@@ -44,11 +65,9 @@ typedef struct
//
// --------------------------------------------------------------------------
BackupClientInodeToIDMap::BackupClientInodeToIDMap()
-#ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
: mReadOnly(true),
mEmpty(false),
- dbp(0)
-#endif
+ mpDepot(0)
{
}
@@ -62,19 +81,12 @@ BackupClientInodeToIDMap::BackupClientInodeToIDMap()
// --------------------------------------------------------------------------
BackupClientInodeToIDMap::~BackupClientInodeToIDMap()
{
-#ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- if(dbp != 0)
+ if(mpDepot != 0)
{
-#if BDB_VERSION_MAJOR >= 3
- dbp->close(0);
-#else
- dbp->close(dbp);
-#endif
+ Close();
}
-#endif
}
-
// --------------------------------------------------------------------------
//
// Function
@@ -83,56 +95,59 @@ BackupClientInodeToIDMap::~BackupClientInodeToIDMap()
// Created: 20/11/03
//
// --------------------------------------------------------------------------
-void BackupClientInodeToIDMap::Open(const char *Filename, bool ReadOnly, bool CreateNew)
+void BackupClientInodeToIDMap::Open(const char *Filename, bool ReadOnly,
+ bool CreateNew)
{
-#ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
+ mFilename = Filename;
+
// Correct arguments?
ASSERT(!(CreateNew && ReadOnly));
// Correct usage?
- ASSERT(dbp == 0);
+ ASSERT_DBM_CLOSED();
ASSERT(!mEmpty);
// Open the database file
-#if BDB_VERSION_MAJOR >= 3
- dbp = new Db(0,0);
- dbp->set_pagesize(1024); /* Page size: 1K. */
- dbp->set_cachesize(0, 32 * 1024, 0);
- dbp->open(NULL, Filename, NULL, DB_HASH, DB_CREATE, 0664);
-#else
- dbp = dbopen(Filename, (CreateNew?O_CREAT:0) | (ReadOnly?O_RDONLY:O_RDWR), S_IRUSR | S_IWUSR | S_IRGRP, TABLE_DATABASE_TYPE, NULL);
-#endif
- if(dbp == NULL)
+ int mode = ReadOnly ? DP_OREADER : DP_OWRITER;
+ if(CreateNew)
{
- THROW_EXCEPTION(BackupStoreException, BerkelyDBFailure);
+ mode |= DP_OCREAT;
+ }
+
+ mpDepot = dpopen(Filename, mode, 0);
+
+ if(!mpDepot)
+ {
+ BOX_WARNING(BOX_DBM_MESSAGE("Failed to open inode "
+ "database: " << mFilename));
+ THROW_EXCEPTION_MESSAGE(BackupStoreException, BerkelyDBFailure,
+ BOX_DBM_MESSAGE("Failed to open inode database: " <<
+ mFilename));
}
// Read only flag
mReadOnly = ReadOnly;
-#endif
}
// --------------------------------------------------------------------------
//
// Function
// Name: BackupClientInodeToIDMap::OpenEmpty()
-// Purpose: 'Open' this map. Not associated with a disc file. Useful for when a map
-// is required, but is against an empty file on disc which shouldn't be created.
-// Implies read only.
+// Purpose: 'Open' this map. Not associated with a disc file.
+// Useful for when a map is required, but is against
+// an empty file on disc which shouldn't be created.
+// Implies read only.
// Created: 20/11/03
//
// --------------------------------------------------------------------------
void BackupClientInodeToIDMap::OpenEmpty()
{
-#ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- ASSERT(dbp == 0);
+ ASSERT_DBM_CLOSED();
+ ASSERT(mpDepot == 0);
mEmpty = true;
mReadOnly = true;
-#endif
}
-
-
// --------------------------------------------------------------------------
//
// Function
@@ -143,75 +158,46 @@ void BackupClientInodeToIDMap::OpenEmpty()
// --------------------------------------------------------------------------
void BackupClientInodeToIDMap::Close()
{
-#ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- if(dbp != 0)
- {
-#if BDB_VERSION_MAJOR >= 3
- if(dbp->close(0) != 0)
-#else
- if(dbp->close(dbp) != 0)
-#endif
- {
- THROW_EXCEPTION(BackupStoreException, BerkelyDBFailure);
- }
- dbp = 0;
- }
-#endif
+ ASSERT_DBM_OPEN();
+ ASSERT_DBM_OK(dpclose(mpDepot), "Failed to close inode database",
+ mFilename, BackupStoreException, BerkelyDBFailure);
+ mpDepot = 0;
}
-
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupClientInodeToIDMap::AddToMap(InodeRefType, int64_t, int64_t)
-// Purpose: Adds an entry to the map. Overwrites any existing entry.
+// Name: BackupClientInodeToIDMap::AddToMap(InodeRefType,
+// int64_t, int64_t)
+// Purpose: Adds an entry to the map. Overwrites any existing
+// entry.
// Created: 11/11/03
//
// --------------------------------------------------------------------------
-void BackupClientInodeToIDMap::AddToMap(InodeRefType InodeRef, int64_t ObjectID, int64_t InDirectory)
+void BackupClientInodeToIDMap::AddToMap(InodeRefType InodeRef, int64_t ObjectID,
+ int64_t InDirectory)
{
-#ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- mMap[InodeRef] = std::pair<int64_t, int64_t>(ObjectID, InDirectory);
-#else
if(mReadOnly)
{
THROW_EXCEPTION(BackupStoreException, InodeMapIsReadOnly);
}
- if(dbp == 0)
+ if(mpDepot == 0)
{
THROW_EXCEPTION(BackupStoreException, InodeMapNotOpen);
}
+ ASSERT_DBM_OPEN();
+
// Setup structures
IDBRecord rec;
rec.mObjectID = ObjectID;
rec.mInDirectory = InDirectory;
-#if BDB_VERSION_MAJOR >= 3
- Dbt key(&InodeRef, sizeof(InodeRef));
- Dbt data(&rec, sizeof(rec));
-
- if (dbp->put(0, &key, &data, 0) != 0) {
- THROW_EXCEPTION(BackupStoreException, BerkelyDBFailure);
- }
-#else
-
- DBT key;
- key.data = &InodeRef;
- key.size = sizeof(InodeRef);
-
- DBT data;
- data.data = &rec;
- data.size = sizeof(rec);
-
- // Add to map (or replace existing entry)
- if(dbp->put(dbp, &key, &data, 0) != 0)
- {
- THROW_EXCEPTION(BackupStoreException, BerkelyDBFailure);
- }
-#endif
-#endif
+ ASSERT_DBM_OK(dpput(mpDepot, (const char *)&InodeRef, sizeof(InodeRef),
+ (const char *)&rec, sizeof(rec), DP_DOVER),
+ "Failed to add record to inode database", mFilename,
+ BackupStoreException, BerkelyDBFailure);
}
// --------------------------------------------------------------------------
@@ -228,100 +214,32 @@ void BackupClientInodeToIDMap::AddToMap(InodeRefType InodeRef, int64_t ObjectID,
bool BackupClientInodeToIDMap::Lookup(InodeRefType InodeRef,
int64_t &rObjectIDOut, int64_t &rInDirectoryOut) const
{
-#ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- std::map<InodeRefType, std::pair<int64_t, int64_t> >::const_iterator i(mMap.find(InodeRef));
-
- // Found?
- if(i == mMap.end())
- {
- return false;
- }
-
- // Yes. Return the details
- rObjectIDOut = i->second.first;
- rInDirectoryOut = i->second.second;
- return true;
-#else
if(mEmpty)
{
// Map is empty
return false;
}
- if(dbp == 0)
+ if(mpDepot == 0)
{
THROW_EXCEPTION(BackupStoreException, InodeMapNotOpen);
}
-
-#if BDB_VERSION_MAJOR >= 3
- Dbt key(&InodeRef, sizeof(InodeRef));
- Dbt data(0, 0);
- switch(dbp->get(NULL, &key, &data, 0))
-#else
- DBT key;
- key.data = &InodeRef;
- key.size = sizeof(InodeRef);
- DBT data;
- data.data = 0;
- data.size = 0;
+ ASSERT_DBM_OPEN();
- switch(dbp->get(dbp, &key, &data, 0))
-#endif
+ IDBRecord rec;
+ if(dpgetwb(mpDepot, (const char *)&InodeRef, sizeof(InodeRef),
+ 0, sizeof(IDBRecord), (char *)&rec) == -1)
{
- case 1: // key not in file
+ // key not in file
return false;
-
- case -1: // error
- default: // not specified in docs
- THROW_EXCEPTION(BackupStoreException, BerkelyDBFailure);
- return false;
-
- case 0: // success, found it
- break;
}
-
- // Check for sensible return
-#if BDB_VERSION_MAJOR >= 3
- if(key.get_data() == 0 || data.get_size() != sizeof(IDBRecord))
- {
- // Assert in debug version
- ASSERT(key.get_data() == 0 || data.get_size() != sizeof(IDBRecord));
- // Invalid entries mean it wasn't found
- return false;
- }
-
- // Data alignment isn't guaranteed to be on a suitable boundary
- IDBRecord rec;
-
- ::memcpy(&rec, data.get_data(), sizeof(rec));
-#else
- if(key.data == 0 || data.size != sizeof(IDBRecord))
- {
- // Assert in debug version
- ASSERT(key.data == 0 || data.size != sizeof(IDBRecord));
-
- // Invalid entries mean it wasn't found
- return false;
- }
-
- // Data alignment isn't guaranteed to be on a suitable boundary
- IDBRecord rec;
-
- ::memcpy(&rec, data.data, sizeof(rec));
-#endif
-
// Return data
rObjectIDOut = rec.mObjectID;
rInDirectoryOut = rec.mInDirectory;
- // Don't have to worry about freeing the returned data
-
// Found
return true;
-#endif
}
-
-
diff --git a/bin/bbackupd/BackupClientInodeToIDMap.h b/bin/bbackupd/BackupClientInodeToIDMap.h
index 1dfef702..fbe45114 100644
--- a/bin/bbackupd/BackupClientInodeToIDMap.h
+++ b/bin/bbackupd/BackupClientInodeToIDMap.h
@@ -8,25 +8,16 @@
// --------------------------------------------------------------------------
#ifndef BACKUPCLIENTINODETOIDMAP_H
-#define BACKUPCLIENTINODETOIDMAP__H
+#define BACKUPCLIENTINODETOIDMAP_H
#include <sys/types.h>
#include <map>
#include <utility>
-// Use in memory implementation if there isn't access to the Berkely DB on this platform
-#ifndef HAVE_DB
- #define BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
-#endif
-
// avoid having to include the DB files when not necessary
#ifndef BACKIPCLIENTINODETOIDMAP_IMPLEMENTATION
-#ifdef BERKELY_V4
- class Db;
-#else
- class DB;
-#endif
+ class DEPOT;
#endif
// --------------------------------------------------------------------------
@@ -55,19 +46,12 @@ public:
void Close();
private:
-#ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- std::map<InodeRefType, std::pair<int64_t, int64_t> > mMap;
-#else
bool mReadOnly;
bool mEmpty;
-#ifdef BERKELY_V4
- Db *dbp; // c++ style implimentation
-#else
- DB *dbp; // C style interface, use notation from documentation
-#endif // BERKELY_V4
-#endif // BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
+ std::string mFilename;
+ DEPOT *mpDepot;
};
-#endif // BACKUPCLIENTINODETOIDMAP__H
+#endif // BACKUPCLIENTINODETOIDMAP_H
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index b6f90cad..39bb98e3 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -40,6 +40,8 @@
#endif
#include <iostream>
+#include <set>
+#include <sstream>
#include "Configuration.h"
#include "IOStream.h"
@@ -49,7 +51,7 @@
#include "SSLLib.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
#include "autogen_ClientException.h"
#include "autogen_ConversionException.h"
#include "Archive.h"
@@ -82,6 +84,85 @@
#include "Win32BackupService.h"
extern Win32BackupService* gpDaemonService;
+
+# ifdef ENABLE_VSS
+# include <comdef.h>
+# include <Vss.h>
+# include <VsWriter.h>
+# include <VsBackup.h>
+
+ // http://www.flounder.com/cstring.htm
+ std::string GetMsgForHresult(HRESULT hr)
+ {
+ std::ostringstream buf;
+
+ if(hr == VSS_S_ASYNC_CANCELLED)
+ {
+ buf << "VSS async operation cancelled";
+ }
+ else if(hr == VSS_S_ASYNC_FINISHED)
+ {
+ buf << "VSS async operation finished";
+ }
+ else if(hr == VSS_S_ASYNC_PENDING)
+ {
+ buf << "VSS async operation pending";
+ }
+ else
+ {
+ buf << _com_error(hr).ErrorMessage();
+ }
+
+ buf << " (" << BOX_FORMAT_HEX32(hr) << ")";
+ return buf.str();
+ }
+
+ std::string WideStringToString(WCHAR *buf)
+ {
+ if (buf == NULL)
+ {
+ return "(null)";
+ }
+
+ char* pStr = ConvertFromWideString(buf, CP_UTF8);
+
+ if(pStr == NULL)
+ {
+ return "(conversion failed)";
+ }
+
+ std::string result(pStr);
+ free(pStr);
+ return result;
+ }
+
+ std::string GuidToString(GUID guid)
+ {
+ wchar_t buf[64];
+ StringFromGUID2(guid, buf, sizeof(buf));
+ return WideStringToString(buf);
+ }
+
+ std::string BstrToString(const BSTR arg)
+ {
+ if(arg == NULL)
+ {
+ return std::string("(null)");
+ }
+ else
+ {
+ // Extract the *long* before where the arg points to
+ long len = ((long *)arg)[-1] / 2;
+ std::wstring wstr((WCHAR *)arg, len);
+ std::string str;
+ if(!ConvertFromWideString(wstr, &str, CP_UTF8))
+ {
+ throw std::exception("string conversion failed");
+ }
+ return str;
+ }
+ }
+# endif
#endif
#include "MemLeakFindOn.h"
@@ -114,6 +195,9 @@ BackupDaemon::BackupDaemon()
mUpdateStoreInterval(0),
mDeleteStoreObjectInfoFile(false),
mDoSyncForcedByPreviousSyncError(false),
+ mNumFilesUploaded(-1),
+ mNumDirsCreated(-1),
+ mMaxBandwidthFromSyncAllowScript(0),
mLogAllFileAccess(false),
mpProgressNotifier(this),
mpLocationResolver(this),
@@ -125,6 +209,9 @@ BackupDaemon::BackupDaemon()
mRunAsService(false),
mServiceName("bbackupd")
#endif
+#ifdef ENABLE_VSS
+ , mpVssBackupComponents(NULL)
+#endif
{
// Only ever one instance of a daemon
SSLLib::Initialise();
@@ -239,7 +326,7 @@ void BackupDaemon::SetupInInitialProcess()
void BackupDaemon::DeleteAllLocations()
{
// Run through, and delete everything
- for(std::vector<Location *>::iterator i = mLocations.begin();
+ for(Locations::iterator i = mLocations.begin();
i != mLocations.end(); ++i)
{
delete *i;
@@ -311,6 +398,16 @@ int BackupDaemon::Main(const std::string &rConfigFileName)
return RemoveService(mServiceName);
}
+#ifdef ENABLE_VSS
+ HRESULT result = CoInitialize(NULL);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to initialize COM: " <<
+ GetMsgForHresult(result));
+ return 1;
+ }
+#endif
+
int returnCode;
if (mRunAsService)
@@ -416,7 +513,7 @@ void BackupDaemon::InitCrypto()
keyFile.c_str(), caFile.c_str());
// Set up the keys for various things
- BackupClientCryptoKeys_Setup(conf.GetKeyValue("KeysFile").c_str());
+ BackupClientCryptoKeys_Setup(conf.GetKeyValue("KeysFile"));
}
// --------------------------------------------------------------------------
@@ -573,15 +670,14 @@ void BackupDaemon::Run2()
void BackupDaemon::RunSyncNowWithExceptionHandling()
{
- OnBackupStart();
-
- // Do sync
bool errorOccurred = false;
int errorCode = 0, errorSubCode = 0;
const char* errorString = "unknown";
try
{
+ OnBackupStart();
+ // Do sync
RunSyncNow();
}
catch(BoxException &e)
@@ -607,6 +703,7 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
// do not retry immediately without a good reason
mDoSyncForcedByPreviousSyncError = false;
+ // Notify system administrator about the final state of the backup
if(errorOccurred)
{
// Is it a berkely db failure?
@@ -624,12 +721,7 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
DeleteCorruptBerkelyDbFiles();
}
- // Clear state data
- // Go back to beginning of time
- mLastSyncTime = 0;
- mClientStoreMarker = BackupClientContext::ClientStoreMarker_NotKnown; // no store marker, so download everything
- DeleteAllLocations();
- DeleteAllIDMaps();
+ ResetCachedState();
// Handle restart?
if(StopRun())
@@ -668,16 +760,19 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
}
}
- // Notify system administrator about the final state of the backup
- else if(mReadErrorsOnFilesystemObjects)
+
+ if(mReadErrorsOnFilesystemObjects)
{
NotifySysadmin(SysadminNotifier::ReadError);
}
- else if(mStorageLimitExceeded)
+
+ if(mStorageLimitExceeded)
{
NotifySysadmin(SysadminNotifier::StoreFull);
}
- else
+
+ if (!errorOccurred && !mReadErrorsOnFilesystemObjects &&
+ !mStorageLimitExceeded)
{
NotifySysadmin(SysadminNotifier::BackupOK);
}
@@ -689,6 +784,16 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
OnBackupFinish();
}
+void BackupDaemon::ResetCachedState()
+{
+ // Clear state data
+ // Go back to beginning of time
+ mLastSyncTime = 0;
+ mClientStoreMarker = BackupClientContext::ClientStoreMarker_NotKnown; // no store marker, so download everything
+ DeleteAllLocations();
+ DeleteAllIDMaps();
+}
+
void BackupDaemon::RunSyncNow()
{
// Delete the serialised store object file,
@@ -746,7 +851,9 @@ void BackupDaemon::RunSyncNow()
conf.GetKeyValueUint32("AccountNumber"),
conf.GetKeyValueBool("ExtendedLogging"),
conf.KeyExists("ExtendedLogFile"),
- extendedLogFile, *mpProgressNotifier
+ extendedLogFile,
+ *mpProgressNotifier,
+ conf.GetKeyValueBool("TcpNice")
);
// The minimum age a file needs to be before it will be
@@ -830,6 +937,19 @@ void BackupDaemon::RunSyncNow()
conf.GetKeyValueInt("DiffingUploadSizeThreshold");
params.mMaxFileTimeInFuture =
SecondsToBoxTime(conf.GetKeyValueInt("MaxFileTimeInFuture"));
+ mNumFilesUploaded = 0;
+ mNumDirsCreated = 0;
+
+ if(conf.KeyExists("MaxUploadRate"))
+ {
+ params.mMaxUploadRate = conf.GetKeyValueInt("MaxUploadRate");
+ }
+
+ if(mMaxBandwidthFromSyncAllowScript != 0)
+ {
+ params.mMaxUploadRate = mMaxBandwidthFromSyncAllowScript;
+ }
+
mDeleteRedundantLocationsAfter =
conf.GetKeyValueInt("DeleteRedundantLocationsAfter");
mStorageLimitExceeded = false;
@@ -858,7 +978,6 @@ void BackupDaemon::RunSyncNow()
// Set up the locations, if necessary --
// need to do it here so we have a
// (potential) connection to use
- if(mLocations.empty())
{
const Configuration &locations(
conf.GetSubConfiguration(
@@ -876,9 +995,13 @@ void BackupDaemon::RunSyncNow()
// Delete any unused directories?
DeleteUnusedRootDirEntries(clientContext);
+
+#ifdef ENABLE_VSS
+ CreateVssBackupComponents();
+#endif
// Go through the records, syncing them
- for(std::vector<Location *>::const_iterator
+ for(Locations::const_iterator
i(mLocations.begin());
i != mLocations.end(); ++i)
{
@@ -894,10 +1017,17 @@ void BackupDaemon::RunSyncNow()
(*i)->mpExcludeDirs);
// Sync the directory
- (*i)->mpDirectoryRecord->SyncDirectory(
- params,
- BackupProtocolClientListDirectory::RootDirectory,
- (*i)->mPath, std::string("/") + (*i)->mName);
+ std::string locationPath = (*i)->mPath;
+#ifdef ENABLE_VSS
+ if((*i)->mIsSnapshotCreated)
+ {
+ locationPath = (*i)->mSnapshotPath;
+ }
+#endif
+
+ (*i)->mpDirectoryRecord->SyncDirectory(params,
+ BackupProtocolListDirectory::RootDirectory,
+ locationPath, std::string("/") + (*i)->mName, **i);
// Unset exclude lists (just in case)
clientContext.SetExcludeLists(0, 0);
@@ -910,11 +1040,15 @@ void BackupDaemon::RunSyncNow()
// Close any open connection
clientContext.CloseAnyOpenConnection();
-
+
+#ifdef ENABLE_VSS
+ CleanupVssBackupComponents();
+#endif
+
// Get the new store marker
mClientStoreMarker = clientContext.GetClientStoreMarker();
mStorageLimitExceeded = clientContext.StorageLimitExceeded();
- mReadErrorsOnFilesystemObjects =
+ mReadErrorsOnFilesystemObjects |=
params.mReadErrorsOnFilesystemObjects;
if(!mStorageLimitExceeded)
@@ -948,6 +1082,562 @@ void BackupDaemon::RunSyncNow()
// --------------------------------------------------------------------------------------------
}
+#ifdef ENABLE_VSS
+bool BackupDaemon::WaitForAsync(IVssAsync *pAsync,
+ const std::string& description)
+{
+ BOX_INFO("VSS: waiting for " << description << " to complete");
+ HRESULT result;
+
+ do
+ {
+ result = pAsync->Wait(1000);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to wait for " << description <<
+ " to complete: " << GetMsgForHresult(result));
+ break;
+ }
+
+ HRESULT result2;
+ result = pAsync->QueryStatus(&result2, NULL);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to query " << description <<
+ " status: " << GetMsgForHresult(result));
+ break;
+ }
+
+ result = result2;
+ BOX_INFO("VSS: " << description << " status: " <<
+ GetMsgForHresult(result));
+ }
+ while(result == VSS_S_ASYNC_PENDING);
+
+ pAsync->Release();
+
+ return (result == VSS_S_ASYNC_FINISHED);
+}
+
+#define CALL_MEMBER_FN(object, method) ((object).*(method))
+
+bool BackupDaemon::CallAndWaitForAsync(AsyncMethod method,
+ const std::string& description)
+{
+ IVssAsync *pAsync;
+ HRESULT result = CALL_MEMBER_FN(*mpVssBackupComponents, method)(&pAsync);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: " << description << " failed: " <<
+ GetMsgForHresult(result));
+ return false;
+ }
+
+ return WaitForAsync(pAsync, description);
+}
+
+void FreeSnapshotProp(VSS_SNAPSHOT_PROP *pSnap)
+{
+ CoTaskMemFree(pSnap->m_pwszSnapshotDeviceObject);
+ CoTaskMemFree(pSnap->m_pwszOriginalVolumeName);
+ CoTaskMemFree(pSnap->m_pwszOriginatingMachine);
+ CoTaskMemFree(pSnap->m_pwszServiceMachine);
+ CoTaskMemFree(pSnap->m_pwszExposedName);
+ CoTaskMemFree(pSnap->m_pwszExposedPath);
+}
+
+void BackupDaemon::CreateVssBackupComponents()
+{
+ std::map<char, VSS_ID> volumesIncluded;
+
+ HRESULT result = ::CreateVssBackupComponents(&mpVssBackupComponents);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to create backup components: " <<
+ GetMsgForHresult(result));
+ return;
+ }
+
+ result = mpVssBackupComponents->InitializeForBackup(NULL);
+ if(result != S_OK)
+ {
+ std::string message = GetMsgForHresult(result);
+
+ if (result == VSS_E_UNEXPECTED)
+ {
+ message = "Check the Application Log for details, and ensure "
+ "that the Volume Shadow Copy, COM+ System Application, "
+ "and Distributed Transaction Coordinator services "
+ "are running";
+ }
+
+ BOX_ERROR("VSS: Failed to initialize for backup: " << message);
+ return;
+ }
+
+ result = mpVssBackupComponents->SetContext(VSS_CTX_BACKUP);
+ if(result == E_NOTIMPL)
+ {
+ BOX_INFO("VSS: Failed to set context to VSS_CTX_BACKUP: "
+ "not implemented, probably Windows XP, ignored.");
+ }
+ else if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to set context to VSS_CTX_BACKUP: " <<
+ GetMsgForHresult(result));
+ return;
+ }
+
+ result = mpVssBackupComponents->SetBackupState(
+ false, /* no components for now */
+ true, /* might as well ask for a bootable backup */
+ VSS_BT_FULL,
+ false /* what is Partial File Support? */);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to set backup state: " <<
+ GetMsgForHresult(result));
+ return;
+ }
+
+ if(!CallAndWaitForAsync(&IVssBackupComponents::GatherWriterMetadata,
+ "GatherWriterMetadata()"))
+ {
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+
+ UINT writerCount;
+ result = mpVssBackupComponents->GetWriterMetadataCount(&writerCount);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get writer count: " <<
+ GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+
+ for(UINT iWriter = 0; iWriter < writerCount; iWriter++)
+ {
+ BOX_INFO("VSS: Getting metadata from writer " << iWriter);
+ VSS_ID writerInstance;
+ IVssExamineWriterMetadata* pMetadata;
+ result = mpVssBackupComponents->GetWriterMetadata(iWriter,
+ &writerInstance, &pMetadata);
+ if(result != S_OK)
+ {
+ BOX_ERROR("Failed to get VSS metadata from writer " << iWriter <<
+ ": " << GetMsgForHresult(result));
+ continue;
+ }
+
+ UINT includeFiles, excludeFiles, numComponents;
+ result = pMetadata->GetFileCounts(&includeFiles, &excludeFiles,
+ &numComponents);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get metadata file counts from "
+ "writer " << iWriter << ": " <<
+ GetMsgForHresult(result));
+ pMetadata->Release();
+ continue;
+ }
+
+ for(UINT iComponent = 0; iComponent < numComponents; iComponent++)
+ {
+ IVssWMComponent* pComponent;
+ result = pMetadata->GetComponent(iComponent, &pComponent);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get metadata component " <<
+ iComponent << " from writer " << iWriter << ": " <<
+ GetMsgForHresult(result));
+ continue;
+ }
+
+ PVSSCOMPONENTINFO pComponentInfo;
+ result = pComponent->GetComponentInfo(&pComponentInfo);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get metadata component " <<
+ iComponent << " info from writer " << iWriter << ": " <<
+ GetMsgForHresult(result));
+ pComponent->Release();
+ continue;
+ }
+
+ BOX_TRACE("VSS: writer " << iWriter << " component " <<
+ iComponent << " info:");
+ switch(pComponentInfo->type)
+ {
+ case VSS_CT_UNDEFINED: BOX_TRACE("VSS: type: undefined"); break;
+ case VSS_CT_DATABASE: BOX_TRACE("VSS: type: database"); break;
+ case VSS_CT_FILEGROUP: BOX_TRACE("VSS: type: filegroup"); break;
+ default:
+ BOX_WARNING("VSS: type: unknown (" << pComponentInfo->type << ")");
+ }
+
+ BOX_TRACE("VSS: logical path: " <<
+ BstrToString(pComponentInfo->bstrLogicalPath));
+ BOX_TRACE("VSS: component name: " <<
+ BstrToString(pComponentInfo->bstrComponentName));
+ BOX_TRACE("VSS: caption: " <<
+ BstrToString(pComponentInfo->bstrCaption));
+ BOX_TRACE("VSS: restore metadata: " <<
+ pComponentInfo->bRestoreMetadata);
+ BOX_TRACE("VSS: notify on complete: " <<
+ pComponentInfo->bRestoreMetadata);
+ BOX_TRACE("VSS: selectable: " <<
+ pComponentInfo->bSelectable);
+ BOX_TRACE("VSS: selectable for restore: " <<
+ pComponentInfo->bSelectableForRestore);
+ BOX_TRACE("VSS: component flags: " <<
+ BOX_FORMAT_HEX32(pComponentInfo->dwComponentFlags));
+ BOX_TRACE("VSS: file count: " <<
+ pComponentInfo->cFileCount);
+ BOX_TRACE("VSS: databases: " <<
+ pComponentInfo->cDatabases);
+ BOX_TRACE("VSS: log files: " <<
+ pComponentInfo->cLogFiles);
+ BOX_TRACE("VSS: dependencies: " <<
+ pComponentInfo->cDependencies);
+
+ pComponent->FreeComponentInfo(pComponentInfo);
+ pComponent->Release();
+ }
+
+ pMetadata->Release();
+ }
+
+ VSS_ID snapshotSetId;
+ result = mpVssBackupComponents->StartSnapshotSet(&snapshotSetId);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to start snapshot set: " <<
+ GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+
+ // Add all volumes included as backup locations to the snapshot set
+ for(Locations::iterator
+ iLocation = mLocations.begin();
+ iLocation != mLocations.end();
+ iLocation++)
+ {
+ Location& rLocation(**iLocation);
+ std::string path = rLocation.mPath;
+ // convert to absolute and remove Unicode prefix
+ path = ConvertPathToAbsoluteUnicode(path.c_str()).substr(4);
+
+ if(path.length() >= 3 && path[1] == ':' && path[2] == '\\')
+ {
+ std::string volumeRoot = path.substr(0, 3);
+
+ std::map<char, VSS_ID>::iterator i =
+ volumesIncluded.find(path[0]);
+
+ if(i == volumesIncluded.end())
+ {
+ std::wstring volumeRootWide;
+ volumeRootWide.push_back((WCHAR) path[0]);
+ volumeRootWide.push_back((WCHAR) ':');
+ volumeRootWide.push_back((WCHAR) '\\');
+ VSS_ID newVolumeId;
+ result = mpVssBackupComponents->AddToSnapshotSet(
+ (VSS_PWSZ)(volumeRootWide.c_str()), GUID_NULL,
+ &newVolumeId);
+ if(result == S_OK)
+ {
+ BOX_TRACE("VSS: Added volume " << volumeRoot <<
+ " for backup location " << path <<
+ " to snapshot set");
+ volumesIncluded[path[0]] = newVolumeId;
+ rLocation.mSnapshotVolumeId = newVolumeId;
+ rLocation.mIsSnapshotCreated = true;
+
+ // If the snapshot path starts with the volume root
+ // (drive letter), because the path is absolute (as
+ // it should be), then remove it so that the
+ // resulting snapshot path can be appended to the
+ // snapshot device object to make a real path,
+ // without a spurious drive letter in it.
+
+ if (path.substr(0, volumeRoot.length()) == volumeRoot)
+ {
+ path = path.substr(volumeRoot.length());
+ }
+
+ rLocation.mSnapshotPath = path;
+ }
+ else
+ {
+ BOX_ERROR("VSS: Failed to add volume " <<
+ volumeRoot << " to snapshot set: " <<
+ GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+ }
+ else
+ {
+ BOX_TRACE("VSS: Skipping already included volume " <<
+ volumeRoot << " for backup location " << path);
+ rLocation.mSnapshotVolumeId = i->second;
+ rLocation.mIsSnapshotCreated = true;
+ }
+ }
+ else
+ {
+ BOX_WARNING("VSS: Skipping backup location " << path <<
+ " which does not start with a volume specification");
+ }
+ }
+
+ if(!CallAndWaitForAsync(&IVssBackupComponents::PrepareForBackup,
+ "PrepareForBackup()"))
+ {
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+
+ if(!CallAndWaitForAsync(&IVssBackupComponents::DoSnapshotSet,
+ "DoSnapshotSet()"))
+ {
+ goto CreateVssBackupComponents_cleanup_WriterMetadata;
+ }
+
+ if(!CallAndWaitForAsync(&IVssBackupComponents::GatherWriterStatus,
+ "GatherWriterStatus()"))
+ {
+ goto CreateVssBackupComponents_cleanup_WriterStatus;
+ }
+
+ result = mpVssBackupComponents->GetWriterStatusCount(&writerCount);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get writer status count: " <<
+ GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterStatus;
+ }
+
+ for(UINT iWriter = 0; iWriter < writerCount; iWriter++)
+ {
+ VSS_ID instance, writer;
+ BSTR writerNameBstr;
+ VSS_WRITER_STATE writerState;
+ HRESULT writerResult;
+
+ result = mpVssBackupComponents->GetWriterStatus(iWriter,
+ &instance, &writer, &writerNameBstr, &writerState,
+ &writerResult);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to query writer " << iWriter <<
+ " status: " << GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterStatus;
+ }
+
+ std::string writerName = BstrToString(writerNameBstr);
+ ::SysFreeString(writerNameBstr);
+
+ if(writerResult != S_OK)
+ {
+ BOX_ERROR("VSS: Writer " << iWriter << " (" <<
+ writerName << ") failed: " <<
+ GetMsgForHresult(writerResult));
+ continue;
+ }
+
+ std::string stateName;
+
+ switch(writerState)
+ {
+#define WRITER_STATE(code) \
+ case code: stateName = #code; break;
+ WRITER_STATE(VSS_WS_UNKNOWN);
+ WRITER_STATE(VSS_WS_STABLE);
+ WRITER_STATE(VSS_WS_WAITING_FOR_FREEZE);
+ WRITER_STATE(VSS_WS_WAITING_FOR_THAW);
+ WRITER_STATE(VSS_WS_WAITING_FOR_POST_SNAPSHOT);
+ WRITER_STATE(VSS_WS_WAITING_FOR_BACKUP_COMPLETE);
+ WRITER_STATE(VSS_WS_FAILED_AT_IDENTIFY);
+ WRITER_STATE(VSS_WS_FAILED_AT_PREPARE_BACKUP);
+ WRITER_STATE(VSS_WS_FAILED_AT_PREPARE_SNAPSHOT);
+ WRITER_STATE(VSS_WS_FAILED_AT_FREEZE);
+ WRITER_STATE(VSS_WS_FAILED_AT_THAW);
+ WRITER_STATE(VSS_WS_FAILED_AT_POST_SNAPSHOT);
+ WRITER_STATE(VSS_WS_FAILED_AT_BACKUP_COMPLETE);
+ WRITER_STATE(VSS_WS_FAILED_AT_PRE_RESTORE);
+ WRITER_STATE(VSS_WS_FAILED_AT_POST_RESTORE);
+ WRITER_STATE(VSS_WS_FAILED_AT_BACKUPSHUTDOWN);
+#undef WRITER_STATE
+ default:
+ std::ostringstream o;
+ o << "unknown (" << writerState << ")";
+ stateName = o.str();
+ }
+
+ BOX_TRACE("VSS: Writer " << iWriter << " (" <<
+ writerName << ") is in state " << stateName);
+ }
+
+ // lookup new snapshot volume for each location that has a snapshot
+ for(Locations::iterator
+ iLocation = mLocations.begin();
+ iLocation != mLocations.end();
+ iLocation++)
+ {
+ Location& rLocation(**iLocation);
+ if(rLocation.mIsSnapshotCreated)
+ {
+ VSS_SNAPSHOT_PROP prop;
+ result = mpVssBackupComponents->GetSnapshotProperties(
+ rLocation.mSnapshotVolumeId, &prop);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to get snapshot properties "
+ "for volume " << GuidToString(rLocation.mSnapshotVolumeId) <<
+ " for location " << rLocation.mPath << ": " <<
+ GetMsgForHresult(result));
+ rLocation.mIsSnapshotCreated = false;
+ continue;
+ }
+
+ rLocation.mSnapshotPath =
+ WideStringToString(prop.m_pwszSnapshotDeviceObject) +
+ DIRECTORY_SEPARATOR + rLocation.mSnapshotPath;
+ FreeSnapshotProp(&prop);
+
+ BOX_INFO("VSS: Location " << rLocation.mPath << " using "
+ "snapshot path " << rLocation.mSnapshotPath);
+ }
+ }
+
+ IVssEnumObject *pEnum;
+ result = mpVssBackupComponents->Query(GUID_NULL, VSS_OBJECT_NONE,
+ VSS_OBJECT_SNAPSHOT, &pEnum);
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to query snapshot list: " <<
+ GetMsgForHresult(result));
+ goto CreateVssBackupComponents_cleanup_WriterStatus;
+ }
+
+ while(result == S_OK)
+ {
+ VSS_OBJECT_PROP rgelt;
+ ULONG count;
+ result = pEnum->Next(1, &rgelt, &count);
+
+ if(result == S_FALSE)
+ {
+ // end of list, break out of the loop
+ break;
+ }
+ else if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to enumerate snapshot: " <<
+ GetMsgForHresult(result));
+ }
+ else if(count != 1)
+ {
+ BOX_ERROR("VSS: Failed to enumerate snapshot: " <<
+ "Next() returned " << count << " objects instead of 1");
+ }
+ else if(rgelt.Type != VSS_OBJECT_SNAPSHOT)
+ {
+ BOX_ERROR("VSS: Failed to enumerate snapshot: " <<
+ "Next() returned a type " << rgelt.Type << " object "
+ "instead of VSS_OBJECT_SNAPSHOT");
+ }
+ else
+ {
+ VSS_SNAPSHOT_PROP *pSnap = &rgelt.Obj.Snap;
+ BOX_TRACE("VSS: Snapshot ID: " <<
+ GuidToString(pSnap->m_SnapshotId));
+ BOX_TRACE("VSS: Snapshot set ID: " <<
+ GuidToString(pSnap->m_SnapshotSetId));
+ BOX_TRACE("VSS: Number of volumes: " <<
+ pSnap->m_lSnapshotsCount);
+ BOX_TRACE("VSS: Snapshot device object: " <<
+ WideStringToString(pSnap->m_pwszSnapshotDeviceObject));
+ BOX_TRACE("VSS: Original volume name: " <<
+ WideStringToString(pSnap->m_pwszOriginalVolumeName));
+ BOX_TRACE("VSS: Originating machine: " <<
+ WideStringToString(pSnap->m_pwszOriginatingMachine));
+ BOX_TRACE("VSS: Service machine: " <<
+ WideStringToString(pSnap->m_pwszServiceMachine));
+ BOX_TRACE("VSS: Exposed name: " <<
+ WideStringToString(pSnap->m_pwszExposedName));
+ BOX_TRACE("VSS: Exposed path: " <<
+ WideStringToString(pSnap->m_pwszExposedPath));
+ BOX_TRACE("VSS: Provider ID: " <<
+ GuidToString(pSnap->m_ProviderId));
+ BOX_TRACE("VSS: Snapshot attributes: " <<
+ BOX_FORMAT_HEX32(pSnap->m_lSnapshotAttributes));
+ BOX_TRACE("VSS: Snapshot creation time: " <<
+ BOX_FORMAT_HEX32(pSnap->m_tsCreationTimestamp));
+
+ std::string status;
+ switch(pSnap->m_eStatus)
+ {
+ case VSS_SS_UNKNOWN: status = "Unknown (error)"; break;
+ case VSS_SS_PREPARING: status = "Preparing"; break;
+ case VSS_SS_PROCESSING_PREPARE: status = "Preparing (processing)"; break;
+ case VSS_SS_PREPARED: status = "Prepared"; break;
+ case VSS_SS_PROCESSING_PRECOMMIT: status = "Precommitting"; break;
+ case VSS_SS_PRECOMMITTED: status = "Precommitted"; break;
+ case VSS_SS_PROCESSING_COMMIT: status = "Commiting"; break;
+ case VSS_SS_COMMITTED: status = "Committed"; break;
+ case VSS_SS_PROCESSING_POSTCOMMIT: status = "Postcommitting"; break;
+ case VSS_SS_PROCESSING_PREFINALCOMMIT: status = "Pre final committing"; break;
+ case VSS_SS_PREFINALCOMMITTED: status = "Pre final committed"; break;
+ case VSS_SS_PROCESSING_POSTFINALCOMMIT: status = "Post final committing"; break;
+ case VSS_SS_CREATED: status = "Created"; break;
+ case VSS_SS_ABORTED: status = "Aborted"; break;
+ case VSS_SS_DELETED: status = "Deleted"; break;
+ case VSS_SS_POSTCOMMITTED: status = "Postcommitted"; break;
+ default:
+ std::ostringstream buf;
+ buf << "Unknown code: " << pSnap->m_eStatus;
+ status = buf.str();
+ }
+
+ BOX_TRACE("VSS: Snapshot status: " << status);
+ FreeSnapshotProp(pSnap);
+ }
+ }
+
+ pEnum->Release();
+
+CreateVssBackupComponents_cleanup_WriterStatus:
+ result = mpVssBackupComponents->FreeWriterStatus();
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to free writer status: " <<
+ GetMsgForHresult(result));
+ }
+
+CreateVssBackupComponents_cleanup_WriterMetadata:
+ result = mpVssBackupComponents->FreeWriterMetadata();
+ if(result != S_OK)
+ {
+ BOX_ERROR("VSS: Failed to free writer metadata: " <<
+ GetMsgForHresult(result));
+ }
+}
+
+void BackupDaemon::CleanupVssBackupComponents()
+{
+ if(mpVssBackupComponents == NULL)
+ {
+ return;
+ }
+
+ CallAndWaitForAsync(&IVssBackupComponents::BackupComplete,
+ "BackupComplete()");
+
+ mpVssBackupComponents->Release();
+ mpVssBackupComponents = NULL;
+}
+#endif
+
void BackupDaemon::OnBackupStart()
{
// Touch a file to record times in filesystem
@@ -969,28 +1659,37 @@ void BackupDaemon::OnBackupStart()
void BackupDaemon::OnBackupFinish()
{
- // Log
- BOX_NOTICE("Finished scan of local files");
-
- // Log the stats
- BOX_NOTICE("File statistics: total file size uploaded "
- << BackupStoreFile::msStats.mBytesInEncodedFiles
- << ", bytes already on server "
- << BackupStoreFile::msStats.mBytesAlreadyOnServer
- << ", encoded size "
- << BackupStoreFile::msStats.mTotalFileStreamSize);
-
- // Reset statistics again
- BackupStoreFile::ResetStats();
+ try
+ {
+ // Log
+ BOX_NOTICE("Finished scan of local files");
- // Notify administrator
- NotifySysadmin(SysadminNotifier::BackupFinish);
+ // Log the stats
+ BOX_NOTICE("File statistics: total file size uploaded "
+ << BackupStoreFile::msStats.mBytesInEncodedFiles
+ << ", bytes already on server "
+ << BackupStoreFile::msStats.mBytesAlreadyOnServer
+ << ", encoded size "
+ << BackupStoreFile::msStats.mTotalFileStreamSize
+ << ", " << mNumFilesUploaded << " files uploaded, "
+ << mNumDirsCreated << " dirs created");
- // Tell anything connected to the command socket
- SendSyncStartOrFinish(false /* finish */);
+ // Reset statistics again
+ BackupStoreFile::ResetStats();
- // Touch a file to record times in filesystem
- TouchFileInWorkingDir("last_sync_finish");
+ // Notify administrator
+ NotifySysadmin(SysadminNotifier::BackupFinish);
+
+ // Tell anything connected to the command socket
+ SendSyncStartOrFinish(false /* finish */);
+
+ // Touch a file to record times in filesystem
+ TouchFileInWorkingDir("last_sync_finish");
+ }
+ catch (std::exception &e)
+ {
+ BOX_ERROR("Failed to perform backup finish actions: " << e.what());
+ }
}
// --------------------------------------------------------------------------
@@ -1032,33 +1731,14 @@ int BackupDaemon::UseScriptToSeeIfSyncAllowed()
std::string line;
if(getLine.GetLine(line, true, 30000)) // 30 seconds should be enough
{
- // Got a string, interpret
- if(line == "now")
- {
- // Script says do it now. Obey.
- waitInSeconds = -1;
- }
- else
- {
- try
- {
- // How many seconds to wait?
- waitInSeconds = BoxConvert::Convert<int32_t, const std::string&>(line);
- }
- catch(ConversionException &e)
- {
- BOX_ERROR("Invalid output from "
- "SyncAllowScript: '" <<
- line << "' (" << script << ")");
- throw;
- }
-
- BOX_NOTICE("Delaying sync by " << waitInSeconds
- << " seconds due to SyncAllowScript "
- << "(" << script << ")");
- }
+ waitInSeconds = BackupDaemon::ParseSyncAllowScriptOutput(script, line);
+ }
+ else
+ {
+ BOX_ERROR("SyncAllowScript output nothing within "
+ "30 seconds, waiting 5 minutes to try again"
+ " (" << script << ")");
}
-
}
catch(std::exception &e)
{
@@ -1083,6 +1763,83 @@ int BackupDaemon::UseScriptToSeeIfSyncAllowed()
return waitInSeconds;
}
+int BackupDaemon::ParseSyncAllowScriptOutput(const std::string& script,
+ const std::string& output)
+{
+ int waitInSeconds = (60*5);
+ std::istringstream iss(output);
+
+ std::string delay;
+ iss >> delay;
+
+ if(delay == "")
+ {
+ BOX_ERROR("SyncAllowScript output an empty line");
+ return waitInSeconds;
+ }
+
+ // Got a string, interpret
+ if(delay == "now")
+ {
+ // Script says do it now. Obey.
+ waitInSeconds = -1;
+
+ BOX_NOTICE("SyncAllowScript requested a backup now "
+ << "(" << script << ")");
+ }
+ else
+ {
+ try
+ {
+ // How many seconds to wait?
+ waitInSeconds = BoxConvert::Convert<int32_t, const std::string&>(delay);
+ }
+ catch(ConversionException &e)
+ {
+ BOX_ERROR("SyncAllowScript output an invalid "
+ "number: '" << output << "' (" <<
+ script << ")");
+ throw;
+ }
+
+ BOX_NOTICE("SyncAllowScript requested a delay of " <<
+ waitInSeconds << " seconds due to SyncAllowScript "
+ << "(" << script << ")");
+ }
+
+ if(iss.eof())
+ {
+ // No bandwidth limit requested
+ mMaxBandwidthFromSyncAllowScript = 0;
+ BOX_NOTICE("SyncAllowScript did not set a maximum bandwidth "
+ "(" << script << ")");
+ }
+ else
+ {
+ std::string maxBandwidth;
+ iss >> maxBandwidth;
+
+ try
+ {
+ // How many seconds to wait?
+ mMaxBandwidthFromSyncAllowScript =
+ BoxConvert::Convert<int32_t, const std::string&>(maxBandwidth);
+ }
+ catch(ConversionException &e)
+ {
+ BOX_ERROR("Invalid maximum bandwidth from "
+ "SyncAllowScript: '" <<
+ output << "' (" << script << ")");
+ throw;
+ }
+
+ BOX_NOTICE("SyncAllowScript set maximum bandwidth to " <<
+ mMaxBandwidthFromSyncAllowScript << " kB/s (" <<
+ script << ")");
+ }
+
+ return waitInSeconds;
+}
// --------------------------------------------------------------------------
@@ -1418,33 +2175,20 @@ void BackupDaemon::SendSyncStartOrFinish(bool SendStart)
// --------------------------------------------------------------------------
void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Configuration &rLocationsConf)
{
- if(!mLocations.empty())
- {
- // Looks correctly set up
- return;
- }
-
- // Make sure that if a directory is reinstated, then it doesn't get deleted
- mDeleteUnusedRootDirEntriesAfter = 0;
- mUnusedRootDirEntries.clear();
-
- // Just a check to make sure it's right.
- DeleteAllLocations();
-
// Going to need a copy of the root directory. Get a connection,
// and fetch it.
- BackupProtocolClient &connection(rClientContext.GetConnection());
+ BackupProtocolCallable& connection(rClientContext.GetConnection());
// Ask server for a list of everything in the root directory,
// which is a directory itself
- std::auto_ptr<BackupProtocolClientSuccess> dirreply(
+ std::auto_ptr<BackupProtocolSuccess> dirreply(
connection.QueryListDirectory(
- BackupProtocolClientListDirectory::RootDirectory,
+ BackupProtocolListDirectory::RootDirectory,
// only directories
- BackupProtocolClientListDirectory::Flags_Dir,
+ BackupProtocolListDirectory::Flags_Dir,
// exclude old/deleted stuff
- BackupProtocolClientListDirectory::Flags_Deleted |
- BackupProtocolClientListDirectory::Flags_OldVersion,
+ BackupProtocolListDirectory::Flags_Deleted |
+ BackupProtocolListDirectory::Flags_OldVersion,
false /* no attributes */));
// Retrieve the directory from the stream following
@@ -1537,35 +2281,68 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
// making sure there's a directory created for it.
std::vector<std::string> locNames =
rLocationsConf.GetSubConfigurationNames();
-
+
+ // We only want completely configured locations to be in the list
+ // when this function exits, so move them all to a temporary list.
+ // Entries matching a properly configured location will be moved
+ // back to mLocations. Anything left in this list after the loop
+ // finishes will be deleted.
+ Locations tmpLocations = mLocations;
+ mLocations.clear();
+
+ // The ID map list will be repopulated automatically by this loop
+ mIDMapMounts.clear();
+
for(std::vector<std::string>::iterator
pLocName = locNames.begin();
pLocName != locNames.end();
pLocName++)
{
+ Location* pLoc = NULL;
+
+ // Try to find and reuse an existing Location object
+ for(Locations::const_iterator
+ i = tmpLocations.begin();
+ i != tmpLocations.end(); i++)
+ {
+ if ((*i)->mName == *pLocName)
+ {
+ BOX_TRACE("Location already configured: " << *pLocName);
+ pLoc = *i;
+ break;
+ }
+ }
+
const Configuration& rConfig(
rLocationsConf.GetSubConfiguration(*pLocName));
- BOX_TRACE("new location: " << *pLocName);
-
- // Create a record for it
- std::auto_ptr<Location> apLoc(new Location);
+ std::auto_ptr<Location> apLoc;
try
{
- // Setup names in the location record
- apLoc->mName = *pLocName;
- apLoc->mPath = rConfig.GetKeyValue("Path");
-
- // Read the exclude lists from the Configuration
- apLoc->mpExcludeFiles = BackupClientMakeExcludeList_Files(rConfig);
- apLoc->mpExcludeDirs = BackupClientMakeExcludeList_Dirs(rConfig);
+ if(pLoc == NULL)
+ {
+ // Create a record for it
+ BOX_TRACE("New location: " << *pLocName);
+ pLoc = new Location;
+
+ // ensure deletion if setup fails
+ apLoc.reset(pLoc);
+
+ // Setup names in the location record
+ pLoc->mName = *pLocName;
+ pLoc->mPath = rConfig.GetKeyValue("Path");
+
+ // Read the exclude lists from the Configuration
+ pLoc->mpExcludeFiles = BackupClientMakeExcludeList_Files(rConfig);
+ pLoc->mpExcludeDirs = BackupClientMakeExcludeList_Dirs(rConfig);
+ }
// Does this exist on the server?
// Remove from dir object early, so that if we fail
// to stat the local directory, we still don't
// consider to remote one for deletion.
BackupStoreDirectory::Iterator iter(dir);
- BackupStoreFilenameClear dirname(apLoc->mName); // generate the filename
+ BackupStoreFilenameClear dirname(pLoc->mName); // generate the filename
BackupStoreDirectory::Entry *en = iter.FindMatchingClearName(dirname);
int64_t oid = 0;
if(en != 0)
@@ -1585,17 +2362,17 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
// BSD style statfs -- includes mount point, which is nice.
#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
struct statvfs s;
- if(::statvfs(apLoc->mPath.c_str(), &s) != 0)
+ if(::statvfs(pLoc->mPath.c_str(), &s) != 0)
#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
struct statfs s;
- if(::statfs(apLoc->mPath.c_str(), &s) != 0)
+ if(::statfs(pLoc->mPath.c_str(), &s) != 0)
#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
{
- BOX_LOG_SYS_WARNING("Failed to stat location "
- "path '" << apLoc->mPath <<
- "', skipping location '" <<
- apLoc->mName << "'");
- continue;
+ THROW_SYS_ERROR("Failed to stat path "
+ "'" << pLoc->mPath << "' "
+ "for location "
+ "'" << pLoc->mName << "'",
+ CommonException, OSFileError);
}
// Where the filesystem is mounted
@@ -1604,10 +2381,10 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
#else // !HAVE_STRUCT_STATFS_F_MNTONNAME && !WIN32
// Warn in logs if the directory isn't absolute
- if(apLoc->mPath[0] != '/')
+ if(pLoc->mPath[0] != '/')
{
BOX_WARNING("Location path '"
- << apLoc->mPath
+ << pLoc->mPath
<< "' is not absolute");
}
// Go through the mount points found, and find a suitable one
@@ -1622,7 +2399,7 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
// If it matches, the file belongs in that mount point
// (sorting order ensures this)
BOX_TRACE("checking against mount point " << *i);
- if(::strncmp(i->c_str(), apLoc->mPath.c_str(), i->size()) == 0)
+ if(::strncmp(i->c_str(), pLoc->mPath.c_str(), i->size()) == 0)
{
// Match
mountName = *i;
@@ -1630,7 +2407,7 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
}
}
BOX_TRACE("mount point chosen for "
- << apLoc->mPath << " is "
+ << pLoc->mPath << " is "
<< mountName);
}
@@ -1641,12 +2418,12 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
if(f != mounts.end())
{
// Yes -- store the index
- apLoc->mIDMapIndex = f->second;
+ pLoc->mIDMapIndex = f->second;
}
else
{
// No -- new index
- apLoc->mIDMapIndex = numIDMaps;
+ pLoc->mIDMapIndex = numIDMaps;
mounts[mountName] = numIDMaps;
// Store the mount name
@@ -1666,7 +2443,7 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
BackupClientFileAttributes attr;
try
{
- attr.ReadAttributes(apLoc->mPath.c_str(),
+ attr.ReadAttributes(pLoc->mPath.c_str(),
true /* directories have zero mod times */,
0 /* not interested in mod time */,
&attrModTime /* get the attribute modification time */);
@@ -1674,19 +2451,20 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
catch (BoxException &e)
{
BOX_ERROR("Failed to get attributes "
- "for path '" << apLoc->mPath
+ "for path '" << pLoc->mPath
<< "', skipping location '" <<
- apLoc->mName << "'");
- continue;
+ pLoc->mName << "'");
+ throw;
}
// Execute create directory command
try
{
- MemBlockStream attrStream(attr);
- std::auto_ptr<BackupProtocolClientSuccess>
+ std::auto_ptr<IOStream> attrStream(
+ new MemBlockStream(attr));
+ std::auto_ptr<BackupProtocolSuccess>
dirCreate(connection.QueryCreateDirectory(
- BackupProtocolClientListDirectory::RootDirectory,
+ BackupProtocolListDirectory::RootDirectory,
attrModTime, dirname, attrStream));
// Object ID for later creation
@@ -1695,40 +2473,64 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
catch (BoxException &e)
{
BOX_ERROR("Failed to create remote "
- "directory '/" << apLoc->mName <<
+ "directory '/" << pLoc->mName <<
"', skipping location '" <<
- apLoc->mName << "'");
- continue;
+ pLoc->mName << "'");
+ throw;
}
}
// Create and store the directory object for the root of this location
ASSERT(oid != 0);
- BackupClientDirectoryRecord *precord =
- new BackupClientDirectoryRecord(oid, *pLocName);
- apLoc->mpDirectoryRecord.reset(precord);
+ if(pLoc->mpDirectoryRecord.get() == NULL)
+ {
+ BackupClientDirectoryRecord *precord =
+ new BackupClientDirectoryRecord(oid, *pLocName);
+ pLoc->mpDirectoryRecord.reset(precord);
+ }
+ // Remove it from the temporary list to avoid deletion
+ tmpLocations.remove(pLoc);
+
// Push it back on the vector of locations
- mLocations.push_back(apLoc.release());
+ mLocations.push_back(pLoc);
+
+ if(apLoc.get() != NULL)
+ {
+ // Don't delete it now!
+ apLoc.release();
+ }
}
catch (std::exception &e)
{
BOX_ERROR("Failed to configure location '"
- << apLoc->mName << "' path '"
- << apLoc->mPath << "': " << e.what() <<
+ << pLoc->mName << "' path '"
+ << pLoc->mPath << "': " << e.what() <<
": please check for previous errors");
- throw;
+ mReadErrorsOnFilesystemObjects = true;
}
catch(...)
{
BOX_ERROR("Failed to configure location '"
- << apLoc->mName << "' path '"
- << apLoc->mPath << "': please check for "
+ << pLoc->mName << "' path '"
+ << pLoc->mPath << "': please check for "
"previous errors");
- throw;
+ mReadErrorsOnFilesystemObjects = true;
}
}
+
+ // Now remove any leftovers
+ for(BackupDaemon::Locations::iterator
+ i = tmpLocations.begin();
+ i != tmpLocations.end(); i++)
+ {
+ BOX_INFO("Removing obsolete location from memory: " <<
+ (*i)->mName);
+ delete *i;
+ }
+
+ tmpLocations.clear();
// Any entries in the root directory which need deleting?
if(dir.GetNumberOfEntries() > 0 &&
@@ -1791,31 +2593,11 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
// --------------------------------------------------------------------------
void BackupDaemon::SetupIDMapsForSync()
{
- // Need to do different things depending on whether it's an
- // in memory implementation, or whether it's all stored on disc.
-
-#ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
-
- // Make sure we have some blank, empty ID maps
- DeleteIDMapVector(mNewIDMaps);
- FillIDMapVector(mNewIDMaps, true /* new maps */);
-
- // Then make sure that the current maps have objects,
- // even if they are empty (for the very first run)
- if(mCurrentIDMaps.empty())
- {
- FillIDMapVector(mCurrentIDMaps, false /* current maps */);
- }
-
-#else
-
// Make sure we have some blank, empty ID maps
DeleteIDMapVector(mNewIDMaps);
FillIDMapVector(mNewIDMaps, true /* new maps */);
DeleteIDMapVector(mCurrentIDMaps);
FillIDMapVector(mCurrentIDMaps, false /* new maps */);
-
-#endif
}
@@ -1848,6 +2630,24 @@ void BackupDaemon::FillIDMapVector(std::vector<BackupClientInodeToIDMap *> &rVec
filename += ".n";
}
+ // The new map file should not exist yet. If there's
+ // one left over from a previous failed run, it's not
+ // useful to us because we never read from it and will
+ // overwrite the entries of all files that still
+ // exist, so we should just delete it and start afresh.
+ if(NewMaps && FileExists(filename.c_str()))
+ {
+ BOX_NOTICE("Found an incomplete ID map "
+ "database, deleting it to start "
+ "afresh: " << filename);
+ if(unlink(filename.c_str()) != 0)
+ {
+ BOX_LOG_NATIVE_ERROR(BOX_FILE_MESSAGE(
+ filename, "Failed to delete "
+ "incomplete ID map database"));
+ }
+ }
+
// If it's not a new map, it may not exist in which case an empty map should be created
if(!NewMaps && !FileExists(filename.c_str()))
{
@@ -1942,21 +2742,6 @@ void BackupDaemon::MakeMapBaseName(unsigned int MountNumber, std::string &rNameO
// --------------------------------------------------------------------------
void BackupDaemon::CommitIDMapsAfterSync()
{
- // Need to do different things depending on whether it's an in memory implementation,
- // or whether it's all stored on disc.
-
-#ifdef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
- // Remove the current ID maps
- DeleteIDMapVector(mCurrentIDMaps);
-
- // Copy the (pointers to) "new" maps over to be the new "current" maps
- mCurrentIDMaps = mNewIDMaps;
-
- // Clear the new ID maps vector (not delete them!)
- mNewIDMaps.clear();
-
-#else
-
// Get rid of the maps in memory (leaving them on disc of course)
DeleteIDMapVector(mCurrentIDMaps);
DeleteIDMapVector(mNewIDMaps);
@@ -1980,8 +2765,6 @@ void BackupDaemon::CommitIDMapsAfterSync()
THROW_EXCEPTION(CommonException, OSFileError)
}
}
-
-#endif
}
@@ -2003,7 +2786,6 @@ void BackupDaemon::DeleteIDMapVector(std::vector<BackupClientInodeToIDMap *> &rV
rVector.pop_back();
// Close and delete
- toDel->Close();
delete toDel;
}
ASSERT(rVector.size() == 0);
@@ -2022,7 +2804,7 @@ void BackupDaemon::DeleteIDMapVector(std::vector<BackupClientInodeToIDMap *> &rV
bool BackupDaemon::FindLocationPathName(const std::string &rLocationName, std::string &rPathOut) const
{
// Search for the location
- for(std::vector<Location *>::const_iterator i(mLocations.begin()); i != mLocations.end(); ++i)
+ for(Locations::const_iterator i(mLocations.begin()); i != mLocations.end(); ++i)
{
if((*i)->mName == rLocationName)
{
@@ -2120,7 +2902,16 @@ void BackupDaemon::TouchFileInWorkingDir(const char *Filename)
fn += Filename;
// Open and close it to update the timestamp
- FileStream touch(fn.c_str(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+ try
+ {
+ FileStream touch(fn, O_WRONLY | O_CREAT | O_TRUNC,
+ S_IRUSR | S_IWUSR);
+ }
+ catch (std::exception &e)
+ {
+ BOX_ERROR("Failed to write to timestamp file: " << fn << ": " <<
+ e.what());
+ }
}
@@ -2259,7 +3050,7 @@ void BackupDaemon::DeleteUnusedRootDirEntries(BackupClientContext &rContext)
// Entries to delete, and it's the right time to do so...
BOX_NOTICE("Deleting unused locations from store root...");
- BackupProtocolClient &connection(rContext.GetConnection());
+ BackupProtocolCallable &connection(rContext.GetConnection());
for(std::vector<std::pair<int64_t,std::string> >::iterator
i(mUnusedRootDirEntries.begin());
i != mUnusedRootDirEntries.end(); ++i)
@@ -2290,222 +3081,6 @@ typedef struct
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupDaemon::Location::Location()
-// Purpose: Constructor
-// Created: 11/11/03
-//
-// --------------------------------------------------------------------------
-BackupDaemon::Location::Location()
- : mIDMapIndex(0),
- mpExcludeFiles(0),
- mpExcludeDirs(0)
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-// Name: BackupDaemon::Location::~Location()
-// Purpose: Destructor
-// Created: 11/11/03
-//
-// --------------------------------------------------------------------------
-BackupDaemon::Location::~Location()
-{
- // Clean up exclude locations
- if(mpExcludeDirs != 0)
- {
- delete mpExcludeDirs;
- mpExcludeDirs = 0;
- }
- if(mpExcludeFiles != 0)
- {
- delete mpExcludeFiles;
- mpExcludeFiles = 0;
- }
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-// Name: BackupDaemon::Location::Deserialize(Archive & rArchive)
-// Purpose: Deserializes this object instance from a stream of bytes, using an Archive abstraction.
-//
-// Created: 2005/04/11
-//
-// --------------------------------------------------------------------------
-void BackupDaemon::Location::Deserialize(Archive &rArchive)
-{
- //
- //
- //
- mpDirectoryRecord.reset(NULL);
- if(mpExcludeFiles)
- {
- delete mpExcludeFiles;
- mpExcludeFiles = NULL;
- }
- if(mpExcludeDirs)
- {
- delete mpExcludeDirs;
- mpExcludeDirs = NULL;
- }
-
- //
- //
- //
- rArchive.Read(mName);
- rArchive.Read(mPath);
- rArchive.Read(mIDMapIndex);
-
- //
- //
- //
- int64_t aMagicMarker = 0;
- rArchive.Read(aMagicMarker);
-
- if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
- {
- // NOOP
- }
- else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
- {
- BackupClientDirectoryRecord *pSubRecord = new BackupClientDirectoryRecord(0, "");
- if(!pSubRecord)
- {
- throw std::bad_alloc();
- }
-
- mpDirectoryRecord.reset(pSubRecord);
- mpDirectoryRecord->Deserialize(rArchive);
- }
- else
- {
- // there is something going on here
- THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
- }
-
- //
- //
- //
- rArchive.Read(aMagicMarker);
-
- if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
- {
- // NOOP
- }
- else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
- {
- mpExcludeFiles = new ExcludeList;
- if(!mpExcludeFiles)
- {
- throw std::bad_alloc();
- }
-
- mpExcludeFiles->Deserialize(rArchive);
- }
- else
- {
- // there is something going on here
- THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
- }
-
- //
- //
- //
- rArchive.Read(aMagicMarker);
-
- if(aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
- {
- // NOOP
- }
- else if(aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
- {
- mpExcludeDirs = new ExcludeList;
- if(!mpExcludeDirs)
- {
- throw std::bad_alloc();
- }
-
- mpExcludeDirs->Deserialize(rArchive);
- }
- else
- {
- // there is something going on here
- THROW_EXCEPTION(ClientException, CorruptStoreObjectInfoFile);
- }
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-// Name: BackupDaemon::Location::Serialize(Archive & rArchive)
-// Purpose: Serializes this object instance into a stream of bytes, using an Archive abstraction.
-//
-// Created: 2005/04/11
-//
-// --------------------------------------------------------------------------
-void BackupDaemon::Location::Serialize(Archive & rArchive) const
-{
- //
- //
- //
- rArchive.Write(mName);
- rArchive.Write(mPath);
- rArchive.Write(mIDMapIndex);
-
- //
- //
- //
- if(mpDirectoryRecord.get() == NULL)
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
- rArchive.Write(aMagicMarker);
- }
- else
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
- rArchive.Write(aMagicMarker);
-
- mpDirectoryRecord->Serialize(rArchive);
- }
-
- //
- //
- //
- if(!mpExcludeFiles)
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
- rArchive.Write(aMagicMarker);
- }
- else
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
- rArchive.Write(aMagicMarker);
-
- mpExcludeFiles->Serialize(rArchive);
- }
-
- //
- //
- //
- if(!mpExcludeDirs)
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
- rArchive.Write(aMagicMarker);
- }
- else
- {
- int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
- rArchive.Write(aMagicMarker);
-
- mpExcludeDirs->Serialize(rArchive);
- }
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
// Name: BackupDaemon::CommandSocketInfo::CommandSocketInfo()
// Purpose: Constructor
// Created: 18/2/04
@@ -2591,10 +3166,11 @@ bool BackupDaemon::SerializeStoreObjectInfo(box_time_t theLastSyncTime,
int64_t iCount = mLocations.size();
anArchive.Write(iCount);
- for(int v = 0; v < iCount; v++)
+ for(Locations::const_iterator i = mLocations.begin();
+ i != mLocations.end(); i++)
{
- ASSERT(mLocations[v]);
- mLocations[v]->Serialize(anArchive);
+ ASSERT(*i);
+ (*i)->Serialize(anArchive);
}
//
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index b41c6508..1d3c991e 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -24,13 +24,20 @@
#include "SocketStream.h"
#include "TLSContext.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
#ifdef WIN32
#include "WinNamedPipeListener.h"
#include "WinNamedPipeStream.h"
#endif
+#ifdef ENABLE_VSS
+# include <comdef.h>
+# include <Vss.h>
+# include <VsWriter.h>
+# include <VsBackup.h>
+#endif
+
class BackupClientDirectoryRecord;
class BackupClientContext;
class Configuration;
@@ -110,6 +117,7 @@ public:
void InitCrypto();
void RunSyncNowWithExceptionHandling();
void RunSyncNow();
+ void ResetCachedState();
void OnBackupStart();
void OnBackupFinish();
// TouchFileInWorkingDir is only here for use by Boxi.
@@ -150,33 +158,15 @@ private:
int UseScriptToSeeIfSyncAllowed();
public:
- class Location
- {
- public:
- Location();
- ~Location();
-
- void Deserialize(Archive & rArchive);
- void Serialize(Archive & rArchive) const;
- private:
- Location(const Location &); // copy not allowed
- Location &operator=(const Location &);
- public:
- std::string mName;
- std::string mPath;
- std::auto_ptr<BackupClientDirectoryRecord> mpDirectoryRecord;
- int mIDMapIndex;
- ExcludeList *mpExcludeFiles;
- ExcludeList *mpExcludeDirs;
- };
-
- typedef const std::vector<Location *> Locations;
+ int ParseSyncAllowScriptOutput(const std::string& script,
+ const std::string& output);
+ typedef std::list<Location *> Locations;
Locations GetLocations() { return mLocations; }
private:
int mState; // what the daemon is currently doing
- std::vector<Location *> mLocations;
+ Locations mLocations;
std::vector<std::string> mIDMapMounts;
std::vector<BackupClientInodeToIDMap *> mCurrentIDMaps;
@@ -222,8 +212,11 @@ private:
TLSContext mTlsContext;
bool mDeleteStoreObjectInfoFile;
bool mDoSyncForcedByPreviousSyncError;
+ int64_t mNumFilesUploaded, mNumDirsCreated;
+ int mMaxBandwidthFromSyncAllowScript;
public:
+ int GetMaxBandwidthFromSyncAllowScript() { return mMaxBandwidthFromSyncAllowScript; }
bool StopRun() { return this->Daemon::StopRun(); }
bool StorageLimitExceeded() { return mStorageLimitExceeded; }
@@ -368,7 +361,7 @@ public:
int type, int subtype)
{
std::ostringstream msgs;
- if (type != BackupProtocolClientError::ErrorType)
+ if (type != BackupProtocolError::ErrorType)
{
msgs << "unknown error type " << type;
}
@@ -376,46 +369,46 @@ public:
{
switch(subtype)
{
- case BackupProtocolClientError::Err_WrongVersion:
+ case BackupProtocolError::Err_WrongVersion:
msgs << "WrongVersion";
break;
- case BackupProtocolClientError::Err_NotInRightProtocolPhase:
+ case BackupProtocolError::Err_NotInRightProtocolPhase:
msgs << "NotInRightProtocolPhase";
break;
- case BackupProtocolClientError::Err_BadLogin:
+ case BackupProtocolError::Err_BadLogin:
msgs << "BadLogin";
break;
- case BackupProtocolClientError::Err_CannotLockStoreForWriting:
+ case BackupProtocolError::Err_CannotLockStoreForWriting:
msgs << "CannotLockStoreForWriting";
break;
- case BackupProtocolClientError::Err_SessionReadOnly:
+ case BackupProtocolError::Err_SessionReadOnly:
msgs << "SessionReadOnly";
break;
- case BackupProtocolClientError::Err_FileDoesNotVerify:
+ case BackupProtocolError::Err_FileDoesNotVerify:
msgs << "FileDoesNotVerify";
break;
- case BackupProtocolClientError::Err_DoesNotExist:
+ case BackupProtocolError::Err_DoesNotExist:
msgs << "DoesNotExist";
break;
- case BackupProtocolClientError::Err_DirectoryAlreadyExists:
+ case BackupProtocolError::Err_DirectoryAlreadyExists:
msgs << "DirectoryAlreadyExists";
break;
- case BackupProtocolClientError::Err_CannotDeleteRoot:
+ case BackupProtocolError::Err_CannotDeleteRoot:
msgs << "CannotDeleteRoot";
break;
- case BackupProtocolClientError::Err_TargetNameExists:
+ case BackupProtocolError::Err_TargetNameExists:
msgs << "TargetNameExists";
break;
- case BackupProtocolClientError::Err_StorageLimitExceeded:
+ case BackupProtocolError::Err_StorageLimitExceeded:
msgs << "StorageLimitExceeded";
break;
- case BackupProtocolClientError::Err_DiffFromFileDoesNotExist:
+ case BackupProtocolError::Err_DiffFromFileDoesNotExist:
msgs << "DiffFromFileDoesNotExist";
break;
- case BackupProtocolClientError::Err_DoesNotExistInDirectory:
+ case BackupProtocolError::Err_DoesNotExistInDirectory:
msgs << "DoesNotExistInDirectory";
break;
- case BackupProtocolClientError::Err_PatchConsistencyError:
+ case BackupProtocolError::Err_PatchConsistencyError:
msgs << "PatchConsistencyError";
break;
default:
@@ -457,12 +450,15 @@ public:
virtual void NotifyFileUploaded(
const BackupClientDirectoryRecord* pDirRecord,
const std::string& rLocalPath,
- int64_t FileSize)
+ int64_t FileSize, int64_t UploadedSize)
{
if (mLogAllFileAccess)
{
- BOX_NOTICE("Uploaded file: " << rLocalPath);
- }
+ BOX_NOTICE("Uploaded file: " << rLocalPath << ", "
+ "total size = " << FileSize << ", "
+ "uploaded size = " << UploadedSize);
+ }
+ mNumFilesUploaded++;
}
virtual void NotifyFileSynchronised(
const BackupClientDirectoryRecord* pDirRecord,
@@ -474,6 +470,19 @@ public:
BOX_INFO("Synchronised file: " << rLocalPath);
}
}
+ virtual void NotifyDirectoryCreated(
+ int64_t ObjectID,
+ const std::string& rLocalPath,
+ const std::string& rRemotePath)
+ {
+ if (mLogAllFileAccess)
+ {
+ BOX_NOTICE("Created directory: " << rRemotePath <<
+ " (ID " << BOX_FORMAT_OBJECTID(ObjectID) <<
+ ")");
+ }
+ mNumDirsCreated++;
+ }
virtual void NotifyDirectoryDeleted(
int64_t ObjectID,
const std::string& rRemotePath)
@@ -520,6 +529,16 @@ public:
bool mInstallService, mRemoveService, mRunAsService;
std::string mServiceName;
#endif
+
+#ifdef ENABLE_VSS
+ IVssBackupComponents* mpVssBackupComponents;
+ void CreateVssBackupComponents();
+ bool WaitForAsync(IVssAsync *pAsync, const std::string& description);
+ typedef HRESULT (__stdcall IVssBackupComponents::*AsyncMethod)(IVssAsync**);
+ bool CallAndWaitForAsync(AsyncMethod method,
+ const std::string& description);
+ void CleanupVssBackupComponents();
+#endif
};
#endif // BACKUPDAEMON__H
diff --git a/bin/bbackupd/BackupDaemonInterface.h b/bin/bbackupd/BackupDaemonInterface.h
index 2a2d8d4b..a847b264 100644
--- a/bin/bbackupd/BackupDaemonInterface.h
+++ b/bin/bbackupd/BackupDaemonInterface.h
@@ -129,11 +129,15 @@ class ProgressNotifier
virtual void NotifyFileUploaded(
const BackupClientDirectoryRecord* pDirRecord,
const std::string& rLocalPath,
- int64_t FileSize) = 0;
+ int64_t FileSize, int64_t UploadedSize) = 0;
virtual void NotifyFileSynchronised(
const BackupClientDirectoryRecord* pDirRecord,
const std::string& rLocalPath,
int64_t FileSize) = 0;
+ virtual void NotifyDirectoryCreated(
+ int64_t ObjectID,
+ const std::string& rLocalPath,
+ const std::string& rRemotePath) = 0;
virtual void NotifyDirectoryDeleted(
int64_t ObjectID,
const std::string& rRemotePath) = 0;
diff --git a/bin/bbackupd/bbackupd-config.in b/bin/bbackupd/bbackupd-config.in
index 98dc8b6e..1fc224c2 100755
--- a/bin/bbackupd/bbackupd-config.in
+++ b/bin/bbackupd/bbackupd-config.in
@@ -227,7 +227,7 @@ SUBJECT="BACKUP PROBLEM on host $hostname"
SENDTO="$current_username"
if [ "\$1" = "" ]; then
- echo "Usage: \$0 <store-full|read-error|backup-error|backup-start|backup-finish>" >&2
+ echo "Usage: \$0 <store-full|read-error|backup-ok|backup-error|backup-start|backup-finish>" >&2
exit 2
elif [ "\$1" = store-full ]; then
$sendmail \$SENDTO <<EOM
@@ -262,7 +262,7 @@ these errors, and take appropriate action.
Other files are being backed up.
EOM
-elif [ "\$1" = backup-start -o "\$1" = backup-finish ]; then
+elif [ "\$1" = backup-start -o "\$1" = backup-finish -o "\$1" = backup-ok ]; then
# do nothing by default
true
else
diff --git a/bin/bbackupd/bbackupd.cpp b/bin/bbackupd/bbackupd.cpp
index d334a2df..bb64f745 100644
--- a/bin/bbackupd/bbackupd.cpp
+++ b/bin/bbackupd/bbackupd.cpp
@@ -41,12 +41,13 @@ int main(int argc, const char *argv[])
ExitCode = gpDaemonService->Daemon::Main(
BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
argc, argv);
- delete gpDaemonService;
+ delete gpDaemonService;
#else // !WIN32
BackupDaemon daemon;
- ExitCode = daemon.Main(BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv);
+ ExitCode = daemon.Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
+ argc, argv);
#endif // WIN32
diff --git a/bin/bbackupd/win32/installer.iss b/bin/bbackupd/win32/installer.iss
index 20e3addb..e69de29b 100644
--- a/bin/bbackupd/win32/installer.iss
+++ b/bin/bbackupd/win32/installer.iss
@@ -1,51 +0,0 @@
-; Script to generate output file for Box Backup client for the Windows Platform
-;
-; Very important - this is the release process
-;
-; 1/ Upgrade BOX_VERSION in the file emu.h to the current version for example 0.09eWin32 - then perform a full rebuild
-;
-; 2/ Upgrade the AppVerName below to reflect the version
-;
-; 3/ Generate the output file, then rename it to the relevent filename to reflect the version
-
-[Setup]
-AppName=Box Backup
-AppVerName=BoxWin32 0.09h
-AppPublisher=Fluffy & Omniis
-AppPublisherURL=http://www.omniis.com
-AppSupportURL=http://www.omniis.com
-AppUpdatesURL=http://www.omniis.com
-DefaultDirName={pf}\Box Backup
-DefaultGroupName=Box Backup
-Compression=lzma
-SolidCompression=yes
-PrivilegesRequired=admin
-
-[Files]
-Source: "..\..\Release\bbackupd.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "..\..\Release\bbackupctl.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "..\..\Release\bbackupquery.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "..\..\ExceptionCodes.txt"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "icon.ico"; DestDir: "{app}\"; Flags: ignoreversion restartreplace
-Source: "msvcr71.dll"; DestDir: "{app}\"; Flags: restartreplace
-Source: "bbackupd.conf"; DestDir: "{app}"; Flags: confirmoverwrite
-Source: "..\..\..\zlib\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "..\..\..\openssl\bin\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "..\..\..\openssl\bin\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-Source: "ReadMe.txt"; DestDir: "{app}"; Flags: ignoreversion restartreplace
-
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: "{group}\Box Backup Query"; Filename: "{app}\bbackupquery.exe"; IconFilename: "{app}\icon.ico" ;Parameters: "-c bbackupd.conf"; WorkingDir: "{app}"
-Name: "{group}\Service\Install Service"; Filename: "{app}\bbackupd.exe"; IconFilename: "{app}\icon.ico" ;Parameters: "-i"; WorkingDir: "{app}"
-Name: "{group}\Service\Remove Service"; Filename: "{app}\bbackupd.exe"; IconFilename: "{app}\icon.ico" ;Parameters: "-r"; WorkingDir: "{app}"
-Name: "{group}\Initiate Backup Now"; Filename: "{app}\bbackupctl.exe"; IconFilename: "{app}\icon.ico" ;Parameters: "-c bbackupd.conf sync"; WorkingDir: "{app}"
-
-[Dirs]
-Name: "{app}\bbackupd"
-
-[Run]
-Filename: "{app}\bbackupd.exe"; Description: "Install Boxbackup as service"; Parameters: "-i"; Flags: postinstall
-Filename: "{app}\Readme.txt"; Description: "View upgrade notes"; Flags: postinstall shellexec skipifsilent
-
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index 60724800..b8b9525b 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -48,9 +48,9 @@
#include "Logging.h"
#include "PathUtils.h"
#include "SelfFlushingStream.h"
-#include "TemporaryDirectory.h"
#include "Utils.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
+#include "autogen_CipherException.h"
#include "MemLeakFindOn.h"
@@ -100,12 +100,6 @@ BackupQueries::~BackupQueries()
{
}
-typedef struct
-{
- const char* name;
- const char* opts;
-} QueryCommandSpecification;
-
// --------------------------------------------------------------------------
//
// Function
@@ -114,173 +108,46 @@ typedef struct
// Created: 2003/10/10
//
// --------------------------------------------------------------------------
-void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
+void BackupQueries::DoCommand(ParsedCommand& rCommand)
{
- // is the command a shell command?
- if(Command[0] == 's' && Command[1] == 'h' && Command[2] == ' ' && Command[3] != '\0')
+ // Check...
+
+ if(rCommand.mFailed)
{
- // Yes, run shell command
- int result = ::system(Command + 3);
- if(result != 0)
- {
- BOX_WARNING("System command returned error code " <<
- result);
- SetReturnCode(ReturnCode::Command_Error);
- }
+ BOX_ERROR("Parse failed");
return;
}
- // split command into components
- std::vector<std::string> cmdElements;
- std::string options;
+ if(rCommand.mCmdElements.size() < 1)
{
- const char *c = Command;
- bool inQuoted = false;
- bool inOptions = false;
-
- std::string s;
- while(*c != 0)
- {
- // Terminating char?
- if(*c == ((inQuoted)?'"':' '))
- {
- if(!s.empty()) cmdElements.push_back(s);
- s.resize(0);
- inQuoted = false;
- inOptions = false;
- }
- else
- {
- // No. Start of quoted parameter?
- if(s.empty() && *c == '"')
- {
- inQuoted = true;
- }
- // Start of options?
- else if(s.empty() && *c == '-')
- {
- inOptions = true;
- }
- else
- {
- if(inOptions)
- {
- // Option char
- options += *c;
- }
- else
- {
- // Normal string char
- s += *c;
- }
- }
- }
-
- ++c;
- }
- if(!s.empty()) cmdElements.push_back(s);
+ // blank command
+ return;
}
-
- #ifdef WIN32
- if (isFromCommandLine)
+
+ if(rCommand.pSpec->type == Command_sh &&
+ rCommand.mCmdElements.size() == 2)
{
- for (std::vector<std::string>::iterator
- i = cmdElements.begin();
- i != cmdElements.end(); i++)
+ // Yes, run shell command
+ int result = ::system(rCommand.mCmdElements[1].c_str());
+ if(result != 0)
{
- std::string converted;
- if (!ConvertEncoding(*i, CP_ACP, converted,
- GetConsoleCP()))
- {
- BOX_ERROR("Failed to convert encoding");
- return;
- }
- *i = converted;
+ BOX_WARNING("System command returned error code " <<
+ result);
+ SetReturnCode(ReturnCode::Command_Error);
}
- }
- #endif
-
- // Check...
- if(cmdElements.size() < 1)
- {
- // blank command
return;
}
-
- // Data about commands
- static QueryCommandSpecification commands[] =
- {
- { "quit", "" },
- { "exit", "" },
- { "list", "rodIFtTash", },
- { "pwd", "" },
- { "cd", "od" },
- { "lcd", "" },
- { "sh", "" },
- { "getobject", "" },
- { "get", "i" },
- { "compare", "alcqAEQ" },
- { "restore", "drif" },
- { "help", "" },
- { "usage", "m" },
- { "undelete", "i" },
- { "delete", "i" },
- { NULL, NULL }
- };
-
- typedef enum
- {
- Command_Quit = 0,
- Command_Exit,
- Command_List,
- Command_pwd,
- Command_cd,
- Command_lcd,
- Command_sh,
- Command_GetObject,
- Command_Get,
- Command_Compare,
- Command_Restore,
- Command_Help,
- Command_Usage,
- Command_Undelete,
- Command_Delete,
- }
- CommandType;
-
- static const char *alias[] = {"ls", 0};
- static const int aliasIs[] = {Command_List, 0};
-
- // Work out which command it is...
- int cmd = 0;
- while(commands[cmd].name != 0 && ::strcmp(cmdElements[0].c_str(), commands[cmd].name) != 0)
- {
- cmd++;
- }
- if(commands[cmd].name == 0)
+
+ if(rCommand.pSpec->type == Command_Unknown)
{
- // Check for aliases
- int a;
- for(a = 0; alias[a] != 0; ++a)
- {
- if(::strcmp(cmdElements[0].c_str(), alias[a]) == 0)
- {
- // Found an alias
- cmd = aliasIs[a];
- break;
- }
- }
-
// No such command
- if(alias[a] == 0)
- {
- BOX_ERROR("Unrecognised command: " << Command);
- return;
- }
+ BOX_ERROR("Unrecognised command: " << rCommand.mCmdElements[0]);
+ return;
}
// Arguments
- std::vector<std::string> args(cmdElements.begin() + 1, cmdElements.end());
+ std::vector<std::string> args(rCommand.mCmdElements.begin() + 1,
+ rCommand.mCmdElements.end());
// Set up options
bool opts[256];
@@ -288,14 +155,14 @@ void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
// BLOCK
{
// options
- const char *c = options.c_str();
+ const char *c = rCommand.mOptions.c_str();
while(*c != 0)
{
// Valid option?
- if(::strchr(commands[cmd].opts, *c) == NULL)
+ if(::strchr(rCommand.pSpec->opts, *c) == NULL)
{
BOX_ERROR("Invalid option '" << *c << "' for "
- "command " << commands[cmd].name);
+ "command " << rCommand.pSpec->name);
return;
}
opts[(int)*c] = true;
@@ -303,17 +170,16 @@ void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
}
}
- if(cmd != Command_Quit && cmd != Command_Exit)
+ if(rCommand.pSpec->type != Command_Quit)
{
// If not a quit command, set the return code to zero
SetReturnCode(ReturnCode::Command_OK);
}
// Handle command
- switch(cmd)
+ switch(rCommand.pSpec->type)
{
case Command_Quit:
- case Command_Exit:
mQuitNow = true;
break;
@@ -375,7 +241,7 @@ void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
break;
default:
- BOX_ERROR("Unknown command: " << Command);
+ BOX_ERROR("Unknown command: " << rCommand.mCmdElements[0]);
break;
}
}
@@ -392,8 +258,6 @@ void BackupQueries::DoCommand(const char *Command, bool isFromCommandLine)
void BackupQueries::CommandList(const std::vector<std::string> &args, const bool *opts)
{
#define LIST_OPTION_RECURSIVE 'r'
- #define LIST_OPTION_ALLOWOLD 'o'
- #define LIST_OPTION_ALLOWDELETED 'd'
#define LIST_OPTION_NOOBJECTID 'I'
#define LIST_OPTION_NOFLAGS 'F'
#define LIST_OPTION_TIMES_LOCAL 't'
@@ -492,22 +356,28 @@ static std::string GetTimeString(BackupStoreDirectory::Entry& en,
// Created: 2003/10/10
//
// --------------------------------------------------------------------------
-void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool *opts, bool FirstLevel)
+void BackupQueries::List(int64_t DirID, const std::string &rListRoot,
+ const bool *opts, bool FirstLevel, std::ostream* pOut)
{
+#ifdef WIN32
+ DWORD n_chars;
+ HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
+#endif
+
// Generate exclude flags
- int16_t excludeFlags = BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING;
- if(!opts[LIST_OPTION_ALLOWOLD]) excludeFlags |= BackupProtocolClientListDirectory::Flags_OldVersion;
- if(!opts[LIST_OPTION_ALLOWDELETED]) excludeFlags |= BackupProtocolClientListDirectory::Flags_Deleted;
+ int16_t excludeFlags = BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING;
+ if(!opts[LIST_OPTION_ALLOWOLD]) excludeFlags |= BackupProtocolListDirectory::Flags_OldVersion;
+ if(!opts[LIST_OPTION_ALLOWDELETED]) excludeFlags |= BackupProtocolListDirectory::Flags_Deleted;
// Do communication
try
{
mrConnection.QueryListDirectory(
- DirID,
- BackupProtocolClientListDirectory::Flags_INCLUDE_EVERYTHING,
- // both files and directories
- excludeFlags,
- true /* want attributes */);
+ DirID,
+ BackupProtocolListDirectory::Flags_INCLUDE_EVERYTHING,
+ // both files and directories
+ excludeFlags,
+ true /* want attributes */);
}
catch (std::exception &e)
{
@@ -522,7 +392,6 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
return;
}
-
// Retrieve the directory from the stream following
BackupStoreDirectory dir;
std::auto_ptr<IOStream> dirstream(mrConnection.ReceiveStream());
@@ -533,6 +402,8 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
BackupStoreDirectory::Entry *en = 0;
while((en = i.Next()) != 0)
{
+ std::ostringstream buf;
+
// Display this entry
BackupStoreFilenameClear clear(en->GetName());
@@ -540,11 +411,9 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
if(!opts[LIST_OPTION_NOOBJECTID])
{
// add object ID to line
-#ifdef _MSC_VER
- printf("%08I64x ", (int64_t)en->GetObjectID());
-#else
- printf("%08llx ", (long long)en->GetObjectID());
-#endif
+ buf << std::hex << std::internal << std::setw(8) <<
+ std::setfill('0') << en->GetObjectID() <<
+ std::dec << " ";
}
// Flags?
@@ -571,44 +440,40 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
// terminate
*(f++) = ' ';
*(f++) = '\0';
- printf(displayflags);
+ buf << displayflags;
if(en_flags != 0)
{
- printf("[ERROR: Entry has additional flags set] ");
+ buf << "[ERROR: Entry has additional flags set] ";
}
}
if(opts[LIST_OPTION_TIMES_UTC])
{
// Show UTC times...
- printf("%s ", GetTimeString(*en, false,
- opts[LIST_OPTION_TIMES_ATTRIBS]).c_str());
+ buf << GetTimeString(*en, false,
+ opts[LIST_OPTION_TIMES_ATTRIBS]) << " ";
}
if(opts[LIST_OPTION_TIMES_LOCAL])
{
// Show local times...
- printf("%s ", GetTimeString(*en, true,
- opts[LIST_OPTION_TIMES_ATTRIBS]).c_str());
+ buf << GetTimeString(*en, true,
+ opts[LIST_OPTION_TIMES_ATTRIBS]) << " ";
}
if(opts[LIST_OPTION_DISPLAY_HASH])
{
-#ifdef _MSC_VER
- printf("%016I64x ", (int64_t)en->GetAttributesHash());
-#else
- printf("%016llx ", (long long)en->GetAttributesHash());
-#endif
+ buf << std::hex << std::internal << std::setw(16) <<
+ std::setfill('0') << en->GetAttributesHash() <<
+ std::dec;
}
if(opts[LIST_OPTION_SIZEINBLOCKS])
{
-#ifdef _MSC_VER
- printf("%05I64d ", (int64_t)en->GetSizeInBlocks());
-#else
- printf("%05lld ", (long long)en->GetSizeInBlocks());
-#endif
+ buf << std::internal << std::setw(5) <<
+ std::setfill('0') << en->GetSizeInBlocks() <<
+ " ";
}
// add name
@@ -618,30 +483,60 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
std::string listRootDecoded;
if(!ConvertUtf8ToConsole(rListRoot.c_str(),
listRootDecoded)) return;
- printf("%s/", listRootDecoded.c_str());
+ listRootDecoded += "/";
+ buf << listRootDecoded;
+ WriteConsole(hOut, listRootDecoded.c_str(),
+ strlen(listRootDecoded.c_str()), &n_chars, NULL);
#else
- printf("%s/", rListRoot.c_str());
+ buf << rListRoot << "/";
#endif
}
+ std::string fileName;
+ try
+ {
+ fileName = clear.GetClearFilename();
+ }
+ catch(CipherException &e)
+ {
+ fileName = "<decrypt failed>";
+ }
+
#ifdef WIN32
+ std::string fileNameUtf8 = fileName;
+ if(!ConvertUtf8ToConsole(fileNameUtf8, fileName))
{
- std::string fileName;
- if(!ConvertUtf8ToConsole(
- clear.GetClearFilename().c_str(), fileName))
- return;
- printf("%s", fileName.c_str());
+ fileName = fileNameUtf8 + " [convert encoding failed]";
}
-#else
- printf("%s", clear.GetClearFilename().c_str());
#endif
-
+
+ buf << fileName;
+
if(!en->GetName().IsEncrypted())
{
- printf("[FILENAME NOT ENCRYPTED]");
+ buf << " [FILENAME NOT ENCRYPTED]";
}
- printf("\n");
+ buf << std::endl;
+
+ if(pOut)
+ {
+ (*pOut) << buf.str();
+ }
+ else
+ {
+#ifdef WIN32
+ std::string line = buf.str();
+ if (!WriteConsole(hOut, line.c_str(), line.size(),
+ &n_chars, NULL))
+ {
+ // WriteConsole failed, try standard method
+ std::cout << buf.str();
+ }
+#else
+ std::cout << buf.str();
+#endif
+ }
// Directory?
if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_Dir) != 0)
@@ -652,7 +547,9 @@ void BackupQueries::List(int64_t DirID, const std::string &rListRoot, const bool
std::string subroot(rListRoot);
if(!FirstLevel) subroot += '/';
subroot += clear.GetClearFilename();
- List(en->GetObjectID(), subroot, opts, false /* not the first level to list */);
+ List(en->GetObjectID(), subroot, opts,
+ false /* not the first level to list */,
+ pOut);
}
}
}
@@ -681,7 +578,7 @@ int64_t BackupQueries::FindDirectoryObjectID(const std::string &rDirName,
// Start from current stack, or root, whichever is required
std::vector<std::pair<std::string, int64_t> > stack;
- int64_t dirID = BackupProtocolClientListDirectory::RootDirectory;
+ int64_t dirID = BackupProtocolListDirectory::RootDirectory;
if(rDirName.size() > 0 && rDirName[0] == '/')
{
// Root, do nothing
@@ -697,9 +594,9 @@ int64_t BackupQueries::FindDirectoryObjectID(const std::string &rDirName,
}
// Generate exclude flags
- int16_t excludeFlags = BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING;
- if(!AllowOldVersion) excludeFlags |= BackupProtocolClientListDirectory::Flags_OldVersion;
- if(!AllowDeletedDirs) excludeFlags |= BackupProtocolClientListDirectory::Flags_Deleted;
+ int16_t excludeFlags = BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING;
+ if(!AllowOldVersion) excludeFlags |= BackupProtocolListDirectory::Flags_OldVersion;
+ if(!AllowDeletedDirs) excludeFlags |= BackupProtocolListDirectory::Flags_Deleted;
// Read directories
for(unsigned int e = 0; e < dirElements.size(); ++e)
@@ -719,20 +616,20 @@ int64_t BackupQueries::FindDirectoryObjectID(const std::string &rDirName,
stack.pop_back();
// New dir ID
- dirID = (stack.size() > 0)?(stack[stack.size() - 1].second):BackupProtocolClientListDirectory::RootDirectory;
+ dirID = (stack.size() > 0)?(stack[stack.size() - 1].second):BackupProtocolListDirectory::RootDirectory;
}
else
{
// At root anyway
- dirID = BackupProtocolClientListDirectory::RootDirectory;
+ dirID = BackupProtocolListDirectory::RootDirectory;
}
}
else
{
// Not blank element. Read current directory.
- std::auto_ptr<BackupProtocolClientSuccess> dirreply(mrConnection.QueryListDirectory(
+ std::auto_ptr<BackupProtocolSuccess> dirreply(mrConnection.QueryListDirectory(
dirID,
- BackupProtocolClientListDirectory::Flags_Dir, // just directories
+ BackupProtocolListDirectory::Flags_Dir, // just directories
excludeFlags,
true /* want attributes */));
@@ -783,7 +680,7 @@ int64_t BackupQueries::GetCurrentDirectoryID()
// Special case for root
if(mDirStack.size() == 0)
{
- return BackupProtocolClientListDirectory::RootDirectory;
+ return BackupProtocolListDirectory::RootDirectory;
}
// Otherwise, get from the last entry on the stack
@@ -955,7 +852,8 @@ void BackupQueries::CommandGetObject(const std::vector<std::string> &args, const
int64_t id = ::strtoll(args[0].c_str(), 0, 16);
if(id == std::numeric_limits<long long>::min() || id == std::numeric_limits<long long>::max() || id == 0)
{
- BOX_ERROR("Not a valid object ID (specified in hex).");
+ BOX_ERROR("Not a valid object ID (specified in hex): " <<
+ args[0]);
return;
}
@@ -974,8 +872,8 @@ void BackupQueries::CommandGetObject(const std::vector<std::string> &args, const
try
{
// Request object
- std::auto_ptr<BackupProtocolClientSuccess> getobj(mrConnection.QueryGetObject(id));
- if(getobj->GetObjectID() != BackupProtocolClientGetObject::NoObject)
+ std::auto_ptr<BackupProtocolSuccess> getobj(mrConnection.QueryGetObject(id));
+ if(getobj->GetObjectID() != BackupProtocolGetObject::NoObject)
{
// Stream that object out to the file
std::auto_ptr<IOStream> objectStream(mrConnection.ReceiveStream());
@@ -1062,7 +960,8 @@ int64_t BackupQueries::FindFileID(const std::string& rNameOrIdString,
fileId == std::numeric_limits<long long>::max() ||
fileId == 0)
{
- BOX_ERROR("Not a valid object ID (specified in hex).");
+ BOX_ERROR("Not a valid object ID (specified in hex): "
+ << rNameOrIdString);
return 0;
}
@@ -1154,19 +1053,19 @@ void BackupQueries::CommandGet(std::vector<std::string> args, const bool *opts)
if(opts['i'])
{
// can retrieve anything by ID
- flagsExclude = BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING;
+ flagsExclude = BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING;
}
else
{
// only current versions by name
flagsExclude =
- BackupProtocolClientListDirectory::Flags_OldVersion |
- BackupProtocolClientListDirectory::Flags_Deleted;
+ BackupProtocolListDirectory::Flags_OldVersion |
+ BackupProtocolListDirectory::Flags_Deleted;
}
fileId = FindFileID(args[0], opts, &dirId, &localName,
- BackupProtocolClientListDirectory::Flags_File, // just files
+ BackupProtocolListDirectory::Flags_File, // just files
flagsExclude, NULL /* don't care about flags found */);
if (fileId == 0)
@@ -1469,6 +1368,159 @@ void BackupQueries::Compare(const std::string &rStoreDir,
Compare(dirID, storeDirEncoded, localDirEncoded, rParams);
}
+void BackupQueries::CompareOneFile(int64_t DirID,
+ BackupStoreDirectory::Entry *pEntry,
+ const std::string& rLocalPath,
+ const std::string& rStorePath,
+ BoxBackupCompareParams &rParams)
+{
+ int64_t fileId = pEntry->GetObjectID();
+ int64_t fileSize = 0;
+
+ EMU_STRUCT_STAT st;
+ if(EMU_STAT(rLocalPath.c_str(), &st) == 0)
+ {
+ fileSize = st.st_size;
+ }
+
+ try
+ {
+ // Files the same flag?
+ bool equal = true;
+
+ // File modified after last sync flag
+ bool modifiedAfterLastSync = false;
+
+ bool hasDifferentAttribs = false;
+
+ bool alreadyReported = false;
+
+ if(rParams.QuickCompare())
+ {
+ // Compare file -- fetch it
+ mrConnection.QueryGetBlockIndexByID(fileId);
+
+ // Stream containing block index
+ std::auto_ptr<IOStream> blockIndexStream(mrConnection.ReceiveStream());
+
+ // Compare
+ equal = BackupStoreFile::CompareFileContentsAgainstBlockIndex(
+ rLocalPath.c_str(), *blockIndexStream,
+ mrConnection.GetTimeout());
+ }
+ else
+ {
+ // Compare file -- fetch it
+ mrConnection.QueryGetFile(DirID, pEntry->GetObjectID());
+
+ // Stream containing encoded file
+ std::auto_ptr<IOStream> objectStream(mrConnection.ReceiveStream());
+
+ // Decode it
+ std::auto_ptr<BackupStoreFile::DecodedStream> fileOnServerStream;
+
+ // Got additional attributes?
+ if(pEntry->HasAttributes())
+ {
+ // Use these attributes
+ const StreamableMemBlock &storeAttr(pEntry->GetAttributes());
+ BackupClientFileAttributes attr(storeAttr);
+ fileOnServerStream.reset(
+ BackupStoreFile::DecodeFileStream(
+ *objectStream,
+ mrConnection.GetTimeout(),
+ &attr).release());
+ }
+ else
+ {
+ // Use attributes stored in file
+ fileOnServerStream.reset(BackupStoreFile::DecodeFileStream(*objectStream, mrConnection.GetTimeout()).release());
+ }
+
+ // Should always be something in the auto_ptr, it's how the interface is defined. But be paranoid.
+ if(!fileOnServerStream.get())
+ {
+ THROW_EXCEPTION(BackupStoreException, Internal)
+ }
+
+ // Compare attributes
+ BackupClientFileAttributes localAttr;
+ box_time_t fileModTime = 0;
+ localAttr.ReadAttributes(rLocalPath.c_str(), false /* don't zero mod times */, &fileModTime);
+ modifiedAfterLastSync = (fileModTime > rParams.LatestFileUploadTime());
+ bool ignoreAttrModTime = true;
+
+ #ifdef WIN32
+ // attr mod time is really
+ // creation time, so check it
+ ignoreAttrModTime = false;
+ #endif
+
+ if(!rParams.IgnoreAttributes() &&
+ #ifdef PLATFORM_DISABLE_SYMLINK_ATTRIB_COMPARE
+ !fileOnServerStream->IsSymLink() &&
+ #endif
+ !localAttr.Compare(fileOnServerStream->GetAttributes(),
+ ignoreAttrModTime,
+ fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
+ {
+ hasDifferentAttribs = true;
+ }
+
+ // Compare contents, if it's a regular file not a link
+ // Remember, we MUST read the entire stream from the server.
+ SelfFlushingStream flushObject(*objectStream);
+
+ if(!fileOnServerStream->IsSymLink())
+ {
+ SelfFlushingStream flushFile(*fileOnServerStream);
+ // Open the local file
+ std::auto_ptr<FileStream> apLocalFile;
+
+ try
+ {
+ apLocalFile.reset(new FileStream(rLocalPath.c_str()));
+ }
+ catch(std::exception &e)
+ {
+ rParams.NotifyLocalFileReadFailed(rLocalPath,
+ rStorePath, fileSize, e);
+ alreadyReported = true;
+ }
+ catch(...)
+ {
+ rParams.NotifyLocalFileReadFailed(rLocalPath,
+ rStorePath, fileSize);
+ alreadyReported = true;
+ }
+
+ if(apLocalFile.get())
+ {
+ equal = apLocalFile->CompareWith(*fileOnServerStream,
+ mrConnection.GetTimeout());
+ }
+ }
+ }
+
+ rParams.NotifyFileCompared(rLocalPath, rStorePath, fileSize,
+ hasDifferentAttribs, !equal, modifiedAfterLastSync,
+ pEntry->HasAttributes());
+ }
+ catch(BoxException &e)
+ {
+ rParams.NotifyDownloadFailed(rLocalPath, rStorePath, fileSize,
+ e);
+ }
+ catch(std::exception &e)
+ {
+ rParams.NotifyDownloadFailed(rLocalPath, rStorePath, fileSize,
+ e);
+ }
+ catch(...)
+ {
+ rParams.NotifyDownloadFailed(rLocalPath, rStorePath, fileSize);
+ }
+}
// --------------------------------------------------------------------------
//
@@ -1503,10 +1555,10 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir,
// Get the directory listing from the store
mrConnection.QueryListDirectory(
DirID,
- BackupProtocolClientListDirectory::Flags_INCLUDE_EVERYTHING,
+ BackupProtocolListDirectory::Flags_INCLUDE_EVERYTHING,
// get everything
- BackupProtocolClientListDirectory::Flags_OldVersion |
- BackupProtocolClientListDirectory::Flags_Deleted,
+ BackupProtocolListDirectory::Flags_OldVersion |
+ BackupProtocolListDirectory::Flags_Deleted,
// except for old versions and deleted files
true /* want attributes */);
@@ -1700,124 +1752,8 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir,
}
else
{
- int64_t fileSize = 0;
-
- EMU_STRUCT_STAT st;
- if(EMU_STAT(localPath.c_str(), &st) == 0)
- {
- fileSize = st.st_size;
- }
-
- try
- {
- // Files the same flag?
- bool equal = true;
-
- // File modified after last sync flag
- bool modifiedAfterLastSync = false;
-
- bool hasDifferentAttribs = false;
-
- if(rParams.QuickCompare())
- {
- // Compare file -- fetch it
- mrConnection.QueryGetBlockIndexByID(i->second->GetObjectID());
-
- // Stream containing block index
- std::auto_ptr<IOStream> blockIndexStream(mrConnection.ReceiveStream());
-
- // Compare
- equal = BackupStoreFile::CompareFileContentsAgainstBlockIndex(localPath.c_str(), *blockIndexStream, mrConnection.GetTimeout());
- }
- else
- {
- // Compare file -- fetch it
- mrConnection.QueryGetFile(DirID, i->second->GetObjectID());
-
- // Stream containing encoded file
- std::auto_ptr<IOStream> objectStream(mrConnection.ReceiveStream());
-
- // Decode it
- std::auto_ptr<BackupStoreFile::DecodedStream> fileOnServerStream;
- // Got additional attributes?
- if(i->second->HasAttributes())
- {
- // Use these attributes
- const StreamableMemBlock &storeAttr(i->second->GetAttributes());
- BackupClientFileAttributes attr(storeAttr);
- fileOnServerStream.reset(BackupStoreFile::DecodeFileStream(*objectStream, mrConnection.GetTimeout(), &attr).release());
- }
- else
- {
- // Use attributes stored in file
- fileOnServerStream.reset(BackupStoreFile::DecodeFileStream(*objectStream, mrConnection.GetTimeout()).release());
- }
-
- // Should always be something in the auto_ptr, it's how the interface is defined. But be paranoid.
- if(!fileOnServerStream.get())
- {
- THROW_EXCEPTION(BackupStoreException, Internal)
- }
-
- // Compare attributes
- BackupClientFileAttributes localAttr;
- box_time_t fileModTime = 0;
- localAttr.ReadAttributes(localPath.c_str(), false /* don't zero mod times */, &fileModTime);
- modifiedAfterLastSync = (fileModTime > rParams.LatestFileUploadTime());
- bool ignoreAttrModTime = true;
-
- #ifdef WIN32
- // attr mod time is really
- // creation time, so check it
- ignoreAttrModTime = false;
- #endif
-
- if(!rParams.IgnoreAttributes() &&
- #ifdef PLATFORM_DISABLE_SYMLINK_ATTRIB_COMPARE
- !fileOnServerStream->IsSymLink() &&
- #endif
- !localAttr.Compare(fileOnServerStream->GetAttributes(),
- ignoreAttrModTime,
- fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
- {
- hasDifferentAttribs = true;
- }
-
- // Compare contents, if it's a regular file not a link
- // Remember, we MUST read the entire stream from the server.
- SelfFlushingStream flushObject(*objectStream);
-
- if(!fileOnServerStream->IsSymLink())
- {
- SelfFlushingStream flushFile(*fileOnServerStream);
- // Open the local file
- FileStream l(localPath.c_str());
- equal = l.CompareWith(*fileOnServerStream,
- mrConnection.GetTimeout());
- }
- }
-
- rParams.NotifyFileCompared(localPath,
- storePath, fileSize,
- hasDifferentAttribs, !equal,
- modifiedAfterLastSync,
- i->second->HasAttributes());
- }
- catch(BoxException &e)
- {
- rParams.NotifyDownloadFailed(localPath,
- storePath, fileSize, e);
- }
- catch(std::exception &e)
- {
- rParams.NotifyDownloadFailed(localPath,
- storePath, fileSize, e);
- }
- catch(...)
- {
- rParams.NotifyDownloadFailed(localPath,
- storePath, fileSize);
- }
+ CompareOneFile(DirID, i->second, localPath,
+ storePath, rParams);
// Remove from set so that we know it's been compared
localFiles.erase(local);
@@ -1947,9 +1883,10 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir,
void BackupQueries::CommandRestore(const std::vector<std::string> &args, const bool *opts)
{
// Check arguments
- if(args.size() != 2)
+ if(args.size() < 1 || args.size() > 2)
{
- BOX_ERROR("Incorrect usage. restore [-drif] <remote-name> <local-name>");
+ BOX_ERROR("Incorrect usage. restore [-drif] <remote-name> "
+ "[<local-name>]");
return;
}
@@ -1966,7 +1903,8 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
dirID = ::strtoll(args[0].c_str(), 0, 16);
if(dirID == std::numeric_limits<long long>::min() || dirID == std::numeric_limits<long long>::max() || dirID == 0)
{
- BOX_ERROR("Not a valid object ID (specified in hex)");
+ BOX_ERROR("Not a valid object ID (specified in hex): "
+ << args[0]);
return;
}
std::ostringstream oss;
@@ -1994,18 +1932,30 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
BOX_ERROR("Directory '" << args[0] << "' not found on server");
return;
}
- if(dirID == BackupProtocolClientListDirectory::RootDirectory)
+
+ if(dirID == BackupProtocolListDirectory::RootDirectory)
{
BOX_ERROR("Cannot restore the root directory -- restore locations individually.");
return;
}
-
-#ifdef WIN32
+
std::string localName;
- if(!ConvertConsoleToUtf8(args[1].c_str(), localName)) return;
-#else
- std::string localName(args[1]);
-#endif
+
+ if(args.size() == 2)
+ {
+ #ifdef WIN32
+ if(!ConvertConsoleToUtf8(args[1].c_str(), localName))
+ {
+ return;
+ }
+ #else
+ localName = args[1];
+ #endif
+ }
+ else
+ {
+ localName = args[0];
+ }
// Go and restore...
int result;
@@ -2082,8 +2032,8 @@ void BackupQueries::CommandRestore(const std::vector<std::string> &args, const b
// These are autogenerated by a script.
-extern char *help_commands[];
-extern char *help_text[];
+extern const char *help_commands[];
+extern const char *help_text[];
// --------------------------------------------------------------------------
@@ -2140,7 +2090,7 @@ void BackupQueries::CommandUsage(const bool *opts)
bool MachineReadable = opts['m'];
// Request full details from the server
- std::auto_ptr<BackupProtocolClientAccountUsage> usage(mrConnection.QueryGetAccountUsage());
+ std::auto_ptr<BackupProtocolAccountUsage> usage(mrConnection.QueryGetAccountUsage());
// Display each entry in turn
int64_t hardLimit = usage->GetBlocksHardLimit();
@@ -2216,9 +2166,9 @@ void BackupQueries::CommandUndelete(const std::vector<std::string> &args, const
fileId = FindFileID(storeDirEncoded, opts, &parentId, &fileName,
/* include files and directories */
- BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING,
+ BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING,
/* include old and deleted files */
- BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING,
+ BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING,
&flagsOut);
if (fileId == 0)
@@ -2231,7 +2181,7 @@ void BackupQueries::CommandUndelete(const std::vector<std::string> &args, const
try
{
// Undelete object
- if(flagsOut & BackupProtocolClientListDirectory::Flags_File)
+ if(flagsOut & BackupProtocolListDirectory::Flags_File)
{
mrConnection.QueryUndeleteFile(parentId, fileId);
}
@@ -2296,10 +2246,10 @@ void BackupQueries::CommandDelete(const std::vector<std::string> &args,
fileId = FindFileID(storeDirEncoded, opts, &parentId, &fileName,
/* include files and directories */
- BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING,
+ BackupProtocolListDirectory::Flags_EXCLUDE_NOTHING,
/* exclude old and deleted files */
- BackupProtocolClientListDirectory::Flags_OldVersion |
- BackupProtocolClientListDirectory::Flags_Deleted,
+ BackupProtocolListDirectory::Flags_OldVersion |
+ BackupProtocolListDirectory::Flags_Deleted,
&flagsOut);
if (fileId == 0)
@@ -2314,7 +2264,7 @@ void BackupQueries::CommandDelete(const std::vector<std::string> &args,
try
{
// Delete object
- if(flagsOut & BackupProtocolClientListDirectory::Flags_File)
+ if(flagsOut & BackupProtocolListDirectory::Flags_File)
{
mrConnection.QueryDeleteFile(parentId, fn);
}
diff --git a/bin/bbackupquery/BackupQueries.h b/bin/bbackupquery/BackupQueries.h
index 392aa428..62ff231d 100644
--- a/bin/bbackupquery/BackupQueries.h
+++ b/bin/bbackupquery/BackupQueries.h
@@ -10,16 +10,40 @@
#ifndef BACKUPQUERIES__H
#define BACKUPQUERIES__H
-#include <vector>
+#include <iostream>
#include <string>
+#include <vector>
#include "BoxTime.h"
#include "BoxBackupCompareParams.h"
+#include "BackupStoreDirectory.h"
class BackupProtocolClient;
class Configuration;
class ExcludeList;
+typedef enum
+{
+ Command_Unknown = 0,
+ Command_Quit,
+ Command_List,
+ Command_pwd,
+ Command_cd,
+ Command_lcd,
+ Command_sh,
+ Command_GetObject,
+ Command_Get,
+ Command_Compare,
+ Command_Restore,
+ Command_Help,
+ Command_Usage,
+ Command_Undelete,
+ Command_Delete,
+}
+CommandType;
+
+struct QueryCommandSpecification;
+
// --------------------------------------------------------------------------
//
// Class
@@ -38,8 +62,24 @@ public:
private:
BackupQueries(const BackupQueries &);
public:
+ struct ParsedCommand
+ {
+ std::vector<std::string> mCmdElements;
+ std::string mOptions;
+ std::string mCompleteCommand;
+ bool mInOptions, mFailed;
+ QueryCommandSpecification* pSpec;
+ // mArgCount is the same as mCmdElements.size() for a complete
+ // command, but if the command line ends in a space,
+ // e.g. during readline parsing, it can be one greater,
+ // to indicate that we should complete the next item instead.
+ size_t mCompleteArgCount;
+ ParsedCommand(const std::string& Command,
+ bool isFromCommandLine);
+ bool IsEmpty() { return mCmdElements.empty(); }
+ };
- void DoCommand(const char *Command, bool isFromCommandLine);
+ void DoCommand(ParsedCommand& rCommand);
// Ready to stop?
bool Stop() {return mQuitNow;}
@@ -47,9 +87,11 @@ public:
// Return code?
int GetReturnCode() {return mReturnCode;}
-private:
- // Commands
+ void List(int64_t DirID, const std::string &rListRoot, const bool *opts,
+ bool FirstLevel, std::ostream* pOut = NULL);
void CommandList(const std::vector<std::string> &args, const bool *opts);
+
+ // Commands
void CommandChangeDir(const std::vector<std::string> &args, const bool *opts);
void CommandChangeLocalDir(const std::vector<std::string> &args);
void CommandGetObject(const std::vector<std::string> &args, const bool *opts);
@@ -64,11 +106,6 @@ private:
int64_t HardLimit, int32_t BlockSize, bool MachineReadable);
void CommandHelp(const std::vector<std::string> &args);
- // Implementations
- void List(int64_t DirID, const std::string &rListRoot, const bool *opts,
- bool FirstLevel);
-
-public:
class CompareParams : public BoxBackupCompareParams
{
public:
@@ -201,6 +238,24 @@ public:
mUncheckedFiles ++;
}
+ virtual void NotifyLocalFileReadFailed(const std::string& rLocalPath,
+ const std::string& rRemotePath, int64_t NumBytes,
+ std::exception& rException)
+ {
+ BOX_ERROR("Failed to read local file '" <<
+ ConvertForConsole(rLocalPath) << "': " <<
+ rException.what());
+ mUncheckedFiles ++;
+ }
+
+ virtual void NotifyLocalFileReadFailed(const std::string& rLocalPath,
+ const std::string& rRemotePath, int64_t NumBytes)
+ {
+ BOX_ERROR("Failed to read local file '" <<
+ ConvertForConsole(rLocalPath));
+ mUncheckedFiles ++;
+ }
+
virtual void NotifyExcludedFile(const std::string& rLocalPath,
const std::string& rRemotePath)
{
@@ -302,13 +357,16 @@ public:
const std::string &rLocalDir, BoxBackupCompareParams &rParams);
void Compare(int64_t DirID, const std::string &rStoreDir,
const std::string &rLocalDir, BoxBackupCompareParams &rParams);
+ void CompareOneFile(int64_t DirID, BackupStoreDirectory::Entry *pEntry,
+ const std::string& rLocalPath, const std::string& rStorePath,
+ BoxBackupCompareParams &rParams);
public:
class ReturnCode
{
public:
- enum {
+ typedef enum {
Command_OK = 0,
Compare_Same = 1,
Compare_Different,
@@ -317,17 +375,19 @@ public:
} Type;
};
-private:
-
- // Utility functions
+ // Were private, but needed by completion functions:
+ int64_t GetCurrentDirectoryID();
int64_t FindDirectoryObjectID(const std::string &rDirName,
bool AllowOldVersion = false, bool AllowDeletedDirs = false,
std::vector<std::pair<std::string, int64_t> > *pStack = 0);
+
+private:
+
+ // Utility functions
int64_t FindFileID(const std::string& rNameOrIdString,
const bool *opts, int64_t *pDirIdOut,
std::string* pFileNameOut, int16_t flagsInclude,
int16_t flagsExclude, int16_t* pFlagsOut);
- int64_t GetCurrentDirectoryID();
std::string GetCurrentDirectoryName();
void SetReturnCode(int code) {mReturnCode = code;}
@@ -342,5 +402,36 @@ private:
int mReturnCode;
};
+typedef std::vector<std::string> (*CompletionHandler)
+ (BackupQueries::ParsedCommand& rCommand, const std::string& prefix,
+ BackupProtocolClient& rProtocol, const Configuration& rConfig,
+ BackupQueries& rQueries);
+
+std::vector<std::string> CompleteCommand(BackupQueries::ParsedCommand& rCommand,
+ const std::string& prefix, BackupProtocolClient& rProtocol,
+ const Configuration& rConfig, BackupQueries& rQueries);
+std::vector<std::string> CompleteOptions(BackupQueries::ParsedCommand& rCommand,
+ const std::string& prefix, BackupProtocolClient& rProtocol,
+ const Configuration& rConfig, BackupQueries& rQueries);
+
+#define MAX_COMPLETION_HANDLERS 4
+
+struct QueryCommandSpecification
+{
+ const char* name;
+ const char* opts;
+ CommandType type;
+ CompletionHandler complete[MAX_COMPLETION_HANDLERS];
+};
+
+// Data about commands
+extern QueryCommandSpecification commands[];
+
+extern const char *alias[];
+extern const int aliasIs[];
+
+#define LIST_OPTION_ALLOWOLD 'o'
+#define LIST_OPTION_ALLOWDELETED 'd'
+
#endif // BACKUPQUERIES__H
diff --git a/bin/bbackupquery/BoxBackupCompareParams.h b/bin/bbackupquery/BoxBackupCompareParams.h
index c58759a2..655df947 100644
--- a/bin/bbackupquery/BoxBackupCompareParams.h
+++ b/bin/bbackupquery/BoxBackupCompareParams.h
@@ -82,6 +82,11 @@ public:
virtual void NotifyDownloadFailed(const std::string& rLocalPath,
const std::string& rRemotePath, int64_t NumBytes,
BoxException& rException) = 0;
+ virtual void NotifyLocalFileReadFailed(const std::string& rLocalPath,
+ const std::string& rRemotePath, int64_t NumBytes,
+ std::exception& rException) = 0;
+ virtual void NotifyLocalFileReadFailed(const std::string& rLocalPath,
+ const std::string& rRemotePath, int64_t NumBytes) = 0;
virtual void NotifyDownloadFailed(const std::string& rLocalPath,
const std::string& rRemotePath, int64_t NumBytes,
std::exception& rException) = 0;
diff --git a/bin/bbackupquery/CommandCompletion.cpp b/bin/bbackupquery/CommandCompletion.cpp
new file mode 100644
index 00000000..93c4d3fd
--- /dev/null
+++ b/bin/bbackupquery/CommandCompletion.cpp
@@ -0,0 +1,602 @@
+// --------------------------------------------------------------------------
+//
+// File
+// Name: CommandCompletion.cpp
+// Purpose: Parts of BackupQueries that depend on readline
+// Created: 2011/01/21
+//
+// --------------------------------------------------------------------------
+
+#include "Box.h"
+
+#ifdef HAVE_LIBREADLINE
+ #ifdef HAVE_READLINE_READLINE_H
+ #include <readline/readline.h>
+ #elif defined(HAVE_EDITLINE_READLINE_H)
+ #include <editline/readline.h>
+ #elif defined(HAVE_READLINE_H)
+ #include <readline.h>
+ #endif
+#endif
+
+#ifdef HAVE_READLINE_HISTORY
+ #ifdef HAVE_READLINE_HISTORY_H
+ #include <readline/history.h>
+ #elif defined(HAVE_HISTORY_H)
+ #include <history.h>
+ #endif
+#endif
+
+#include <cstring>
+
+#include "BackupQueries.h"
+#include "Configuration.h"
+
+#include "autogen_BackupProtocol.h"
+
+#include "MemLeakFindOn.h"
+
+#define COMPARE_RETURN_SAME 1
+#define COMPARE_RETURN_DIFFERENT 2
+#define COMPARE_RETURN_ERROR 3
+#define COMMAND_RETURN_ERROR 4
+
+#define COMPLETION_FUNCTION(name, code) \
+std::vector<std::string> Complete ## name( \
+ BackupQueries::ParsedCommand& rCommand, \
+ const std::string& prefix, \
+ BackupProtocolClient& rProtocol, const Configuration& rConfig, \
+ BackupQueries& rQueries) \
+{ \
+ std::vector<std::string> completions; \
+ \
+ try \
+ { \
+ code \
+ } \
+ catch(std::exception &e) \
+ { \
+ BOX_TRACE("Failed to complete " << prefix << ": " << e.what()); \
+ } \
+ catch(...) \
+ { \
+ BOX_TRACE("Failed to complete " << prefix << ": " \
+ "unknown error"); \
+ } \
+ \
+ return completions; \
+}
+
+#define DELEGATE_COMPLETION(name) \
+ completions = Complete ## name(rCommand, prefix, rProtocol, rConfig, \
+ rQueries);
+
+COMPLETION_FUNCTION(None,)
+
+#ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION
+ #define RL_FILENAME_COMPLETION_FUNCTION rl_filename_completion_function
+ #define HAVE_A_FILENAME_COMPLETION_FUNCTION 1
+#elif defined HAVE_FILENAME_COMPLETION_FUNCTION
+ #define RL_FILENAME_COMPLETION_FUNCTION filename_completion_function
+ #define HAVE_A_FILENAME_COMPLETION_FUNCTION 1
+#endif
+
+#ifdef HAVE_A_FILENAME_COMPLETION_FUNCTION
+COMPLETION_FUNCTION(Default,
+ int i = 0;
+
+ while (const char *match = RL_FILENAME_COMPLETION_FUNCTION(prefix.c_str(), i))
+ {
+ completions.push_back(match);
+ ++i;
+ }
+)
+#else // !HAVE_A_FILENAME_COMPLETION_FUNCTION
+COMPLETION_FUNCTION(Default,)
+#endif // HAVE_A_FILENAME_COMPLETION_FUNCTION
+
+COMPLETION_FUNCTION(Command,
+ int len = prefix.length();
+
+ for(int i = 0; commands[i].name != NULL; i++)
+ {
+ if(::strncmp(commands[i].name, prefix.c_str(), len) == 0)
+ {
+ completions.push_back(commands[i].name);
+ }
+ }
+)
+
+void CompleteOptionsInternal(const std::string& prefix,
+ BackupQueries::ParsedCommand& rCommand,
+ std::vector<std::string>& completions)
+{
+ std::string availableOptions = rCommand.pSpec->opts;
+
+ for(std::string::iterator
+ opt = availableOptions.begin();
+ opt != availableOptions.end(); opt++)
+ {
+ if(rCommand.mOptions.find(*opt) == std::string::npos)
+ {
+ if(prefix == "")
+ {
+ // complete with possible option strings
+ completions.push_back(std::string("-") + *opt);
+ }
+ else
+ {
+ // complete with possible additional options
+ completions.push_back(prefix + *opt);
+ }
+ }
+ }
+}
+
+COMPLETION_FUNCTION(Options,
+ CompleteOptionsInternal(prefix, rCommand, completions);
+)
+
+std::string EncodeFileName(const std::string &rUnEncodedName)
+{
+#ifdef WIN32
+ std::string encodedName;
+ if(!ConvertConsoleToUtf8(rUnEncodedName, encodedName))
+ {
+ return std::string();
+ }
+ return encodedName;
+#else
+ return rUnEncodedName;
+#endif
+}
+
+int16_t GetExcludeFlags(BackupQueries::ParsedCommand& rCommand)
+{
+ int16_t excludeFlags = 0;
+
+ if (rCommand.mOptions.find(LIST_OPTION_ALLOWOLD) == std::string::npos)
+ {
+ excludeFlags |= BackupProtocolListDirectory::Flags_OldVersion;
+ }
+
+ if (rCommand.mOptions.find(LIST_OPTION_ALLOWDELETED) == std::string::npos)
+ {
+ excludeFlags |= BackupProtocolListDirectory::Flags_Deleted;
+ }
+
+ return excludeFlags;
+}
+
+std::vector<std::string> CompleteRemoteFileOrDirectory(
+ BackupQueries::ParsedCommand& rCommand,
+ const std::string& prefix, BackupProtocolClient& rProtocol,
+ BackupQueries& rQueries, int16_t includeFlags)
+{
+ std::vector<std::string> completions;
+
+ // default to using the current directory
+ int64_t listDirId = rQueries.GetCurrentDirectoryID();
+ std::string searchPrefix;
+ std::string listDir = prefix;
+
+ if(rCommand.mCompleteArgCount == rCommand.mCmdElements.size())
+ {
+ // completing an empty name, from the current directory
+ // nothing to change
+ }
+ else
+ {
+ // completing a partially-completed subdirectory name
+ searchPrefix = prefix;
+ listDir = "";
+
+ // do we need to list a subdirectory to complete?
+ size_t lastSlash = searchPrefix.rfind('/');
+ if(lastSlash == std::string::npos)
+ {
+ // no slashes, so the whole name is the prefix
+ // nothing to change
+ }
+ else
+ {
+ // listing a partially-completed subdirectory name
+ listDir = searchPrefix.substr(0, lastSlash);
+
+ listDirId = rQueries.FindDirectoryObjectID(listDir,
+ rCommand.mOptions.find(LIST_OPTION_ALLOWOLD)
+ != std::string::npos,
+ rCommand.mOptions.find(LIST_OPTION_ALLOWDELETED)
+ != std::string::npos);
+
+ if(listDirId == 0)
+ {
+ // no matches for subdir to list,
+ // return empty-handed.
+ return completions;
+ }
+
+ // matched, and updated listDir and listDirId already
+ searchPrefix = searchPrefix.substr(lastSlash + 1);
+ }
+ }
+
+ // Always include directories, because they contain files.
+ // We will append a slash later for each directory if we're
+ // actually looking for files.
+ //
+ // If we're looking for directories, then only list directories.
+
+ bool completeFiles = includeFlags &
+ BackupProtocolListDirectory::Flags_File;
+ bool completeDirs = includeFlags &
+ BackupProtocolListDirectory::Flags_Dir;
+ int16_t listFlags = 0;
+
+ if(completeFiles)
+ {
+ listFlags = BackupProtocolListDirectory::Flags_INCLUDE_EVERYTHING;
+ }
+ else if(completeDirs)
+ {
+ listFlags = BackupProtocolListDirectory::Flags_Dir;
+ }
+
+ rProtocol.QueryListDirectory(listDirId,
+ listFlags, GetExcludeFlags(rCommand),
+ false /* no attributes */);
+
+ // Retrieve the directory from the stream following
+ BackupStoreDirectory dir;
+ std::auto_ptr<IOStream> dirstream(rProtocol.ReceiveStream());
+ dir.ReadFromStream(*dirstream, rProtocol.GetTimeout());
+
+ // Then... display everything
+ BackupStoreDirectory::Iterator i(dir);
+ BackupStoreDirectory::Entry *en = 0;
+ while((en = i.Next()) != 0)
+ {
+ BackupStoreFilenameClear clear(en->GetName());
+ std::string name = clear.GetClearFilename().c_str();
+ if(name.compare(0, searchPrefix.length(), searchPrefix) == 0)
+ {
+ bool dir_added = false;
+
+ if(en->IsDir() &&
+ (includeFlags & BackupProtocolListDirectory::Flags_Dir) == 0)
+ {
+ // Was looking for a file, but this is a
+ // directory, so append a slash to the name
+ name += "/";
+ }
+
+ #ifdef HAVE_LIBREADLINE
+ if(strchr(name.c_str(), ' '))
+ {
+ int n_quote = 0;
+
+ for(int k = strlen(rl_line_buffer); k >= 0; k--)
+ {
+ if (rl_line_buffer[k] == '\"') {
+ ++n_quote;
+ }
+ }
+
+ dir_added = false;
+
+ if (!(n_quote % 2))
+ {
+ name = "\"" + (listDir == "" ? name : listDir + "/" + name);
+ dir_added = true;
+ }
+
+ name = name + "\"";
+ }
+ #endif
+
+ if(listDir == "" || dir_added)
+ {
+ completions.push_back(name);
+ }
+ else
+ {
+ completions.push_back(listDir + "/" + name);
+ }
+ }
+ }
+
+ return completions;
+}
+
+COMPLETION_FUNCTION(RemoteDir,
+ completions = CompleteRemoteFileOrDirectory(rCommand, prefix,
+ rProtocol, rQueries,
+ BackupProtocolListDirectory::Flags_Dir);
+)
+
+COMPLETION_FUNCTION(RemoteFile,
+ completions = CompleteRemoteFileOrDirectory(rCommand, prefix,
+ rProtocol, rQueries,
+ BackupProtocolListDirectory::Flags_File);
+)
+
+COMPLETION_FUNCTION(LocalDir,
+ DELEGATE_COMPLETION(Default);
+)
+
+COMPLETION_FUNCTION(LocalFile,
+ DELEGATE_COMPLETION(Default);
+)
+
+COMPLETION_FUNCTION(LocationName,
+ const Configuration &locations(rConfig.GetSubConfiguration(
+ "BackupLocations"));
+
+ std::vector<std::string> locNames =
+ locations.GetSubConfigurationNames();
+
+ for(std::vector<std::string>::iterator
+ pLocName = locNames.begin();
+ pLocName != locNames.end();
+ pLocName++)
+ {
+ if(pLocName->compare(0, pLocName->length(), prefix) == 0)
+ {
+ completions.push_back(*pLocName);
+ }
+ }
+)
+
+COMPLETION_FUNCTION(RemoteFileIdInCurrentDir,
+ int64_t listDirId = rQueries.GetCurrentDirectoryID();
+ int16_t excludeFlags = GetExcludeFlags(rCommand);
+
+ rProtocol.QueryListDirectory(
+ listDirId,
+ BackupProtocolListDirectory::Flags_File,
+ excludeFlags, false /* no attributes */);
+
+ // Retrieve the directory from the stream following
+ BackupStoreDirectory dir;
+ std::auto_ptr<IOStream> dirstream(rProtocol.ReceiveStream());
+ dir.ReadFromStream(*dirstream, rProtocol.GetTimeout());
+
+ // Then... compare each item
+ BackupStoreDirectory::Iterator i(dir);
+ BackupStoreDirectory::Entry *en = 0;
+ while((en = i.Next()) != 0)
+ {
+ std::ostringstream hexId;
+ hexId << std::hex << en->GetObjectID();
+ if(hexId.str().compare(0, prefix.length(), prefix) == 0)
+ {
+ completions.push_back(hexId.str());
+ }
+ }
+)
+
+// TODO implement completion of hex IDs up to the maximum according to Usage
+COMPLETION_FUNCTION(RemoteId,)
+
+COMPLETION_FUNCTION(GetFileOrId,
+ if(rCommand.mOptions.find('i') != std::string::npos)
+ {
+ DELEGATE_COMPLETION(RemoteFileIdInCurrentDir);
+ }
+ else
+ {
+ DELEGATE_COMPLETION(RemoteFile);
+ }
+)
+
+COMPLETION_FUNCTION(CompareLocationOrRemoteDir,
+ if(rCommand.mOptions.find('l') != std::string::npos)
+ {
+ DELEGATE_COMPLETION(LocationName);
+ }
+ else
+ {
+ DELEGATE_COMPLETION(RemoteDir);
+ }
+)
+
+COMPLETION_FUNCTION(CompareNoneOrLocalDir,
+ if(rCommand.mOptions.find('l') != std::string::npos)
+ {
+ // no completions
+ DELEGATE_COMPLETION(None);
+ }
+ else
+ {
+ DELEGATE_COMPLETION(LocalDir);
+ }
+)
+
+COMPLETION_FUNCTION(RestoreRemoteDirOrId,
+ if(rCommand.mOptions.find('i') != std::string::npos)
+ {
+ DELEGATE_COMPLETION(RemoteId);
+ }
+ else
+ {
+ DELEGATE_COMPLETION(RemoteDir);
+ }
+)
+
+// Data about commands
+QueryCommandSpecification commands[] =
+{
+ { "quit", "", Command_Quit, {} },
+ { "exit", "", Command_Quit, {} },
+ { "list", "rodIFtTash", Command_List, {CompleteRemoteDir} },
+ { "pwd", "", Command_pwd, {} },
+ { "cd", "od", Command_cd, {CompleteRemoteDir} },
+ { "lcd", "", Command_lcd, {CompleteLocalDir} },
+ { "sh", "", Command_sh, {CompleteDefault} },
+ { "getobject", "", Command_GetObject,
+ {CompleteRemoteId, CompleteLocalDir} },
+ { "get", "i", Command_Get,
+ {CompleteGetFileOrId, CompleteLocalDir} },
+ { "compare", "alcqAEQ", Command_Compare,
+ {CompleteCompareLocationOrRemoteDir, CompleteCompareNoneOrLocalDir} },
+ { "restore", "drif", Command_Restore,
+ {CompleteRestoreRemoteDirOrId, CompleteLocalDir} },
+ { "help", "", Command_Help, {} },
+ { "usage", "m", Command_Usage, {} },
+ { "undelete", "i", Command_Undelete,
+ {CompleteGetFileOrId} },
+ { "delete", "i", Command_Delete, {CompleteGetFileOrId} },
+ { NULL, NULL, Command_Unknown, {} }
+};
+
+const char *alias[] = {"ls", 0};
+const int aliasIs[] = {Command_List, 0};
+
+BackupQueries::ParsedCommand::ParsedCommand(const std::string& Command,
+ bool isFromCommandLine)
+: mInOptions(false),
+ mFailed(false),
+ pSpec(NULL),
+ mCompleteArgCount(0)
+{
+ mCompleteCommand = Command;
+
+ // is the command a shell command?
+ if(Command[0] == 's' && Command[1] == 'h' && Command[2] == ' ' && Command[3] != '\0')
+ {
+ // Yes, run shell command
+ for(int i = 0; commands[i].type != Command_Unknown; i++)
+ {
+ if(commands[i].type == Command_sh)
+ {
+ pSpec = &(commands[i]);
+ break;
+ }
+ }
+
+ mCmdElements[0] = "sh";
+ mCmdElements[1] = Command.c_str() + 3;
+ return;
+ }
+
+ // split command into components
+ bool inQuoted = false;
+ mInOptions = false;
+
+ std::string currentArg;
+ for (std::string::const_iterator c = Command.begin();
+ c != Command.end(); c++)
+ {
+ // Terminating char?
+ if(*c == ((inQuoted)?'"':' '))
+ {
+ if(!currentArg.empty())
+ {
+ mCmdElements.push_back(currentArg);
+
+ // Because we just found a space, and the last
+ // word was not options (otherwise currentArg
+ // would be empty), we've received a complete
+ // command or non-option argument.
+ mCompleteArgCount++;
+ }
+
+ currentArg.resize(0);
+ inQuoted = false;
+ mInOptions = false;
+ }
+ // Start of quoted parameter?
+ else if(currentArg.empty() && *c == '"')
+ {
+ inQuoted = true;
+ }
+ // Start of options?
+ else if(currentArg.empty() && *c == '-')
+ {
+ mInOptions = true;
+ }
+ else if(mInOptions)
+ {
+ // Option char
+ mOptions += *c;
+ }
+ else
+ {
+ // Normal string char, part of current arg
+ currentArg += *c;
+ }
+ }
+
+ if(!currentArg.empty())
+ {
+ mCmdElements.push_back(currentArg);
+ }
+
+ // If there are no commands then there's nothing to do except return
+ if(mCmdElements.empty())
+ {
+ return;
+ }
+
+ // Work out which command it is...
+ int cmd = 0;
+ while(commands[cmd].name != 0 &&
+ mCmdElements[0] != commands[cmd].name)
+ {
+ cmd++;
+ }
+
+ if(commands[cmd].name == 0)
+ {
+ // Check for aliases
+ int a;
+ for(a = 0; alias[a] != 0; ++a)
+ {
+ if(mCmdElements[0] == alias[a])
+ {
+ // Found an alias
+ cmd = aliasIs[a];
+ break;
+ }
+ }
+ }
+
+ if(commands[cmd].name == 0)
+ {
+ mFailed = true;
+ return;
+ }
+
+ pSpec = &(commands[cmd]);
+
+ #ifdef WIN32
+ if(isFromCommandLine)
+ {
+ std::string converted;
+
+ if(!ConvertEncoding(mCompleteCommand, CP_ACP, converted,
+ GetConsoleCP()))
+ {
+ BOX_ERROR("Failed to convert encoding");
+ mFailed = true;
+ }
+
+ mCompleteCommand = converted;
+
+ for(std::vector<std::string>::iterator
+ i = mCmdElements.begin();
+ i != mCmdElements.end(); i++)
+ {
+ if(!ConvertEncoding(*i, CP_ACP, converted,
+ GetConsoleCP()))
+ {
+ BOX_ERROR("Failed to convert encoding");
+ mFailed = true;
+ }
+
+ *i = converted;
+ }
+ }
+ #endif
+}
+
diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp
index 5aa7e97e..5493f49c 100644
--- a/bin/bbackupquery/bbackupquery.cpp
+++ b/bin/bbackupquery/bbackupquery.cpp
@@ -30,6 +30,7 @@
#include <readline.h>
#endif
#endif
+
#ifdef HAVE_READLINE_HISTORY
#ifdef HAVE_READLINE_HISTORY_H
#include <readline/history.h>
@@ -49,7 +50,7 @@
#include "SSLLib.h"
#include "BackupStoreConstants.h"
#include "BackupStoreException.h"
-#include "autogen_BackupProtocolClient.h"
+#include "autogen_BackupProtocol.h"
#include "BackupQueries.h"
#include "FdGetLine.h"
#include "BackupClientCryptoKeys.h"
@@ -60,20 +61,128 @@
void PrintUsageAndExit()
{
- printf("Usage: bbackupquery [-q*|v*|V|W<level>] [-w] "
+ std::ostringstream out;
+ out <<
+ "Usage: bbackupquery [options] [command]...\n"
+ "\n"
+ "Options:\n"
+ " -q Run more quietly, reduce verbosity level by one, can repeat\n"
+ " -Q Run at minimum verbosity, log nothing\n"
+ " -v Run more verbosely, increase verbosity level by one, can repeat\n"
+ " -V Run at maximum verbosity, log everything\n"
+ " -W <level> Set verbosity to error/warning/notice/info/trace/everything\n"
+ " -w Read/write mode, allow changes to store\n"
#ifdef WIN32
- "[-u] "
+ " -u Enable Unicode console, requires font change to Lucida Console\n"
+#endif
+#ifdef HAVE_LIBREADLINE
+ " -E Disable interactive command editing, may fix entering intl chars\n"
#endif
- "\n"
- "\t[-c config_file] [-o log_file] [-O log_file_level]\n"
- "\t[-l protocol_log_file] [commands]\n"
- "\n"
- "As many commands as you require.\n"
- "If commands are multiple words, remember to enclose the command in quotes.\n"
- "Remember to use the quit command unless you want to end up in interactive mode.\n");
+ " -c <file> Use the specified configuration file. If -c is omitted, the last\n"
+ " argument is the configuration file, or else the default \n"
+ " [" << BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE <<
+ "]\n"
+ " -o <file> Write logging output to specified file as well as console\n"
+ " -O <level> Set file verbosity to error/warning/notice/info/trace/everything\n"
+ " -l <file> Write protocol debugging logs to specified file\n"
+ "\n"
+ "Parameters: as many commands as you like. If commands are multiple words,\n"
+ "remember to enclose the command in quotes. Remember to use the quit command\n"
+ "unless you want to end up in interactive mode.\n";
+ printf("%s", out.str().c_str());
exit(1);
}
+#ifdef HAVE_LIBREADLINE
+static BackupProtocolClient* pProtocol;
+static const Configuration* pConfig;
+static BackupQueries* pQueries;
+static std::vector<std::string> completions;
+static std::auto_ptr<BackupQueries::ParsedCommand> sapCmd;
+
+char * completion_generator(const char *text, int state)
+{
+ if(state == 0)
+ {
+ completions.clear();
+
+ std::string partialCommand(rl_line_buffer, rl_point);
+ sapCmd.reset(new BackupQueries::ParsedCommand(partialCommand,
+ false));
+ int currentArg = sapCmd->mCompleteArgCount;
+
+ if(currentArg == 0) // incomplete command
+ {
+ completions = CompleteCommand(*sapCmd, text, *pProtocol,
+ *pConfig, *pQueries);
+ }
+ else if(sapCmd->mInOptions)
+ {
+ completions = CompleteOptions(*sapCmd, text, *pProtocol,
+ *pConfig, *pQueries);
+ }
+ else if(currentArg - 1 < MAX_COMPLETION_HANDLERS)
+ // currentArg must be at least 1 if we're here
+ {
+ CompletionHandler handler =
+ sapCmd->pSpec->complete[currentArg - 1];
+
+ if(handler != NULL)
+ {
+ completions = handler(*sapCmd, text, *pProtocol,
+ *pConfig, *pQueries);
+ }
+
+ if(std::string(text) == "")
+ {
+ // additional options are also allowed here
+ std::vector<std::string> addOpts =
+ CompleteOptions(*sapCmd, text,
+ *pProtocol, *pConfig,
+ *pQueries);
+
+ for(std::vector<std::string>::iterator
+ i = addOpts.begin();
+ i != addOpts.end(); i++)
+ {
+ completions.push_back(*i);
+ }
+ }
+ }
+ }
+
+ if(state < 0 || state >= (int) completions.size())
+ {
+ rl_attempted_completion_over = 1;
+ return NULL;
+ }
+
+ return strdup(completions[state].c_str());
+ // string must be allocated with malloc() and will be freed
+ // by rl_completion_matches().
+}
+
+#ifdef HAVE_RL_COMPLETION_MATCHES
+ #define RL_COMPLETION_MATCHES rl_completion_matches
+#elif defined HAVE_COMPLETION_MATCHES
+ #define RL_COMPLETION_MATCHES completion_matches
+#else
+ char* no_matches[] = {NULL};
+ char** bbackupquery_completion_dummy(const char *text,
+ char * (completion_generator)(const char *text, int state))
+ {
+ return no_matches;
+ }
+ #define RL_COMPLETION_MATCHES bbackupquery_completion_dummy
+#endif
+
+char ** bbackupquery_completion(const char *text, int start, int end)
+{
+ return RL_COMPLETION_MATCHES(text, completion_generator);
+}
+
+#endif // HAVE_LIBREADLINE
+
int main(int argc, const char *argv[])
{
int returnCode = 0;
@@ -103,13 +212,7 @@ int main(int argc, const char *argv[])
FILE *logFile = 0;
// Filename for configuration file?
- std::string configFilename;
-
- #ifdef WIN32
- configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
- #else
- configFilename = BOX_FILE_BBACKUPD_DEFAULT_CONFIG;
- #endif
+ std::string configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
// Flags
bool readWrite = false;
@@ -123,12 +226,21 @@ int main(int argc, const char *argv[])
#endif
#ifdef WIN32
- const char* validOpts = "qvVwuc:l:o:O:W:";
+ #define WIN32_OPTIONS "u"
bool unicodeConsole = false;
#else
- const char* validOpts = "qvVwc:l:o:O:W:";
+ #define WIN32_OPTIONS
#endif
+#ifdef HAVE_LIBREADLINE
+ #define READLINE_OPTIONS "E"
+ bool useReadline = true;
+#else
+ #define READLINE_OPTIONS
+#endif
+
+ const char* validOpts = "qvVwc:l:o:O:W:" WIN32_OPTIONS READLINE_OPTIONS;
+
std::string fileLogFile;
Log::Level fileLogLevel = Log::INVALID;
@@ -222,6 +334,12 @@ int main(int argc, const char *argv[])
unicodeConsole = true;
break;
#endif
+
+#ifdef HAVE_LIBREADLINE
+ case 'E':
+ useReadline = false;
+ break;
+#endif
case '?':
default:
@@ -317,7 +435,9 @@ int main(int argc, const char *argv[])
// 3. Make a protocol, and handshake
if(!quiet) BOX_INFO("Handshake with store...");
- BackupProtocolClient connection(socket);
+ std::auto_ptr<BackupProtocolClient>
+ apConnection(new BackupProtocolClient(socket));
+ BackupProtocolClient& connection(*(apConnection.get()));
connection.Handshake();
// logging?
@@ -330,15 +450,15 @@ int main(int argc, const char *argv[])
if(!quiet) BOX_INFO("Login to store...");
// Check the version of the server
{
- std::auto_ptr<BackupProtocolClientVersion> serverVersion(connection.QueryVersion(BACKUP_STORE_SERVER_VERSION));
+ std::auto_ptr<BackupProtocolVersion> serverVersion(connection.QueryVersion(BACKUP_STORE_SERVER_VERSION));
if(serverVersion->GetVersion() != BACKUP_STORE_SERVER_VERSION)
{
THROW_EXCEPTION(BackupStoreException, WrongServerVersion)
}
}
// Login -- if this fails, the Protocol will exception
- connection.QueryLogin(conf.GetKeyValueInt("AccountNumber"),
- (readWrite)?0:(BackupProtocolClientLogin::Flags_ReadOnly));
+ connection.QueryLogin(conf.GetKeyValueUint32("AccountNumber"),
+ (readWrite)?0:(BackupProtocolLogin::Flags_ReadOnly));
// 5. Tell user.
if(!quiet) printf("Login complete.\n\nType \"help\" for a list of commands.\n\n");
@@ -351,66 +471,102 @@ int main(int argc, const char *argv[])
int c = 0;
while(c < argc && !context.Stop())
{
- context.DoCommand(argv[c++], true);
+ BackupQueries::ParsedCommand cmd(argv[c++], true);
+ context.DoCommand(cmd);
}
}
// Get commands from input
#ifdef HAVE_LIBREADLINE
- // Must initialise the locale before using editline's readline(),
- // otherwise cannot enter international characters.
- if (setlocale(LC_ALL, "") == NULL)
+ if(useReadline)
{
- BOX_ERROR("Failed to initialise locale. International "
- "character support may not work.");
+ // Must initialise the locale before using editline's
+ // readline(), otherwise cannot enter international characters.
+ if (setlocale(LC_ALL, "") == NULL)
+ {
+ BOX_ERROR("Failed to initialise locale. International "
+ "character support may not work.");
+ }
+
+ #ifdef HAVE_READLINE_HISTORY
+ using_history();
+ #endif
+
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = strdup("bbackupquery");
+
+ /* Tell the completer that we want a crack first. */
+ rl_attempted_completion_function = bbackupquery_completion;
+
+ pProtocol = &connection;
+ pConfig = &conf;
+ pQueries = &context;
}
-#ifdef HAVE_READLINE_HISTORY
- using_history();
+ std::string last_cmd;
#endif
- char *last_cmd = 0;
- while(!context.Stop())
+
+ std::auto_ptr<FdGetLine> apGetLine;
+ if(fileno(stdin) >= 0)
+ {
+ apGetLine.reset(new FdGetLine(fileno(stdin)));
+ }
+
+ while(!context.Stop() && fileno(stdin) >= 0)
{
- char *command = readline("query > ");
- if(command == NULL)
+ std::string cmd_str;
+
+ #ifdef HAVE_LIBREADLINE
+ if(useReadline)
{
- // Ctrl-D pressed -- terminate now
- break;
+ char *cmd_ptr = readline("query > ");
+
+ if(cmd_ptr == NULL)
+ {
+ // Ctrl-D pressed -- terminate now
+ break;
+ }
+
+ cmd_str = cmd_ptr;
+ free(cmd_ptr);
}
- context.DoCommand(command, false);
- if(last_cmd != 0 && ::strcmp(last_cmd, command) == 0)
+ else
+ #endif // HAVE_LIBREADLINE
{
- free(command);
+ printf("query > ");
+ fflush(stdout);
+
+ try
+ {
+ cmd_str = apGetLine->GetLine();
+ }
+ catch(CommonException &e)
+ {
+ if(e.GetSubType() == CommonException::GetLineEOF)
+ {
+ break;
+ }
+ throw;
+ }
}
- else
+
+ BackupQueries::ParsedCommand cmd_parsed(cmd_str, false);
+ if (cmd_parsed.IsEmpty())
{
-#ifdef HAVE_READLINE_HISTORY
- add_history(command);
-#else
- free(last_cmd);
-#endif
- last_cmd = command;
+ continue;
}
- }
-#ifndef HAVE_READLINE_HISTORY
- free(last_cmd);
- last_cmd = 0;
-#endif
-#else
- // Version for platforms which don't have readline by default
- if(fileno(stdin) >= 0)
- {
- FdGetLine getLine(fileno(stdin));
- while(!context.Stop())
+
+ context.DoCommand(cmd_parsed);
+
+ #ifdef HAVE_READLINE_HISTORY
+ if(last_cmd != cmd_str)
{
- printf("query > ");
- fflush(stdout);
- std::string command(getLine.GetLine());
- context.DoCommand(command.c_str(), false);
+ add_history(cmd_str.c_str());
+ last_cmd = cmd_str;
}
+ #endif // HAVE_READLINE_HISTORY
}
-#endif
// Done... stop nicely
if(!quiet) BOX_INFO("Logging off...");
diff --git a/bin/bbackupquery/documentation.txt b/bin/bbackupquery/documentation.txt
index 96eda158..214fe218 100644
--- a/bin/bbackupquery/documentation.txt
+++ b/bin/bbackupquery/documentation.txt
@@ -119,10 +119,13 @@ compare <store-dir-name> <local-dir-name>
This can be used for automated tests.
<
-> restore [-drif] <directory-name> <local-directory-name>
+> restore [-drif] <directory-name> [<local-directory-name>]
Restores a directory to the local disc. The local directory specified
- must not exist (unless a previous restore is being restarted).
+ must not exist (unless a previous restore is being restarted). If the
+ local directory is omitted, the default is to restore to the same
+ directory name and path, relative to the current local directory,
+ as set with the "lcd" command.
The root cannot be restored -- restore locations individually.
diff --git a/bin/bbstoreaccounts/bbstoreaccounts.cpp b/bin/bbstoreaccounts/bbstoreaccounts.cpp
index a9d2b0af..6a5c2e33 100644
--- a/bin/bbstoreaccounts/bbstoreaccounts.cpp
+++ b/bin/bbstoreaccounts/bbstoreaccounts.cpp
@@ -11,7 +11,10 @@
#include <limits.h>
#include <stdio.h>
-#include <unistd.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include <sys/types.h>
@@ -21,17 +24,18 @@
#include <ostream>
#include <vector>
-#include "BoxPortsAndFiles.h"
-#include "BackupStoreConfigVerify.h"
-#include "RaidFileController.h"
#include "BackupStoreAccounts.h"
#include "BackupStoreAccountDatabase.h"
-#include "MainHelper.h"
+#include "BackupStoreCheck.h"
+#include "BackupStoreConfigVerify.h"
#include "BackupStoreInfo.h"
-#include "StoreStructure.h"
+#include "BoxPortsAndFiles.h"
+#include "HousekeepStoreAccount.h"
+#include "MainHelper.h"
#include "NamedLock.h"
+#include "RaidFileController.h"
+#include "StoreStructure.h"
#include "UnixUser.h"
-#include "BackupStoreCheck.h"
#include "Utils.h"
#include "MemLeakFindOn.h"
@@ -59,31 +63,31 @@ void CheckSoftHardLimits(int64_t SoftLimit, int64_t HardLimit)
}
}
-int BlockSizeOfDiscSet(int DiscSet)
+int BlockSizeOfDiscSet(int discSetNum)
{
// Get controller, check disc set number
RaidFileController &controller(RaidFileController::GetController());
- if(DiscSet < 0 || DiscSet >= controller.GetNumDiscSets())
+ if(discSetNum < 0 || discSetNum >= controller.GetNumDiscSets())
{
- BOX_FATAL("Disc set " << DiscSet << " does not exist.");
+ BOX_FATAL("Disc set " << discSetNum << " does not exist.");
exit(1);
}
// Return block size
- return controller.GetDiscSet(DiscSet).GetBlockSize();
+ return controller.GetDiscSet(discSetNum).GetBlockSize();
}
-std::string BlockSizeToString(int64_t Blocks, int64_t MaxBlocks, int DiscSet)
+std::string BlockSizeToString(int64_t Blocks, int64_t MaxBlocks, int discSetNum)
{
- return FormatUsageBar(Blocks, Blocks * BlockSizeOfDiscSet(DiscSet),
- MaxBlocks * BlockSizeOfDiscSet(DiscSet),
+ return FormatUsageBar(Blocks, Blocks * BlockSizeOfDiscSet(discSetNum),
+ MaxBlocks * BlockSizeOfDiscSet(discSetNum),
sMachineReadableOutput);
}
-int64_t SizeStringToBlocks(const char *string, int DiscSet)
+int64_t SizeStringToBlocks(const char *string, int discSetNum)
{
// Find block size
- int blockSize = BlockSizeOfDiscSet(DiscSet);
+ int blockSize = BlockSizeOfDiscSet(discSetNum);
// Get number
char *endptr = (char*)string;
@@ -124,144 +128,174 @@ int64_t SizeStringToBlocks(const char *string, int DiscSet)
}
}
-bool GetWriteLockOnAccount(NamedLock &rLock, const std::string rRootDir, int DiscSetNum)
-{
- std::string writeLockFilename;
- StoreStructure::MakeWriteLockFilename(rRootDir, DiscSetNum, writeLockFilename);
+bool OpenAccount(Configuration &rConfig, int32_t ID, std::string &rRootDirOut,
+ int &rDiscSetOut, std::auto_ptr<UnixUser> apUser, NamedLock* pLock);
- bool gotLock = false;
- int triesLeft = 8;
- do
- {
- gotLock = rLock.TryAndGetLock(writeLockFilename.c_str(), 0600 /* restrictive file permissions */);
-
- if(!gotLock)
- {
- --triesLeft;
- ::sleep(1);
- }
- } while(!gotLock && triesLeft > 0);
+int SetLimit(Configuration &rConfig, int32_t ID, const char *SoftLimitStr,
+ const char *HardLimitStr)
+{
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+ NamedLock writeLock;
- if(!gotLock)
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user, &writeLock))
{
- // Couldn't lock the account -- just stop now
- BOX_ERROR("Failed to lock the account, did not change limits. "
- "Try again later.");
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " to change limits.");
+ return 1;
}
+
+ // Load the info
+ std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::Load(ID, rootDir,
+ discSetNum, false /* Read/Write */));
- return gotLock;
+ // Change the limits
+ int64_t softlimit = SizeStringToBlocks(SoftLimitStr, discSetNum);
+ int64_t hardlimit = SizeStringToBlocks(HardLimitStr, discSetNum);
+ CheckSoftHardLimits(softlimit, hardlimit);
+ info->ChangeLimits(softlimit, hardlimit);
+
+ // Save
+ info->Save();
+
+ BOX_NOTICE("Limits on account " << BOX_FORMAT_ACCOUNT(ID) <<
+ " changed to " << softlimit << " soft, " <<
+ hardlimit << " hard.");
+
+ return 0;
}
-int SetLimit(Configuration &rConfig, const std::string &rUsername, int32_t ID, const char *SoftLimitStr, const char *HardLimitStr)
+int SetAccountName(Configuration &rConfig, int32_t ID,
+ const std::string& rNewAccountName)
{
- // Become the user specified in the config file?
- std::auto_ptr<UnixUser> user;
- if(!rUsername.empty())
- {
- // Username specified, change...
- user.reset(new UnixUser(rUsername.c_str()));
- user->ChangeProcessUser(true /* temporary */);
- // Change will be undone at the end of this function
- }
-
- // Load in the account database
- std::auto_ptr<BackupStoreAccountDatabase> db(BackupStoreAccountDatabase::Read(rConfig.GetKeyValue("AccountDatabase").c_str()));
-
- // Already exists?
- if(!db->EntryExists(ID))
- {
- BOX_ERROR("Account " << BOX_FORMAT_ACCOUNT(ID) <<
- " does not exist.");
- return 1;
- }
-
- // Load it in
- BackupStoreAccounts acc(*db);
std::string rootDir;
- int discSet;
- acc.GetAccountRoot(ID, rootDir, discSet);
-
- // Attempt to lock
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
NamedLock writeLock;
- if(!GetWriteLockOnAccount(writeLock, rootDir, discSet))
+
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user, &writeLock))
{
- // Failed to get lock
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " to change name.");
return 1;
}
// Load the info
- std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::Load(ID, rootDir, discSet, false /* Read/Write */));
+ std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::Load(ID,
+ rootDir, discSetNum, false /* Read/Write */));
- // Change the limits
- int64_t softlimit = SizeStringToBlocks(SoftLimitStr, discSet);
- int64_t hardlimit = SizeStringToBlocks(HardLimitStr, discSet);
- CheckSoftHardLimits(softlimit, hardlimit);
- info->ChangeLimits(softlimit, hardlimit);
+ info->SetAccountName(rNewAccountName);
// Save
info->Save();
- BOX_NOTICE("Limits on account " << BOX_FORMAT_ACCOUNT(ID) <<
- " changed to " << softlimit << " soft, " <<
- hardlimit << " hard.");
+ BOX_NOTICE("Account " << BOX_FORMAT_ACCOUNT(ID) <<
+ " name changed to " << rNewAccountName);
return 0;
}
int AccountInfo(Configuration &rConfig, int32_t ID)
{
- // Load in the account database
- std::auto_ptr<BackupStoreAccountDatabase> db(
- BackupStoreAccountDatabase::Read(
- rConfig.GetKeyValue("AccountDatabase").c_str()));
-
- // Exists?
- if(!db->EntryExists(ID))
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user,
+ NULL /* no write lock needed for this read-only operation */))
{
- BOX_ERROR("Account " << BOX_FORMAT_ACCOUNT(ID) <<
- " does not exist.");
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " to display info.");
return 1;
}
// Load it in
- BackupStoreAccounts acc(*db);
- std::string rootDir;
- int discSet;
- acc.GetAccountRoot(ID, rootDir, discSet);
std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::Load(ID,
- rootDir, discSet, true /* ReadOnly */));
+ rootDir, discSetNum, true /* ReadOnly */));
// Then print out lots of info
std::cout << FormatUsageLineStart("Account ID", sMachineReadableOutput) <<
BOX_FORMAT_ACCOUNT(ID) << std::endl;
+ std::cout << FormatUsageLineStart("Account Name", sMachineReadableOutput) <<
+ info->GetAccountName() << std::endl;
std::cout << FormatUsageLineStart("Last object ID", sMachineReadableOutput) <<
BOX_FORMAT_OBJECTID(info->GetLastObjectIDUsed()) << std::endl;
std::cout << FormatUsageLineStart("Used", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksUsed(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
+ std::cout << FormatUsageLineStart("Current files",
+ sMachineReadableOutput) <<
+ BlockSizeToString(info->GetBlocksInCurrentFiles(),
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Old files", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksInOldFiles(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Deleted files", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksInDeletedFiles(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Directories", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksInDirectories(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Soft limit", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksSoftLimit(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Hard limit", sMachineReadableOutput) <<
BlockSizeToString(info->GetBlocksHardLimit(),
- info->GetBlocksHardLimit(), discSet) << std::endl;
+ info->GetBlocksHardLimit(), discSetNum) << std::endl;
std::cout << FormatUsageLineStart("Client store marker", sMachineReadableOutput) <<
info->GetLastObjectIDUsed() << std::endl;
+ std::cout << FormatUsageLineStart("Live Files", sMachineReadableOutput) <<
+ info->GetNumFiles() << std::endl;
+ std::cout << FormatUsageLineStart("Old Files", sMachineReadableOutput) <<
+ info->GetNumOldFiles() << std::endl;
+ std::cout << FormatUsageLineStart("Deleted Files", sMachineReadableOutput) <<
+ info->GetNumDeletedFiles() << std::endl;
+ std::cout << FormatUsageLineStart("Directories", sMachineReadableOutput) <<
+ info->GetNumDirectories() << std::endl;
+ std::cout << FormatUsageLineStart("Enabled", sMachineReadableOutput) <<
+ (info->IsAccountEnabled() ? "yes" : "no") << std::endl;
return 0;
}
-int DeleteAccount(Configuration &rConfig, const std::string &rUsername, int32_t ID, bool AskForConfirmation)
+int SetAccountEnabled(Configuration &rConfig, int32_t ID, bool enabled)
{
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+ NamedLock writeLock;
+
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user, &writeLock))
+ {
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " to change enabled flag.");
+ return 1;
+ }
+
+ // Load it in
+ std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::Load(ID,
+ rootDir, discSetNum, false /* ReadOnly */));
+ info->SetAccountEnabled(enabled);
+ info->Save();
+ return 0;
+}
+
+int DeleteAccount(Configuration &rConfig, int32_t ID, bool AskForConfirmation)
+{
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+ NamedLock writeLock;
+
+ // Obtain a write lock, as the daemon user
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user, &writeLock))
+ {
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " for deletion.");
+ return 1;
+ }
+
// Check user really wants to do this
if(AskForConfirmation)
{
@@ -275,45 +309,10 @@ int DeleteAccount(Configuration &rConfig, const std::string &rUsername, int32_t
}
}
- // Load in the account database
+ // Back to original user, but write lock is maintained
+ user.reset();
+
std::auto_ptr<BackupStoreAccountDatabase> db(BackupStoreAccountDatabase::Read(rConfig.GetKeyValue("AccountDatabase").c_str()));
-
- // Exists?
- if(!db->EntryExists(ID))
- {
- BOX_ERROR("Account " << BOX_FORMAT_ACCOUNT(ID) <<
- " does not exist.");
- return 1;
- }
-
- // Get info from the database
- BackupStoreAccounts acc(*db);
- std::string rootDir;
- int discSetNum;
- acc.GetAccountRoot(ID, rootDir, discSetNum);
-
- // Obtain a write lock, as the daemon user
- NamedLock writeLock;
- {
- // Bbecome the user specified in the config file
- std::auto_ptr<UnixUser> user;
- if(!rUsername.empty())
- {
- // Username specified, change...
- user.reset(new UnixUser(rUsername.c_str()));
- user->ChangeProcessUser(true /* temporary */);
- // Change will be undone at the end of this function
- }
-
- // Get a write lock
- if(!GetWriteLockOnAccount(writeLock, rootDir, discSetNum))
- {
- // Failed to get lock
- return 1;
- }
-
- // Back to original user, but write is maintained
- }
// Delete from account database
db->DeleteEntry(ID);
@@ -324,15 +323,24 @@ int DeleteAccount(Configuration &rConfig, const std::string &rUsername, int32_t
// Remove the store files...
// First, become the user specified in the config file
- std::auto_ptr<UnixUser> user;
- if(!rUsername.empty())
+ std::string username;
+ {
+ const Configuration &rserverConfig(rConfig.GetSubConfiguration("Server"));
+ if(rserverConfig.KeyExists("User"))
+ {
+ username = rserverConfig.GetKeyValue("User");
+ }
+ }
+
+ // Become the right user
+ if(!username.empty())
{
// Username specified, change...
- user.reset(new UnixUser(rUsername.c_str()));
+ user.reset(new UnixUser(username));
user->ChangeProcessUser(true /* temporary */);
- // Change will be undone at the end of this function
+ // Change will be undone when user goes out of scope
}
-
+
// Secondly, work out which directories need wiping
std::vector<std::string> toDelete;
RaidFileController &rcontroller(RaidFileController::GetController());
@@ -345,6 +353,11 @@ int DeleteAccount(Configuration &rConfig, const std::string &rUsername, int32_t
}
}
+#ifdef WIN32
+ // Cannot remove files while holding a lock on them
+ writeLock.ReleaseLock();
+#endif
+
int retcode = 0;
// Thirdly, delete the directories...
@@ -367,7 +380,8 @@ int DeleteAccount(Configuration &rConfig, const std::string &rUsername, int32_t
return retcode;
}
-int CheckAccount(Configuration &rConfig, const std::string &rUsername, int32_t ID, bool FixErrors, bool Quiet)
+bool OpenAccount(Configuration &rConfig, int32_t ID, std::string &rRootDirOut,
+ int &rDiscSetOut, std::auto_ptr<UnixUser> apUser, NamedLock* pLock)
{
// Load in the account database
std::auto_ptr<BackupStoreAccountDatabase> db(BackupStoreAccountDatabase::Read(rConfig.GetKeyValue("AccountDatabase").c_str()));
@@ -377,23 +391,53 @@ int CheckAccount(Configuration &rConfig, const std::string &rUsername, int32_t I
{
BOX_ERROR("Account " << BOX_FORMAT_ACCOUNT(ID) <<
" does not exist.");
- return 1;
+ return false;
}
// Get info from the database
BackupStoreAccounts acc(*db);
- std::string rootDir;
- int discSetNum;
- acc.GetAccountRoot(ID, rootDir, discSetNum);
-
+ acc.GetAccountRoot(ID, rRootDirOut, rDiscSetOut);
+
+ // Get the user under which the daemon runs
+ std::string username;
+ {
+ const Configuration &rserverConfig(rConfig.GetSubConfiguration("Server"));
+ if(rserverConfig.KeyExists("User"))
+ {
+ username = rserverConfig.GetKeyValue("User");
+ }
+ }
+
// Become the right user
- std::auto_ptr<UnixUser> user;
- if(!rUsername.empty())
+ if(!username.empty())
{
// Username specified, change...
- user.reset(new UnixUser(rUsername.c_str()));
- user->ChangeProcessUser(true /* temporary */);
- // Change will be undone at the end of this function
+ apUser.reset(new UnixUser(username));
+ apUser->ChangeProcessUser(true /* temporary */);
+ // Change will be undone when apUser goes out of scope
+ // in the caller.
+ }
+
+ if(pLock)
+ {
+ acc.LockAccount(ID, *pLock);
+ }
+
+ return true;
+}
+
+int CheckAccount(Configuration &rConfig, int32_t ID, bool FixErrors, bool Quiet)
+{
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+ NamedLock writeLock;
+
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user, &writeLock))
+ {
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " for checking.");
+ return 1;
}
// Check it
@@ -403,7 +447,8 @@ int CheckAccount(Configuration &rConfig, const std::string &rUsername, int32_t I
return check.ErrorsFound()?1:0;
}
-int CreateAccount(Configuration &rConfig, const std::string &rUsername, int32_t ID, int32_t DiscNumber, int32_t SoftLimit, int32_t HardLimit)
+int CreateAccount(Configuration &rConfig, int32_t ID, int32_t DiscNumber,
+ int32_t SoftLimit, int32_t HardLimit)
{
// Load in the account database
std::auto_ptr<BackupStoreAccountDatabase> db(BackupStoreAccountDatabase::Read(rConfig.GetKeyValue("AccountDatabase").c_str()));
@@ -415,16 +460,58 @@ int CreateAccount(Configuration &rConfig, const std::string &rUsername, int32_t
" already exists.");
return 1;
}
+
+ // Get the user under which the daemon runs
+ std::string username;
+ {
+ const Configuration &rserverConfig(rConfig.GetSubConfiguration("Server"));
+ if(rserverConfig.KeyExists("User"))
+ {
+ username = rserverConfig.GetKeyValue("User");
+ }
+ }
// Create it.
BackupStoreAccounts acc(*db);
- acc.Create(ID, DiscNumber, SoftLimit, HardLimit, rUsername);
+ acc.Create(ID, DiscNumber, SoftLimit, HardLimit, username);
BOX_NOTICE("Account " << BOX_FORMAT_ACCOUNT(ID) << " created.");
return 0;
}
+int HousekeepAccountNow(Configuration &rConfig, int32_t ID)
+{
+ std::string rootDir;
+ int discSetNum;
+ std::auto_ptr<UnixUser> user; // used to reset uid when we return
+
+ if(!OpenAccount(rConfig, ID, rootDir, discSetNum, user,
+ NULL /* housekeeping locks the account itself */))
+ {
+ BOX_ERROR("Failed to open account " << BOX_FORMAT_ACCOUNT(ID)
+ << " for housekeeping.");
+ return 1;
+ }
+
+ HousekeepStoreAccount housekeeping(ID, rootDir, discSetNum, NULL);
+ bool success = housekeeping.DoHousekeeping();
+
+ if(!success)
+ {
+ BOX_ERROR("Failed to lock account " << BOX_FORMAT_ACCOUNT(ID)
+ << " for housekeeping: perhaps a client is "
+ "still connected?");
+ return 1;
+ }
+ else
+ {
+ BOX_TRACE("Finished housekeeping on account " <<
+ BOX_FORMAT_ACCOUNT(ID));
+ return 0;
+ }
+}
+
void PrintUsageAndExit()
{
printf(
@@ -440,6 +527,8 @@ void PrintUsageAndExit()
" info [-m] <account>\n"
" Prints information about the specified account including number\n"
" of blocks used. The -m option enable machine-readable output.\n"
+" enabled <accounts> <yes|no>\n"
+" Sets the account as enabled or disabled for new logins.\n"
" setlimit <accounts> <softlimit> <hardlimit>\n"
" Changes the limits of the account as specified. Numbers are\n"
" interpreted as for the 'create' command (suffixed with B, M or G)\n"
@@ -451,6 +540,14 @@ void PrintUsageAndExit()
" provided, any errors discovered that can be fixed automatically\n"
" will be fixed. If the 'quiet' option is provided, less output is\n"
" produced.\n"
+" name <account> <new name>\n"
+" Changes the \"name\" of the account to the specified string.\n"
+" The name is purely cosmetic and intended to make it easier to\n"
+" identify your accounts.\n"
+" housekeep <account>\n"
+" Runs housekeeping immediately on the account. If it cannot be locked,\n"
+" bbstoreaccounts returns an error status code (1), otherwise success\n"
+" (0) even if any errors were fixed by housekeeping.\n"
);
exit(2);
}
@@ -465,17 +562,12 @@ int main(int argc, const char *argv[])
Logging::SetProgramName("bbstoreaccounts");
// Filename for configuration file?
- std::string configFilename;
-
- #ifdef WIN32
- configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
- #else
- configFilename = BOX_FILE_BBSTORED_DEFAULT_CONFIG;
- #endif
+ std::string configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
+ int logLevel = Log::EVERYTHING;
// See if there's another entry on the command line
int c;
- while((c = getopt(argc, (char * const *)argv, "c:m")) != -1)
+ while((c = getopt(argc, (char * const *)argv, "c:W:m")) != -1)
{
switch(c)
{
@@ -484,6 +576,15 @@ int main(int argc, const char *argv[])
configFilename = optarg;
break;
+ case 'W':
+ logLevel = Logging::GetNamedLevel(optarg);
+ if(logLevel == Log::INVALID)
+ {
+ BOX_FATAL("Invalid logging level: " << optarg);
+ return 2;
+ }
+ break;
+
case 'm':
// enable machine readable output
sMachineReadableOutput = true;
@@ -494,6 +595,10 @@ int main(int argc, const char *argv[])
PrintUsageAndExit();
}
}
+
+ Logging::FilterConsole((Log::Level) logLevel);
+ Logging::FilterSyslog (Log::NOTHING);
+
// Adjust arguments
argc -= optind;
argv += optind;
@@ -510,16 +615,6 @@ int main(int argc, const char *argv[])
":" << errs);
}
- // Get the user under which the daemon runs
- std::string username;
- {
- const Configuration &rserverConfig(config->GetSubConfiguration("Server"));
- if(rserverConfig.KeyExists("User"))
- {
- username = rserverConfig.GetKeyValue("User");
- }
- }
-
// Initialise the raid file controller
RaidFileController &rcontroller(RaidFileController::GetController());
rcontroller.Initialise(config->GetKeyValue("RaidFileConf").c_str());
@@ -537,8 +632,10 @@ int main(int argc, const char *argv[])
PrintUsageAndExit();
}
+ std::string command = argv[0];
+
// Now do the command.
- if(::strcmp(argv[0], "create") == 0)
+ if(command == "create")
{
// which disc?
int32_t discnum;
@@ -558,14 +655,39 @@ int main(int argc, const char *argv[])
CheckSoftHardLimits(softlimit, hardlimit);
// Create the account...
- return CreateAccount(*config, username, id, discnum, softlimit, hardlimit);
+ return CreateAccount(*config, id, discnum, softlimit, hardlimit);
}
- else if(::strcmp(argv[0], "info") == 0)
+ else if(command == "info")
{
// Print information on this account
return AccountInfo(*config, id);
}
- else if(::strcmp(argv[0], "setlimit") == 0)
+ else if(command == "enabled")
+ {
+ // Change the AccountEnabled flag on this account
+ if(argc != 3)
+ {
+ PrintUsageAndExit();
+ }
+
+ bool enabled = true;
+ std::string enabled_string = argv[2];
+ if(enabled_string == "yes")
+ {
+ enabled = true;
+ }
+ else if(enabled_string == "no")
+ {
+ enabled = false;
+ }
+ else
+ {
+ PrintUsageAndExit();
+ }
+
+ return SetAccountEnabled(*config, id, enabled);
+ }
+ else if(command == "setlimit")
{
// Change the limits on this account
if(argc < 4)
@@ -574,9 +696,20 @@ int main(int argc, const char *argv[])
return 1;
}
- return SetLimit(*config, username, id, argv[2], argv[3]);
+ return SetLimit(*config, id, argv[2], argv[3]);
+ }
+ else if(command == "name")
+ {
+ // Change the limits on this account
+ if(argc != 3)
+ {
+ BOX_ERROR("name command requires a new name.");
+ return 1;
+ }
+
+ return SetAccountName(*config, id, argv[2]);
}
- else if(::strcmp(argv[0], "delete") == 0)
+ else if(command == "delete")
{
// Delete an account
bool askForConfirmation = true;
@@ -584,9 +717,9 @@ int main(int argc, const char *argv[])
{
askForConfirmation = false;
}
- return DeleteAccount(*config, username, id, askForConfirmation);
+ return DeleteAccount(*config, id, askForConfirmation);
}
- else if(::strcmp(argv[0], "check") == 0)
+ else if(command == "check")
{
bool fixErrors = false;
bool quiet = false;
@@ -610,11 +743,15 @@ int main(int argc, const char *argv[])
}
// Check the account
- return CheckAccount(*config, username, id, fixErrors, quiet);
+ return CheckAccount(*config, id, fixErrors, quiet);
+ }
+ else if(command == "housekeep")
+ {
+ return HousekeepAccountNow(*config, id);
}
else
{
- BOX_ERROR("Unknown command '" << argv[0] << "'.");
+ BOX_ERROR("Unknown command '" << command << "'.");
return 1;
}
@@ -623,4 +760,3 @@ int main(int argc, const char *argv[])
MAINHELPER_END
}
-
diff --git a/bin/bbstored/BBStoreDHousekeeping.cpp b/bin/bbstored/BBStoreDHousekeeping.cpp
index 7f799008..86d6409c 100644
--- a/bin/bbstored/BBStoreDHousekeeping.cpp
+++ b/bin/bbstored/BBStoreDHousekeeping.cpp
@@ -79,8 +79,19 @@ void BackupStoreDaemon::RunHousekeepingIfNeeded()
// Do housekeeping if the time interval has elapsed since the last check
if((timeNow - mLastHousekeepingRun) < housekeepingInterval)
{
+ BOX_TRACE("No need for housekeeping, " <<
+ BoxTimeToSeconds(timeNow - mLastHousekeepingRun) <<
+ " seconds since last run is less than " <<
+ BoxTimeToSeconds(housekeepingInterval));
return;
}
+ else
+ {
+ BOX_TRACE("Running housekeeping now, because " <<
+ BoxTimeToSeconds(timeNow - mLastHousekeepingRun) <<
+ " seconds since last run is more than " <<
+ BoxTimeToSeconds(housekeepingInterval));
+ }
// Store the time
mLastHousekeepingRun = timeNow;
@@ -100,18 +111,28 @@ void BackupStoreDaemon::RunHousekeepingIfNeeded()
{
try
{
- if(mpAccounts)
+ std::string rootDir;
+ int discSet = 0;
+
{
+ // Tag log output to identify account
+ std::ostringstream tag;
+ tag << "hk/" << BOX_FORMAT_ACCOUNT(*i);
+ Logging::Tagger tagWithClientID(tag.str());
+
// Get the account root
- std::string rootDir;
- int discSet = 0;
mpAccounts->GetAccountRoot(*i, rootDir, discSet);
-
- // Do housekeeping on this account
- HousekeepStoreAccount housekeeping(*i, rootDir,
- discSet, this);
- housekeeping.DoHousekeeping();
+
+ // Reset tagging as HousekeepStoreAccount will
+ // do that itself, to avoid duplicate tagging.
+ // Happens automatically when tagWithClientID
+ // goes out of scope.
}
+
+ // Do housekeeping on this account
+ HousekeepStoreAccount housekeeping(*i, rootDir,
+ discSet, this);
+ housekeeping.DoHousekeeping();
}
catch(BoxException &e)
{
diff --git a/bin/bbstored/BackupStoreDaemon.cpp b/bin/bbstored/BackupStoreDaemon.cpp
index 4de0a078..70ca1d67 100644
--- a/bin/bbstored/BackupStoreDaemon.cpp
+++ b/bin/bbstored/BackupStoreDaemon.cpp
@@ -20,7 +20,7 @@
#include "BackupStoreContext.h"
#include "BackupStoreDaemon.h"
#include "BackupStoreConfigVerify.h"
-#include "autogen_BackupProtocolServer.h"
+#include "autogen_BackupProtocol.h"
#include "RaidFileController.h"
#include "BackupStoreAccountDatabase.h"
#include "BackupStoreAccounts.h"
@@ -317,6 +317,8 @@ void BackupStoreDaemon::Connection2(SocketStreamTLS &rStream)
if(::sscanf(clientCommonName.c_str(), "BACKUP-%x", &id) != 1)
{
// Bad! Disconnect immediately
+ BOX_WARNING("Failed login: invalid client common name: " <<
+ clientCommonName);
return;
}
@@ -327,7 +329,7 @@ void BackupStoreDaemon::Connection2(SocketStreamTLS &rStream)
Logging::Tagger tagWithClientID(tag.str());
// Create a context, using this ID
- BackupStoreContext context(id, *this);
+ BackupStoreContext context(id, *this, GetConnectionDetails());
if (mpTestHook)
{
@@ -353,19 +355,22 @@ void BackupStoreDaemon::Connection2(SocketStreamTLS &rStream)
}
catch(...)
{
- LogConnectionStats(clientCommonName.c_str(), rStream);
+ LogConnectionStats(id, context.GetAccountName(), rStream);
throw;
}
- LogConnectionStats(clientCommonName.c_str(), rStream);
+ LogConnectionStats(id, context.GetAccountName(), rStream);
context.CleanUp();
}
-void BackupStoreDaemon::LogConnectionStats(const char *commonName,
- const SocketStreamTLS &s)
+void BackupStoreDaemon::LogConnectionStats(uint32_t accountId,
+ const std::string& accountName, const SocketStreamTLS &s)
{
// Log the amount of data transferred
- BOX_NOTICE("Connection statistics for " << commonName << ":"
+ BOX_NOTICE("Connection statistics for " <<
+ BOX_FORMAT_ACCOUNT(accountId) << " "
+ "(name=" << accountName << "):"
" IN=" << s.GetBytesRead() <<
" OUT=" << s.GetBytesWritten() <<
+ " NET_IN=" << (s.GetBytesRead() - s.GetBytesWritten()) <<
" TOTAL=" << (s.GetBytesRead() + s.GetBytesWritten()));
}
diff --git a/bin/bbstored/BackupStoreDaemon.h b/bin/bbstored/BackupStoreDaemon.h
index 49af5b81..ce538477 100644
--- a/bin/bbstored/BackupStoreDaemon.h
+++ b/bin/bbstored/BackupStoreDaemon.h
@@ -63,11 +63,13 @@ protected:
// Housekeeping functions
void HousekeepingProcess();
- void LogConnectionStats(const char *commonName, const SocketStreamTLS &s);
+ void LogConnectionStats(uint32_t accountId,
+ const std::string& accountName, const SocketStreamTLS &s);
public:
// HousekeepingInterface implementation
virtual bool CheckForInterProcessMsg(int AccountNum = 0, int MaximumWaitTime = 0);
+ void RunHousekeepingIfNeeded();
private:
BackupStoreAccountDatabase *mpAccountDatabase;
@@ -82,7 +84,6 @@ private:
virtual void OnIdle();
void HousekeepingInit();
- void RunHousekeepingIfNeeded();
int64_t mLastHousekeepingRun;
public:
diff --git a/bin/bbstored/bbstored.cpp b/bin/bbstored/bbstored.cpp
index 21a9e5f1..2c18b4fc 100644
--- a/bin/bbstored/bbstored.cpp
+++ b/bin/bbstored/bbstored.cpp
@@ -24,13 +24,7 @@ int main(int argc, const char *argv[])
BackupStoreDaemon daemon;
- #ifdef WIN32
- return daemon.Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
- argc, argv);
- #else
- return daemon.Main(BOX_FILE_BBSTORED_DEFAULT_CONFIG,
- argc, argv);
- #endif
+ return daemon.Main(BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE, argc, argv);
MAINHELPER_END
}
diff --git a/configure.ac b/configure.ac
index 48fb510f..c5a05fe4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([Box Backup], 0.11, [boxbackup@boxbackup.org])
+AC_INIT([Box Backup], 0.11, [boxbackup@boxbackup.org],[boxbackup])
AC_CONFIG_SRCDIR([lib/common/Box.h])
AC_CONFIG_HEADERS([lib/common/BoxConfig.h])
@@ -13,6 +13,7 @@ test -s install-sh || rm install-sh
### Checks for programs.
AC_LANG([C++])
+AC_PROG_CC
AC_PROG_CXX
AC_CXX_EXCEPTIONS
AC_CXX_NAMESPACES
@@ -21,265 +22,7 @@ if test "x$ac_cv_cxx_exceptions" != "xyes" || \
AC_MSG_ERROR([[basic compile checks failed, the C++ compiler is broken]])
fi
-if test "x$GXX" = "xyes"; then
- # Use -Wall if we have gcc. This gives better warnings
- AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef'])
-
- # Use -rdynamic if we have gcc, but not mingw. This is needed for backtrace
- case $target_os in
- mingw*) ;;
- *) AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) ;;
- esac
-fi
-
-AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])])
-
-case $target_os in
-mingw*)
- TARGET_PERL=perl
- ;;
-*)
- TARGET_PERL=$PERL
- ;;
-esac
-
-AC_SUBST([TARGET_PERL])
-AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$TARGET_PERL"],
- [Location of the perl executable])
-
-AC_CHECK_TOOL([AR], [ar],
- [AC_MSG_ERROR([[cannot find ar executable]])])
-AC_CHECK_TOOL([RANLIB], [ranlib],
- [AC_MSG_ERROR([[cannot find ranlib executable]])])
-
-case $target_os in
-mingw*)
- AC_CHECK_TOOL([WINDRES], [windres],
- [AC_MSG_ERROR([[cannot find windres executable]])])
- ;;
-esac
-
-### Checks for libraries.
-
-case $target_os in
-mingw32*) ;;
-winnt) ;;
-*)
- AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
- [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
- ;;
-esac
-
-AC_CHECK_HEADER([zlib.h],, [AC_MSG_ERROR([[cannot find zlib.h]])])
-AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
-VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
-
-## Check for Berkely DB. Restrict to certain versions
-AX_PATH_BDB([1.x or 4.1], [
- LIBS="$BDB_LIBS $LIBS"
- LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
- CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
-
- AX_COMPARE_VERSION([$BDB_VERSION],[ge],[4.1],,
- [AX_COMPARE_VERSION([$BDB_VERSION],[lt],[2],,
- [AC_MSG_ERROR([[only Berkely DB versions 1.x or at least 4.1 are currently supported]])]
- )]
- )
- AX_SPLIT_VERSION([BDB_VERSION], [$BDB_VERSION])
-])
-
-## Check for Open SSL, use old versions only if explicitly requested
-AC_SEARCH_LIBS([gethostbyname], [nsl socket resolv])
-AC_SEARCH_LIBS([shutdown], [nsl socket resolv])
-AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])])
-AC_ARG_ENABLE(
- [old-ssl],
- [AC_HELP_STRING([--enable-old-ssl],
- [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])
-AC_CHECK_LIB(
- [crypto],
- [EVP_CipherInit_ex],, [
- if test "x$enable_old_ssl" = "xyes"; then
- AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])
- else
- AC_MSG_ERROR([[found an old (pre 0.9.7) version of SSL.
-Upgrade or read the documentation for alternatives]])
- fi
- ])
-
-
-### Checks for header files.
-
-case $target_os in
-mingw32*) ;;
-winnt*) ;;
-*)
- AC_HEADER_DIRENT
- ;;
-esac
-
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([dlfcn.h execinfo.h getopt.h process.h pwd.h signal.h])
-AC_CHECK_HEADERS([syslog.h time.h cxxabi.h])
-AC_CHECK_HEADERS([netinet/in.h])
-AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
-AC_CHECK_HEADERS([sys/uio.h sys/xattr.h])
-AC_CHECK_HEADERS([bsd/unistd.h])
-
-AC_CHECK_HEADER([regex.h], [have_regex_h=yes])
-
-if test "$have_regex_h" = "yes"; then
- AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available])
-else
- AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes])
-fi
-
-if test "$have_pcreposix_h" = "yes"; then
- AC_DEFINE([PCRE_STATIC], [1], [Box Backup always uses static PCRE])
- AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp])
-fi
-
-if test "$have_pcreposix_h" = "yes"; then
- AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available])
-fi
-
-if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then
- have_regex_support=yes
- AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported])
-else
- have_regex_support=no
-fi
-
-AC_SEARCH_LIBS([dlsym], ["dl"])
-
-### Checks for typedefs, structures, and compiler characteristics.
-
-AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])
-AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t])
-
-AC_HEADER_STDBOOL
-AC_C_CONST
-AC_C_BIGENDIAN
-AC_TYPE_UID_T
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-
-AC_CHECK_MEMBERS([struct stat.st_flags])
-AC_CHECK_MEMBERS([struct stat.st_mtimespec])
-AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
-AC_CHECK_MEMBERS([struct stat.st_atimensec])
-AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[
- #include <sys/types.h>
- #include <netinet/in.h>
- ]])
-AC_CHECK_MEMBERS([DIR.d_fd],,, [[#include <dirent.h>]])
-AC_CHECK_MEMBERS([DIR.dd_fd],,, [[#include <dirent.h>]])
-
-AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]])
-AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]])
-AC_CHECK_DECLS([O_BINARY],,,)
-
-# Solaris provides getpeerucred() instead of getpeereid() or SO_PEERCRED
-AC_CHECK_HEADERS([ucred.h])
-AC_CHECK_FUNCS([getpeerucred])
-
-AC_CHECK_DECLS([optreset],,, [[#include <getopt.h>]])
-AC_CHECK_DECLS([dirfd],,,
- [[
- #include <getopt.h>
- #include <dirent.h>
- ]])
-
-AC_HEADER_TIME
-AC_STRUCT_TM
-AX_CHECK_DIRENT_D_TYPE
-AC_SYS_LARGEFILE
-AX_CHECK_DEFINE_PRAGMA
-if test "x$ac_cv_c_bigendian" != "xyes"; then
- AX_BSWAP64
-fi
-
-case $target_os in
-mingw32*) ;;
-winnt*) ;;
-*)
- AX_RANDOM_DEVICE
- AX_CHECK_MOUNT_POINT(,[
- AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
- ])
- AC_CHECK_MEMBERS([struct dirent.d_ino],,, [[#include <dirent.h>]])
-;;
-esac
-
-AX_CHECK_MALLOC_WORKAROUND
-
-
-### Checks for library functions.
-
-AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_ERROR_AT_LINE
-AC_TYPE_SIGNAL
-AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid gettimeofday waitpid])
-AC_SEARCH_LIBS([setproctitle], ["bsd"])
-
-# NetBSD implements kqueue too differently for us to get it fixed by 0.10
-# TODO: Remove this when NetBSD kqueue implementation is working
-netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
-if test "$netbsd_hack" != "netbsd"; then
- AC_CHECK_FUNCS([kqueue])
-fi
-
-AX_FUNC_SYSCALL
-AX_CHECK_SYSCALL_LSEEK
-AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])
-AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#include <sys/xattr.h>]])
-
-
-### Miscellaneous complicated feature checks
-
-## Check for large file support active. AC_SYS_LARGEFILE has already worked
-## out how to enable it if necessary, we just use this to report to the user
-AC_CACHE_CHECK([if we have large file support enabled],
- [box_cv_have_large_file_support],
- [AC_TRY_RUN([
- $ac_includes_default
- int main()
- {
- return sizeof(off_t)==4;
- }
- ],
- [box_cv_have_large_file_support=yes],
- [box_cv_have_large_file_support=no],
- [box_cv_have_large_file_support=no # safe for cross-compile]
- )
- ])
-
-if test "x$box_cv_have_large_file_support" = "xyes"; then
- AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1],
- [Define to 1 if large files are supported])
-fi
-
-## Find out how to do file locking
-AC_CHECK_FUNCS([flock])
-AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]])
-AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]])
-
-case $target_os in
-mingw32*) ;;
-winnt*) ;;
-*)
-if test "x$ac_cv_func_flock" != "xyes" && \
- test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \
- test "x$ac_cv_have_decl_F_SETLK" != "xyes"
-then
- AC_MSG_ERROR([[cannot work out how to do file locking on your platform]])
-fi
-;;
-esac
+m4_include([infrastructure/m4/boxbackup_tests.m4])
## Get tmpdir
temp_directory_name="/tmp"
@@ -347,6 +90,7 @@ AC_CONFIG_FILES([infrastructure/BoxPlatform.pm
test/bbackupd/testfiles/bbackupd-exclude.conf
test/bbackupd/testfiles/bbackupd-snapshot.conf
test/bbackupd/testfiles/bbackupd-symlink.conf
+ test/bbackupd/testfiles/bbackupd-temploc.conf
])
AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config
bin/bbackupquery/makedocumentation.pl
@@ -384,6 +128,21 @@ if ! $PERL ./infrastructure/makebuildenv.pl \
exit 1
fi
+cat parcels.txt | sed -e 's/#.*//' | while read cmd subdir configure_args; do
+ if test "$cmd" = "subdir"; then
+ echo
+ export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS
+ args="$configure_args --target=$target_alias"
+ echo "Configuring $subdir with: $args"
+
+ cd $subdir
+ if ! ./configure $args; then
+ echo "Configuring $subdir with $args failed!" >&2
+ exit 1
+ fi
+ fi
+done || exit $?
+
# Write summary of important info
tee config.log.features <<EOC
A summary of the build configuration is below. Box Backup will function
@@ -397,6 +156,13 @@ Readline: $have_libreadline
Extended attributes: $ac_cv_header_sys_xattr_h
EOC
+cat > config.env <<EOC
+CC="$CC"
+CXX="$CXX"
+CXXFLAGS="$CXXFLAGS"
+LDFLAGS="$LDFLAGS"
+LIBS="$LIBS"
+EOC
### Warnings at end for visibility
diff --git a/contrib/mac_osx/org.boxbackup.bbackupd.plist.in b/contrib/mac_osx/org.boxbackup.bbackupd.plist.in
index 803deece..a66f5500 100644
--- a/contrib/mac_osx/org.boxbackup.bbackupd.plist.in
+++ b/contrib/mac_osx/org.boxbackup.bbackupd.plist.in
@@ -4,6 +4,11 @@
<dict>
<key>Label</key>
<string>org.boxbackup.bbackupd</string>
+<<<<<<< HEAD
+=======
+ <key>OnDemand</key>
+ <false/>
+>>>>>>> 0.12
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
diff --git a/contrib/mac_osx/org.boxbackup.bbstored.plist.in b/contrib/mac_osx/org.boxbackup.bbstored.plist.in
index bfe8c88c..7cd746f3 100644
--- a/contrib/mac_osx/org.boxbackup.bbstored.plist.in
+++ b/contrib/mac_osx/org.boxbackup.bbstored.plist.in
@@ -4,6 +4,11 @@
<dict>
<key>Label</key>
<string>org.boxbackup.bbstored</string>
+<<<<<<< HEAD
+=======
+ <key>OnDemand</key>
+ <false/>
+>>>>>>> 0.12
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
@@ -12,7 +17,10 @@
<string>-F</string>
<string>@prefix@/etc/boxbackup/bbackupd.conf</string>
</array>
+<<<<<<< HEAD
</array>
+=======
+>>>>>>> 0.12
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
diff --git a/contrib/suse/bbstored.service b/contrib/suse/bbstored.service
new file mode 100644
index 00000000..55c03ddc
--- /dev/null
+++ b/contrib/suse/bbstored.service
@@ -0,0 +1,26 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Server daemon for the BoxBackup software, to which bbackupd clients
+# connect.
+#
+# Systemd configuration by Daniel Tihelka <dtihelka at gmail.com>
+
+
+[Unit]
+Description=BoxBackup server side daemon
+After=local-fs.target
+#After=network
+
+[Service]
+ExecStart=/usr/sbin/bbstored -FK
+ExecReload=/bin/kill -HUP $MAINPID
+User=box
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/windows/installer/bbackupd.conf.template b/contrib/windows/installer/bbackupd.conf.template
new file mode 100644
index 00000000..969ca619
--- /dev/null
+++ b/contrib/windows/installer/bbackupd.conf.template
@@ -0,0 +1,176 @@
+StoreHostname = @@ServerName@@
+AccountNumber = 0x@@AccountNo@@
+KeysFile = @@InstallDir@@/conf/@@AccountNo@@-FileEncKeys.raw
+
+CertificateFile = @@InstallDir@@/conf/@@AccountNo@@-cert.pem
+PrivateKeyFile = @@InstallDir@@/conf/@@AccountNo@@-key.pem
+TrustedCAsFile = @@InstallDir@@/conf/serverCA.pem
+
+DataDirectory = @@InstallDir@@/state
+
+
+# This script is run whenever bbackupd changes state or encounters a
+# problem which requires the system administrator to assist:
+#
+# 1) The store is full, and no more data can be uploaded.
+# 2) Some files or directories were not readable.
+# 3) A backup run starts or finishes.
+#
+# The default script emails the system administrator, except for backups
+# starting and stopping, where it does nothing.
+
+NotifyScript = @@InstallDir@@/bin/NotifySysAdmin.vbs
+
+# The number of seconds between backup runs under normal conditions. To avoid
+# cycles of load on the server, this time is randomly adjusted by a small
+# percentage as the daemon runs.
+
+UpdateStoreInterval = 3600
+
+
+# The minimum age of a file, in seconds, that will be uploaded. Avoids
+# repeated uploads of a file which is constantly being modified.
+
+MinimumFileAge = 21600
+
+# If a file is modified repeated, it won't be uploaded immediately in case
+# it's modified again, due to the MinimumFileAge specified above. However, it
+# should be uploaded eventually even if it is being modified repeatedly. This
+# is how long we should wait, in seconds, after first noticing a change.
+# (86400 seconds = 1 day)
+
+MaxUploadWait = 86400
+
+# If the connection is idle for some time (e.g. over 10 minutes or 600
+# seconds, not sure exactly how long) then the server will give up and
+# disconnect the client, resulting in Connection Protocol_Timeout errors
+# on the server and TLSReadFailed or TLSWriteFailed errors on the client.
+# Also, some firewalls and NAT gateways will kill idle connections after
+# similar lengths of time.
+#
+# This can happen for example when most files are backed up already and
+# don't need to be sent to the store again, while scanning a large
+# directory, or while calculating diffs of a large file. To avoid this,
+# KeepAliveTime specifies that special keep-alive messages should be sent
+# when the connection is otherwise idle for a certain length of time,
+# specified here in seconds.
+#
+# The default is that these messages are never sent, equivalent to setting
+# this option to zero, but we recommend that all users enable this.
+
+KeepAliveTime = 120
+
+# Files above this size (in bytes) are tracked, and if they are renamed they will simply be
+# renamed on the server, rather than being uploaded again. (64k - 1)
+
+FileTrackingSizeThreshold = 65535
+
+# The daemon does "changes only" uploads for files above this size (in bytes).
+# Files less than it are uploaded whole without this extra processing.
+
+DiffingUploadSizeThreshold = 8192
+
+# The limit on how much time is spent diffing files, in seconds. Most files
+# shouldn't take very long, but if you have really big files you can use this
+# to limit the time spent diffing them.
+#
+# * Reduce if you are having problems with processor usage.
+#
+# * Increase if you have large files, and think the upload of changes is too
+# large and you want bbackupd to spend more time searching for unchanged
+# blocks.
+
+MaximumDiffingTime = 120
+
+# Uncomment this line to see exactly what the daemon is going when it's connected to the server.
+
+# ExtendedLogging = yes
+
+# This specifies a program or script script which is run just before each
+# sync, and ideally the full path to the interpreter. It will be run as the
+# same user bbackupd is running as, usually root.
+#
+# The script must output (print) either "now" or a number to STDOUT (and a
+# terminating newline, no quotes).
+#
+# If the result was "now", then the sync will happen. If it's a number, then
+# no backup will happen for that number of seconds (bbackupd will pause) and
+# then the script will be run again.
+#
+# Use this to temporarily stop bbackupd from syncronising or connecting to the
+# store. For example, you could use this on a laptop to only backup when on a
+# specific network, or when it has a working Internet connection.
+
+# SyncAllowScript = /path/to/intepreter/or/exe script-name parameters etc
+
+# Where the command socket is created in the filesystem.
+
+CommandSocket = @@CommandSocketNamedPipe@@
+
+# Uncomment the StoreObjectInfoFile to enable the experimental archiving
+# of the daemon's state (including client store marker and configuration)
+# between backup runs. This saves time and increases efficiency when
+# bbackupd is frequently stopped and started, since it removes the need
+# to rescan all directories on the remote server. However, it is new and
+# not yet heavily tested, so use with caution.
+
+StoreObjectInfoFile = @@InstallDir@@/state/bbackupd.state
+
+Server
+{
+ PidFile = @@InstallDir@@/state/bbackupd.pid
+}
+
+# BackupLocations specifies which locations on disc should be backed up. Each
+# directory is in the format
+#
+# name
+# {
+# Path = /path/of/directory
+# (optional exclude directives)
+# }
+#
+# 'name' is derived from the Path by the config script, but should merely be
+# unique.
+#
+# The exclude directives are of the form
+#
+# [Exclude|AlwaysInclude][File|Dir][|sRegex] = regex or full pathname
+#
+# (The regex suffix is shown as 'sRegex' to make File or Dir plural)
+#
+# For example:
+#
+# ExcludeDir = /home/guest-user
+# ExcludeFilesRegex = \.(mp3|MP3)\$
+# AlwaysIncludeFile = /home/username/veryimportant.mp3
+#
+# This excludes the directory /home/guest-user from the backup along with all mp3
+# files, except one MP3 file in particular.
+#
+# In general, Exclude excludes a file or directory, unless the directory is
+# explicitly mentioned in a AlwaysInclude directive. However, Box Backup
+# does NOT scan inside excluded directories and will never back up an
+# AlwaysIncluded file or directory inside an excluded directory or any
+# subdirectory thereof.
+#
+# To back up a directory inside an excluded directory, use a configuration
+# like this, to ensure that each directory in the path to the important
+# files is included, but none of their contents will be backed up except
+# the directories further down that path to the important one.
+#
+# ExcludeDirsRegex = ^/home/user/bigfiles/
+# ExcludeFilesRegex = ^/home/user/bigfiles/
+# AlwaysIncludeDir = /home/user/bigfiles/path
+# AlwaysIncludeDir = /home/user/bigfiles/path/to
+# AlwaysIncludeDir = /home/user/bigfiles/path/important
+# AlwaysIncludeDir = /home/user/bigfiles/path/important/files
+# AlwaysIncludeDirsRegex = ^/home/user/bigfiles/path/important/files/
+# AlwaysIncludeFilesRegex = ^/home/user/bigfiles/path/important/files/
+#
+# If a directive ends in Regex, then it is a regular expression rather than a
+# explicit full pathname. See
+#
+# man 7 re_format
+#
+# for the regex syntax on your platform.
diff --git a/contrib/windows/installer/boxbackup.mpi.in b/contrib/windows/installer/boxbackup.mpi.in
index 12f6d62d..182f8c05 100755
--- a/contrib/windows/installer/boxbackup.mpi.in
+++ b/contrib/windows/installer/boxbackup.mpi.in
@@ -1,5 +1,6 @@
array set info {
AccountNo
+<<<<<<< HEAD
10005005
AllowLanguageSelection
@@ -22,6 +23,30 @@ Yes
BBVersionNo
@box_version@
+=======
+{10005005}
+
+AllowLanguageSelection
+{No}
+
+AppName
+{<%BrandName%>}
+
+ApplicationID
+{E10C6FD9-E524-28BD-B0AB3588F16C}
+
+ApplicationURL
+{http://www.boxbackup.org/}
+
+AutoFileGroups
+{No}
+
+AutoRefreshFiles
+{Yes}
+
+BBVersionNo
+{@box_version@}
+>>>>>>> 0.12
BrandName
{Box Backup}
@@ -33,7 +58,11 @@ CancelledInstallAction
{Rollback and Stop}
CleanupCancelledInstall
+<<<<<<< HEAD
Yes
+=======
+{Yes}
+>>>>>>> 0.12
CommandLineFailureAction
{Fail (recommended)}
@@ -42,10 +71,17 @@ Company
{Tebuco, Inc. and Ben Summers and Contributors}
CompressionLevel
+<<<<<<< HEAD
6
CompressionMethod
zlib
+=======
+{6}
+
+CompressionMethod
+{zlib}
+>>>>>>> 0.12
ConfigFileName
{<%InstallDir%>\bbackupd.conf}
@@ -54,6 +90,7 @@ ConfigFileTemplate
{<%InstallDir%>\templates\template.conf}
Copyright
+<<<<<<< HEAD
{2003-2008 Tebuco, Inc. and Ben Summers and Contributors}
CreateDesktopShortcut
@@ -61,11 +98,21 @@ No
CreateQuickLaunchShortcut
No
+=======
+{2003-2011 Tebuco, Inc. and Ben Summers and Contributors}
+
+CreateDesktopShortcut
+{No}
+
+CreateQuickLaunchShortcut
+{No}
+>>>>>>> 0.12
DefaultDirectoryLocation
{}
DefaultLanguage
+<<<<<<< HEAD
English
EncryptedKeyFilePassword
@@ -76,10 +123,29 @@ Ext
ExtractSolidArchivesOnStartup
No
+=======
+{English}
+
+DefaultToSystemLanguage
+{Yes}
+
+EnableResponseFiles
+{Yes}
+
+EncryptedKeyFilePassword
+{Enter_EncryptedKeys_Password_Here}
+
+Ext
+{.exe}
+
+ExtractSolidArchivesOnStartup
+{No}
+>>>>>>> 0.12
Icon
{}
+<<<<<<< HEAD
Image
@build_dir@/docs/html/images/bblogo.png
@@ -88,11 +154,28 @@ Yes
InstallDirSuffix
<%ShortAppName%>
+=======
+IgnoreDirectories
+{}
+
+IgnoreFiles
+{}
+
+Image
+{@build_dir@/docs/html/images/bblogo.png}
+
+IncludeDebugging
+{Yes}
+
+InstallDirSuffix
+{<%ShortAppName%>}
+>>>>>>> 0.12
InstallPassword
{}
InstallVersion
+<<<<<<< HEAD
@box_version@
Language,de
@@ -127,6 +210,57 @@ Yes
LaunchApplication
No
+=======
+{0.0.0.0}
+
+Language,ca
+{No}
+
+Language,cs
+{No}
+
+Language,de
+{No}
+
+Language,en
+{Yes}
+
+Language,es
+{No}
+
+Language,fr
+{No}
+
+Language,hu
+{No}
+
+Language,it
+{No}
+
+Language,lt
+{No}
+
+Language,nl
+{No}
+
+Language,pl
+{No}
+
+Language,pt_br
+{No}
+
+Language,ru
+{No}
+
+LastIgnoreDirectories
+{}
+
+LastIgnoreFiles
+{}
+
+LaunchApplication
+{No}
+>>>>>>> 0.12
PackageDescription
{<%BrandName%> Backup Service}
@@ -138,18 +272,27 @@ PackageMaintainer
{Tebuco, Inc. and Ben Summers and Contributors}
PackageName
+<<<<<<< HEAD
<%ShortAppName%>
+=======
+{<%ShortAppName%>}
+>>>>>>> 0.12
PackagePackager
{Tebuco, Inc. and Ben Summers and Contributors}
PackageRelease
+<<<<<<< HEAD
<%PatchVersion%>
+=======
+{<%PatchVersion%>}
+>>>>>>> 0.12
PackageSummary
{}
PackageVersion
+<<<<<<< HEAD
<%MajorVersion%>.<%MinorVersion%>
PreserveFileAttributes
@@ -193,12 +336,61 @@ Modern_Wizard
ThemeVersion
1
+=======
+{<%MajorVersion%>.<%MinorVersion%>}
+
+PreserveFileAttributes
+{Yes}
+
+PreserveFilePermissions
+{Yes}
+
+ProjectID
+{140B9882-3327-FEA8-13415A62FBB2}
+
+ProjectVersion
+{1.2.15.2}
+
+SaveOnlyToplevelDirs
+{No}
+
+ScriptExt
+{.bat}
+
+ServiceExeName
+{bbackupd.exe}
+
+ServiceName
+{<%BrandName%>}
+
+ShortAppName
+{<%BrandName%>}
+
+SkipUnusedFileGroups
+{Yes}
+
+SystemLanguage
+{en_us}
+
+Theme
+{Modern_Wizard}
+
+ThemeDir
+{Modern_Wizard}
+
+ThemeVersion
+{1}
+>>>>>>> 0.12
UpgradeApplicationID
{}
UserInfoAcctNo
+<<<<<<< HEAD
<%AccountNo%>
+=======
+{<%AccountNo%>}
+>>>>>>> 0.12
UserInfoCompany
{}
@@ -213,6 +405,7 @@ UserInfoPhone
{}
Version
+<<<<<<< HEAD
@box_version@
ViewReadme
@@ -223,6 +416,18 @@ WizardHeight
WizardWidth
500
+=======
+{@box_version@}
+
+ViewReadme
+{No}
+
+WizardHeight
+{365}
+
+WizardWidth
+{500}
+>>>>>>> 0.12
}
@@ -272,6 +477,7 @@ test
{Testing Switch Yes No {} {run uninstaller without uninstalling any files}}
}
+<<<<<<< HEAD
FileGroup ::481451CC-F49C-D389-8645076F595B -setup Install -active Yes -platforms {Windows MacOS-X} -name {Program Files} -parent FileGroups
File ::B9F58CFC-EE7A-BEE4-62CB-2C10665095A2 -filemethod {Update files with more recent dates} -type dir -directory <%InstallDir%> -name /home/petjal/doc/teb/cli/bu/installer/win/2.2 -location @client_parcel_dir@ -parent 481451CC-F49C-D389-8645076F595B
File ::CDDED10B-2747-DD07-5F9D-42A7FD7BB7E6 -name LICENSE.txt -parent B9F58CFC-EE7A-BEE4-62CB-2C10665095A2
@@ -333,10 +539,30 @@ File ::5C3EAB34-7CD4-4DF3-9DEB-0FC23A6F5812 -name bbackupquery.exe -parent B9F58
File ::7633DBC3-EACA-4F9B-9A87-AD3AF0EC298E -name installer.iss -active 0 -parent B9F58CFC-EE7A-BEE4-62CB-2C10665095A2
File ::D3CF86E1-CAFF-4342-8730-463F96EACC39 -targetfilename templates/NotifySysAdmin.original.vbs -name NotifySysAdmin.vbs -parent B9F58CFC-EE7A-BEE4-62CB-2C10665095A2
File ::A702625F-29C7-4CA0-A8F8-E50DBF5C541B -name uninstall.exe -active 0 -parent B9F58CFC-EE7A-BEE4-62CB-2C10665095A2
+=======
+FileGroup ::481451CC-F49C-D389-8645076F595B -setup Install -active Yes -platforms {Windows} -name Binaries -parent FileGroups
+File ::0D5FA1BE-D208-402E-A358-978A57513DCE -name @client_parcel_dir@/bbackupctl.exe -parent 481451CC-F49C-D389-8645076F595B
+File ::4BE333C8-23F0-4629-82D6-E655641D4007 -name @client_parcel_dir@/bbackupd.exe -parent 481451CC-F49C-D389-8645076F595B
+File ::3CDCA9AC-7B3B-4FC2-810E-71C1587E5FBC -name @client_parcel_dir@/bbackupquery.exe -parent 481451CC-F49C-D389-8645076F595B
+File ::AE5153FA-44A5-442B-992B-F8039D23065A -name @build_dir@/../openssl/bin/libeay32.dll -parent 481451CC-F49C-D389-8645076F595B
+File ::1C2A58A1-089D-4929-B92D-397C6C945EBC -name @build_dir@/../openssl/bin/openssl.exe -parent 481451CC-F49C-D389-8645076F595B
+File ::8EB5B7FA-A30B-47E2-BEA4-B0240C07F8C6 -name @build_dir@/../openssl/bin/ssleay32.dll -parent 481451CC-F49C-D389-8645076F595B
+File ::F32E15B3-CBF1-46A7-9E1F-0A17EECF9C39 -name @build_dir@/../zlib/zlib1.dll -parent 481451CC-F49C-D389-8645076F595B
+FileGroup ::2C456223-3E1E-4D43-B31A-868EAD3241E1 -setup Install -active Yes -platforms {Windows} -name Documents -parent FileGroups
+File ::F4DD0436-B84B-4FCA-8AF4-F9F0EEED631A -name @build_dir@/COPYING.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::34214008-502F-4BCD-A668-383FD13A6182 -name @build_dir@/LICENSE.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::30A2FB48-1BDB-445D-BF36-62707DEFBA77 -name @build_dir@/LICENSE-DUAL.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::A2D6E0B2-A641-4426-8835-AA06102FB020 -name @build_dir@/LICENSE-GPL.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::A72A7844-0245-40C8-B5AE-D10F8654318E -name @build_dir@/distribution/boxbackup/CONTACT.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::47390686-C767-4E91-AE69-4A980C67B304 -name @build_dir@/distribution/boxbackup/DOCUMENTATION.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::D4EF569E-F14A-41B7-853C-46C652DA51A7 -name @build_dir@/distribution/boxbackup/THANKS.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+File ::143FE54A-7743-4AA5-9DF9-084ECA4ABFF9 -name @build_dir@/distribution/boxbackup/VERSION.txt -parent 2C456223-3E1E-4D43-B31A-868EAD3241E1
+>>>>>>> 0.12
Component ::4A9C852B-647E-EED5-5482FFBCC2AF -setup Install -active Yes -platforms {Windows MacOS-X} -name {Default Component} -parent Components
SetupType ::8202CECC-54A0-9B6C-D24D111BA52E -setup Install -active Yes -platforms {Windows MacOS-X} -name Typical -parent SetupTypes
InstallComponent AE3BD5B4-35DE-4240-B79914D43E56 -setup Install -type pane -title {Welcome Screen} -component Welcome -active No -parent StandardInstall
+<<<<<<< HEAD
InstallComponent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8 -setup Install -type pane -conditions 4EE35849-FAD7-170B-0E45-FA30636467B1 -title {Install Password} -component InstallPassword -command insert -active No -parent StandardInstall
Condition 4EE35849-FAD7-170B-0E45-FA30636467B1 -active Yes -parent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8 -title {Password Test Condition} -component PasswordTestCondition -TreeObject::id 4EE35849-FAD7-170B-0E45-FA30636467B1
InstallComponent B3B99E2D-C368-A921-B7BC-A71EBDE3AD4D -setup Install -type action -title {Set Install Password} -component SetInstallPassword -active Yes -parent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8
@@ -344,12 +570,25 @@ InstallComponent 1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E -setup Install -type pane
InstallComponent 9013E862-8E81-5290-64F9-D8BCD13EC7E5 -setup Install -type pane -title {User Information Phone Email} -component UserInformation -active Yes -parent StandardInstall
InstallComponent F8FD4BD6-F1DF-3F8D-B857-98310E4B1143 -setup Install -type pane -title {User Information Account No} -component UserInformation -active Yes -parent StandardInstall
InstallComponent 58E1119F-639E-17C9-5D3898F385AA -setup Install -type pane -conditions 84DA7F05-9FB7-CC36-9EC98F8A6826 -title {Select Destination} -component SelectDestination -command insert -active Yes -parent StandardInstall
+=======
+InstallComponent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8 -setup Install -type pane -conditions 4EE35849-FAD7-170B-0E45-FA30636467B1 -title {Install Password} -component InstallPassword -active No -parent StandardInstall
+Condition 4EE35849-FAD7-170B-0E45-FA30636467B1 -active Yes -parent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8 -title {Password Test Condition} -component PasswordTestCondition -TreeObject::id 4EE35849-FAD7-170B-0E45-FA30636467B1
+InstallComponent B3B99E2D-C368-A921-B7BC-A71EBDE3AD4D -setup Install -type action -title {Set Install Password} -component SetInstallPassword -active Yes -parent 2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8
+InstallComponent 1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E -setup Install -type pane -title {User Information} -component UserInformation -active No -parent StandardInstall
+InstallComponent 9013E862-8E81-5290-64F9-D8BCD13EC7E5 -setup Install -type pane -title {User Information Phone Email} -component UserInformation -active No -parent StandardInstall
+InstallComponent F8FD4BD6-F1DF-3F8D-B857-98310E4B1143 -setup Install -type pane -title {User Information Account No} -component UserInformation -active Yes -parent StandardInstall
+InstallComponent 58E1119F-639E-17C9-5D3898F385AA -setup Install -type pane -conditions 84DA7F05-9FB7-CC36-9EC98F8A6826 -title {Select Destination} -component SelectDestination -active Yes -parent StandardInstall
+>>>>>>> 0.12
Condition 84DA7F05-9FB7-CC36-9EC98F8A6826 -active Yes -parent 58E1119F-639E-17C9-5D3898F385AA -title {File Permission Condition} -component FilePermissionCondition -TreeObject::id 84DA7F05-9FB7-CC36-9EC98F8A6826
InstallComponent 0FDBA082-90AB-808C-478A-A13E7C525336 -setup Install -type action -title BackupLocationNumber -component ExecuteScript -active Yes -parent 58E1119F-639E-17C9-5D3898F385AA
InstallComponent 0047FF40-0139-2A59-AAC0-A44D46D6F5CC -setup Install -type action -title BackupLocationName -component ExecuteScript -active No -parent 58E1119F-639E-17C9-5D3898F385AA
InstallComponent 2BB06B72-DE53-2319-B1B8-351CDCBA2008 -setup Install -type action -title AddBackupLocation -component ExecuteScript -active Yes -parent 58E1119F-639E-17C9-5D3898F385AA
InstallComponent B506E7DA-E7C4-4D42-8C03-FD27BA16D078 -setup Install -type pane -title {License Agreement} -component License -active Yes -parent StandardInstall
+<<<<<<< HEAD
InstallComponent B93D2216-1DDB-484C-A9AC-D6C18ED7DE23 -setup Install -type action -conditions {6D9D1ABC-7146-443F-9EE9-205D5CA6C830 79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C} -title {Modify Widget} -component ModifyWidget -command insert -active Yes -parent B506E7DA-E7C4-4D42-8C03-FD27BA16D078
+=======
+InstallComponent B93D2216-1DDB-484C-A9AC-D6C18ED7DE23 -setup Install -type action -conditions {6D9D1ABC-7146-443F-9EE9-205D5CA6C830 79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C} -title {Modify Widget} -component ModifyWidget -active Yes -parent B506E7DA-E7C4-4D42-8C03-FD27BA16D078
+>>>>>>> 0.12
Condition 6D9D1ABC-7146-443F-9EE9-205D5CA6C830 -active Yes -parent B93D2216-1DDB-484C-A9AC-D6C18ED7DE23 -title {String Is Condition} -component StringIsCondition -TreeObject::id 6D9D1ABC-7146-443F-9EE9-205D5CA6C830
Condition 79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C -active Yes -parent B93D2216-1DDB-484C-A9AC-D6C18ED7DE23 -title {String Is Condition} -component StringIsCondition -TreeObject::id 79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C
InstallComponent 37E627F2-E04B-AEF2-D566C017A4D6 -setup Install -type pane -title {Copying Files} -component CopyFiles -active Yes -parent StandardInstall
@@ -366,7 +605,11 @@ InstallComponent 5F2C1F1C-B9F7-1642-59D9-A18318C1D70B -setup Install -type actio
InstallComponent 2EC82FBD-8294-A3E4-7F39-1CBA0582FA64 -setup Install -type action -title {Write Text To File} -component WriteTextToFile -active Yes -parent 37E627F2-E04B-AEF2-D566C017A4D6
InstallComponent 28E76C8B-2605-4739-9FFE-9C2880C17E59 -setup Install -type action -title {Edit config file} -component ExecuteExternalProgram -active No -parent 37E627F2-E04B-AEF2-D566C017A4D6
InstallComponent 52F0A238-57E1-A578-2CE4DA177B32 -setup Install -type action -title {Move Forward} -component MoveForward -active Yes -parent 37E627F2-E04B-AEF2-D566C017A4D6
+<<<<<<< HEAD
InstallComponent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7 -setup Install -type pane -title SetBackupLocations -component CustomBlankPane2 -command reorder -active Yes -parent StandardInstall
+=======
+InstallComponent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7 -setup Install -type pane -title SetBackupLocations -component CustomBlankPane2 -active Yes -parent StandardInstall
+>>>>>>> 0.12
InstallComponent 614C45B2-7515-780C-E444-7F165CF02DD7 -setup Install -type action -title {Execute Script} -component ExecuteScript -active No -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
InstallComponent A5B32DA1-B2FE-C1FA-6057-FBC3059EF076 -setup Install -type action -title {Execute Script} -component ExecuteScript -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
InstallComponent F9E38720-6ABA-8B99-2471-496902E4CBC2 -setup Install -type action -title {Execute Script} -component ExecuteScript -active No -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
@@ -380,12 +623,20 @@ InstallComponent 9892B25C-689B-5B8F-F0C9-B14FF6ACC40C -setup Install -type actio
InstallComponent 8419AAAD-5860-F73E-8D11-4D1BDA4D7D37 -setup Install -type action -title AddAnother -component AddWidget -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
InstallComponent C7762473-273F-E3CA-17E3-65789B14CDB0 -setup Install -type action -title {Write Text To File} -component WriteTextToFile -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
InstallComponent D7FBBEBB-2186-5674-BA87-BB7151859D4E -setup Install -type action -title BackupLocationNumber -component ExecuteScript -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
+<<<<<<< HEAD
InstallComponent 49E80443-62DB-1C10-392D-1091AEA5ED88 -setup Install -type action -conditions EB532611-5F30-3C24-66EB-F3826D9054FD -title {Move to Pane} -component MoveToPane -command insert -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
+=======
+InstallComponent 49E80443-62DB-1C10-392D-1091AEA5ED88 -setup Install -type action -conditions EB532611-5F30-3C24-66EB-F3826D9054FD -title {Move to Pane} -component MoveToPane -active Yes -parent 3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
+>>>>>>> 0.12
Condition EB532611-5F30-3C24-66EB-F3826D9054FD -active Yes -parent 49E80443-62DB-1C10-392D-1091AEA5ED88 -title {String Is Condition} -component StringIsCondition -TreeObject::id EB532611-5F30-3C24-66EB-F3826D9054FD
InstallComponent 9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266 -setup Install -type pane -title {Click Next to Continue} -component CustomBlankPane2 -active Yes -parent StandardInstall
InstallComponent DDBBD8A9-13D7-9509-9202-419E989F60A9 -setup Install -type action -title {Add Widget} -component AddWidget -active No -parent 9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266
InstallComponent 8E095096-F018-A880-429D-A2177A9B70EA -setup Install -type action -title {Add Widget} -component AddWidget -active No -parent 9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266
+<<<<<<< HEAD
InstallComponent 88A50FD5-480F-19A5-DA74-C915EB0A9765 -setup Install -type action -conditions 5EE78EF7-37CA-D440-3DB5-09136CD566B3 -title {Move to Pane} -component MoveToPane -command insert -active No -parent 9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266
+=======
+InstallComponent 88A50FD5-480F-19A5-DA74-C915EB0A9765 -setup Install -type action -conditions 5EE78EF7-37CA-D440-3DB5-09136CD566B3 -title {Move to Pane} -component MoveToPane -active No -parent 9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266
+>>>>>>> 0.12
Condition 5EE78EF7-37CA-D440-3DB5-09136CD566B3 -active Yes -parent 88A50FD5-480F-19A5-DA74-C915EB0A9765 -title {String Is Condition} -component StringIsCondition -TreeObject::id 5EE78EF7-37CA-D440-3DB5-09136CD566B3
InstallComponent 908CE221-5A3D-0A78-24A1-E7C91EBE38D4 -setup Install -type pane -title {Next-Build Config} -component CustomBlankPane2 -active No -parent StandardInstall
InstallComponent DA33B826-E633-A845-4646-76DFA78B907B -setup Install -type pane -title {Custom Blank Pane 2} -component CustomBlankPane2 -active Yes -parent StandardInstall
@@ -400,6 +651,7 @@ InstallComponent 8A761DBD-0640-D98C-9B3AD7672A8F -setup Install -type action -ti
InstallComponent 6E70FB1F-6A43-6C23-3242E965A0D0 -setup Install -type action -title {Execute Action} -component ExecuteAction -active Yes -parent 574198A7-7322-2F5E-02EF185D965C
InstallComponent 8E1A5944-5AF5-5906-16D395E386D8 -setup Install -type action -title {Move Forward} -component MoveForward -active Yes -parent 574198A7-7322-2F5E-02EF185D965C
InstallComponent 1F0926EE-6884-1330-B4A1DB11C1BF -setup Install -type pane -title {Setup Complete} -component SetupComplete -active Yes -parent DefaultInstall
+<<<<<<< HEAD
InstallComponent 3B6E2E7C-1A26-27F1-D578E383B128 -setup Install -type action -conditions {13BD88FE-CD71-5AC7-E99C10B6CB28 E02368C5-95B5-03A7-3282740037B0} -title {View Readme Checkbutton} -component AddWidget -command insert -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
Condition 13BD88FE-CD71-5AC7-E99C10B6CB28 -active Yes -parent 3B6E2E7C-1A26-27F1-D578E383B128 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 13BD88FE-CD71-5AC7-E99C10B6CB28
Condition E02368C5-95B5-03A7-3282740037B0 -active Yes -parent 3B6E2E7C-1A26-27F1-D578E383B128 -title {String Is Condition} -component StringIsCondition -TreeObject::id E02368C5-95B5-03A7-3282740037B0
@@ -410,13 +662,31 @@ InstallComponent 16D53E40-546B-54C3-088B1B5E3BBB -setup Install -type action -co
Condition 4E643D8A-CA31-018D-57D7053C2CE8 -active Yes -parent 16D53E40-546B-54C3-088B1B5E3BBB -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 4E643D8A-CA31-018D-57D7053C2CE8
Condition B39C0455-D1B6-7DDC-E2717F83463E -active Yes -parent 16D53E40-546B-54C3-088B1B5E3BBB -title {String Is Condition} -component StringIsCondition -TreeObject::id B39C0455-D1B6-7DDC-E2717F83463E
InstallComponent 937C3FDD-FB28-98BD-3DAB276E59ED -setup Install -type action -conditions {6B966959-05D9-DB32-8D9C4AD2A3DF 748D673B-DFE6-5F74-329903ACE4DB 3379F80B-36D6-73DC-6FC1D6223A26} -title {Quick Launch Shortcut Checkbutton} -component AddWidget -command insert -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
+=======
+InstallComponent 3B6E2E7C-1A26-27F1-D578E383B128 -setup Install -type action -conditions {13BD88FE-CD71-5AC7-E99C10B6CB28 E02368C5-95B5-03A7-3282740037B0} -title {View Readme Checkbutton} -component AddWidget -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
+Condition 13BD88FE-CD71-5AC7-E99C10B6CB28 -active Yes -parent 3B6E2E7C-1A26-27F1-D578E383B128 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 13BD88FE-CD71-5AC7-E99C10B6CB28
+Condition E02368C5-95B5-03A7-3282740037B0 -active Yes -parent 3B6E2E7C-1A26-27F1-D578E383B128 -title {String Is Condition} -component StringIsCondition -TreeObject::id E02368C5-95B5-03A7-3282740037B0
+InstallComponent CFFA27AF-A641-E41C-B4A0E3BB3CBB -setup Install -type action -conditions {592F46AE-8CEE-01F3-0BA7EBDCA4F4 793D8178-0F51-7F07-BC5886586D3C} -title {Launch Application Checkbutton} -component AddWidget -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
+Condition 592F46AE-8CEE-01F3-0BA7EBDCA4F4 -active Yes -parent CFFA27AF-A641-E41C-B4A0E3BB3CBB -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 592F46AE-8CEE-01F3-0BA7EBDCA4F4
+Condition 793D8178-0F51-7F07-BC5886586D3C -active Yes -parent CFFA27AF-A641-E41C-B4A0E3BB3CBB -title {String Is Condition} -component StringIsCondition -TreeObject::id 793D8178-0F51-7F07-BC5886586D3C
+InstallComponent 16D53E40-546B-54C3-088B1B5E3BBB -setup Install -type action -conditions {4E643D8A-CA31-018D-57D7053C2CE8 B39C0455-D1B6-7DDC-E2717F83463E} -title {Desktop Shortcut Checkbutton} -component AddWidget -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
+Condition 4E643D8A-CA31-018D-57D7053C2CE8 -active Yes -parent 16D53E40-546B-54C3-088B1B5E3BBB -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 4E643D8A-CA31-018D-57D7053C2CE8
+Condition B39C0455-D1B6-7DDC-E2717F83463E -active Yes -parent 16D53E40-546B-54C3-088B1B5E3BBB -title {String Is Condition} -component StringIsCondition -TreeObject::id B39C0455-D1B6-7DDC-E2717F83463E
+InstallComponent 937C3FDD-FB28-98BD-3DAB276E59ED -setup Install -type action -conditions {6B966959-05D9-DB32-8D9C4AD2A3DF 748D673B-DFE6-5F74-329903ACE4DB 3379F80B-36D6-73DC-6FC1D6223A26} -title {Quick Launch Shortcut Checkbutton} -component AddWidget -active Yes -parent 1F0926EE-6884-1330-B4A1DB11C1BF
+>>>>>>> 0.12
Condition 6B966959-05D9-DB32-8D9C4AD2A3DF -active Yes -parent 937C3FDD-FB28-98BD-3DAB276E59ED -title {Platform Condition} -component PlatformCondition -TreeObject::id 6B966959-05D9-DB32-8D9C4AD2A3DF
Condition 748D673B-DFE6-5F74-329903ACE4DB -active Yes -parent 937C3FDD-FB28-98BD-3DAB276E59ED -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 748D673B-DFE6-5F74-329903ACE4DB
Condition 3379F80B-36D6-73DC-6FC1D6223A26 -active Yes -parent 937C3FDD-FB28-98BD-3DAB276E59ED -title {String Is Condition} -component StringIsCondition -TreeObject::id 3379F80B-36D6-73DC-6FC1D6223A26
InstallComponent 3FE82C17-A3E2-4A57-A563-F80818B00B81 -setup Install -type action -title {Console Ask Yes Or No} -component ConsoleAskYesOrNo -active Yes -parent ConsoleInstall
+<<<<<<< HEAD
InstallComponent 56EE5149-6AA2-4E0C-8841-F66A2EF9276E -setup Install -type action -conditions 241BBFCE-4EB1-432F-94DD-69D444DDB6C0 -title Exit -component Exit -command insert -active Yes -parent ConsoleInstall
Condition 241BBFCE-4EB1-432F-94DD-69D444DDB6C0 -active Yes -parent 56EE5149-6AA2-4E0C-8841-F66A2EF9276E -title {String Is Condition} -component StringIsCondition -TreeObject::id 241BBFCE-4EB1-432F-94DD-69D444DDB6C0
InstallComponent 0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5 -setup Install -type action -conditions BC4EA5FD-50BD-4D6E-953F-5E3EDB957360 -title {Console Get User Input} -component ConsoleGetUserInput -command insert -active Yes -parent ConsoleInstall
+=======
+InstallComponent 56EE5149-6AA2-4E0C-8841-F66A2EF9276E -setup Install -type action -conditions 241BBFCE-4EB1-432F-94DD-69D444DDB6C0 -title Exit -component Exit -active Yes -parent ConsoleInstall
+Condition 241BBFCE-4EB1-432F-94DD-69D444DDB6C0 -active Yes -parent 56EE5149-6AA2-4E0C-8841-F66A2EF9276E -title {String Is Condition} -component StringIsCondition -TreeObject::id 241BBFCE-4EB1-432F-94DD-69D444DDB6C0
+InstallComponent 0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5 -setup Install -type action -conditions BC4EA5FD-50BD-4D6E-953F-5E3EDB957360 -title {Console Get User Input} -component ConsoleGetUserInput -active Yes -parent ConsoleInstall
+>>>>>>> 0.12
Condition BC4EA5FD-50BD-4D6E-953F-5E3EDB957360 -active Yes -parent 0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5 -title {File Permission Condition} -component FilePermissionCondition -TreeObject::id BC4EA5FD-50BD-4D6E-953F-5E3EDB957360
InstallComponent B002A311-F8E7-41DE-B039-521391924E5B -setup Install -type action -title {Console Message} -component ConsoleMessage -active Yes -parent ConsoleInstall
InstallComponent D4FC6EB5-DDEE-4E4A-B8E1-D4B588A7928B -setup Install -type action -title {Execute Action} -component ExecuteAction -active Yes -parent ConsoleInstall
@@ -425,16 +695,26 @@ InstallComponent 6B4CB3C2-4799-4C9F-BA8E-1EE47C4606E1 -setup Install -type actio
InstallComponent D8F0AA0F-AD79-C566-15CC508F503B -setup Install -type action -title {Execute Action} -component ExecuteAction -active Yes -parent SilentInstall
InstallComponent 175CBE81-9EBE-1E21-A91479BEEFAE -setup Install -type action -title Exit -component Exit -active Yes -parent SilentInstall
InstallComponent A1DD1DC2-85D7-9BC6-998AC3D4A3A9 -setup Install -type actiongroup -title {Startup Actions} -active Yes -parent ActionGroupsInstall
+<<<<<<< HEAD
InstallComponent 1F9E8CB8-02C1-0416-1F7445B4147F -setup Install -type action -conditions {3D0D1898-4C65-3E66-F82F56581E87 32F5B0AF-EB83-7A03-D8FAE1ECE473} -title Exit -component Exit -command insert -active Yes -parent A1DD1DC2-85D7-9BC6-998AC3D4A3A9
+=======
+InstallComponent 1F9E8CB8-02C1-0416-1F7445B4147F -setup Install -type action -conditions {3D0D1898-4C65-3E66-F82F56581E87 32F5B0AF-EB83-7A03-D8FAE1ECE473} -title Exit -component Exit -active Yes -parent A1DD1DC2-85D7-9BC6-998AC3D4A3A9
+>>>>>>> 0.12
Condition 3D0D1898-4C65-3E66-F82F56581E87 -active Yes -parent 1F9E8CB8-02C1-0416-1F7445B4147F -title {String Is Condition} -component StringIsCondition -TreeObject::id 3D0D1898-4C65-3E66-F82F56581E87
Condition 32F5B0AF-EB83-7A03-D8FAE1ECE473 -active Yes -parent 1F9E8CB8-02C1-0416-1F7445B4147F -title {Ask Yes or No} -component AskYesOrNo -TreeObject::id 32F5B0AF-EB83-7A03-D8FAE1ECE473
InstallComponent 32DC8FB1-A04B-71AA-EC18496D4BD0 -setup Install -type action -title {Create Install Panes} -component CreateInstallPanes -active Yes -parent A1DD1DC2-85D7-9BC6-998AC3D4A3A9
InstallComponent 198905FB-9FAC-23DE-7422D25B8ECA -setup Install -type actiongroup -title {Install Actions} -active Yes -parent ActionGroupsInstall
InstallComponent 4D4A7BF0-7CCE-46E6-BDE5222F82D7 -setup Install -type action -title {Install Selected Files} -component InstallSelectedFiles -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
InstallComponent 53588803-6B41-D9FC-A385906A5106 -setup Install -type action -title {Install Uninstaller} -component InstallUninstaller -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
+<<<<<<< HEAD
InstallComponent 73EA65C1-3BE3-B190-55C3E99F6269 -setup Install -type action -conditions 4EF787E3-0643-DE46-15E64BAF0816 -title {Windows Uninstall Registry} -component AddWindowsUninstallEntry -command insert -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
Condition 4EF787E3-0643-DE46-15E64BAF0816 -active Yes -parent 73EA65C1-3BE3-B190-55C3E99F6269 -title {Platform Condition} -component PlatformCondition -TreeObject::id 4EF787E3-0643-DE46-15E64BAF0816
InstallComponent 39B2B666-78D8-75E6-6EA071594D34 -setup Install -type action -conditions 18C00430-D6B1-151F-307762B3A045 -title {Uninstall Shortcut} -component InstallWindowsShortcut -command insert -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
+=======
+InstallComponent 73EA65C1-3BE3-B190-55C3E99F6269 -setup Install -type action -conditions 4EF787E3-0643-DE46-15E64BAF0816 -title {Windows Uninstall Registry} -component AddWindowsUninstallEntry -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
+Condition 4EF787E3-0643-DE46-15E64BAF0816 -active Yes -parent 73EA65C1-3BE3-B190-55C3E99F6269 -title {Platform Condition} -component PlatformCondition -TreeObject::id 4EF787E3-0643-DE46-15E64BAF0816
+InstallComponent 39B2B666-78D8-75E6-6EA071594D34 -setup Install -type action -conditions 18C00430-D6B1-151F-307762B3A045 -title {Uninstall Shortcut} -component InstallWindowsShortcut -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
+>>>>>>> 0.12
Condition 18C00430-D6B1-151F-307762B3A045 -active Yes -parent 39B2B666-78D8-75E6-6EA071594D34 -title {Platform Condition} -component PlatformCondition -TreeObject::id 18C00430-D6B1-151F-307762B3A045
InstallComponent 6652193C-5D4B-44B6-ABC6-D6E96D89E5DC -setup Install -type action -title {Install Program Folder Shortcut} -component InstallProgramFolderShortcut -active No -parent 198905FB-9FAC-23DE-7422D25B8ECA
InstallComponent 9D101299-B80C-441B-8685-6E3AC61808E8 -setup Install -type action -title {RemoteControl Shortcut} -component InstallProgramFolderShortcut -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
@@ -452,6 +732,7 @@ InstallComponent 9A663209-495B-ED16-09BE-457B61148022 -setup Install -type actio
InstallComponent C0AF7C05-A31A-8376-BCB9-BA8B3A666252 -setup Install -type action -title SafeQueryAll -component InstallProgramFolderShortcut -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
InstallComponent 32B08FB1-99DF-234E-8BAF-333E80AAC9F5 -setup Install -type action -title Usage -component InstallProgramFolderShortcut -active Yes -parent 198905FB-9FAC-23DE-7422D25B8ECA
InstallComponent FEFD090D-C133-BC95-B3564F693CD3 -setup Install -type actiongroup -title {Finish Actions} -active Yes -parent ActionGroupsInstall
+<<<<<<< HEAD
InstallComponent DECC120D-6904-7F17-45A49184A5A3 -setup Install -type action -conditions {E44CFF46-6302-C518-B9C30D2E43F7 B0AA6839-AAB6-A602-C0E4ECA2E4FF} -title {Install Desktop Shortcut} -component InstallDesktopShortcut -command insert -active No -parent FEFD090D-C133-BC95-B3564F693CD3
Condition E44CFF46-6302-C518-B9C30D2E43F7 -active Yes -parent DECC120D-6904-7F17-45A49184A5A3 -title {String Is Condition} -component StringIsCondition -TreeObject::id E44CFF46-6302-C518-B9C30D2E43F7
Condition B0AA6839-AAB6-A602-C0E4ECA2E4FF -active Yes -parent DECC120D-6904-7F17-45A49184A5A3 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id B0AA6839-AAB6-A602-C0E4ECA2E4FF
@@ -464,6 +745,20 @@ Condition 2583A547-11DE-1C27-B6D04B023CC0 -active Yes -parent C105AAAE-7C16-2C9E
Condition A6E1B027-A1B4-5848-4F868D028D00 -active Yes -parent C105AAAE-7C16-2C9E-769FE4535B60 -title {String Is Condition} -component StringIsCondition -TreeObject::id A6E1B027-A1B4-5848-4F868D028D00
Condition 0357FAE9-FCFD-26D8-6541D810CD61 -active Yes -parent C105AAAE-7C16-2C9E-769FE4535B60 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 0357FAE9-FCFD-26D8-6541D810CD61
InstallComponent C33D74B2-26FA-16F5-433A10C6A747 -setup Install -type action -conditions {CC4337CC-F3B5-757C-DFCF5D1D365A 795EE61F-6C0D-4A8B-93E02AA3894A 1528F4F0-145C-A48D-A8526DBB6289} -title {Launch Application} -component ExecuteExternalProgram -command insert -active No -parent FEFD090D-C133-BC95-B3564F693CD3
+=======
+InstallComponent DECC120D-6904-7F17-45A49184A5A3 -setup Install -type action -conditions {E44CFF46-6302-C518-B9C30D2E43F7 B0AA6839-AAB6-A602-C0E4ECA2E4FF} -title {Install Desktop Shortcut} -component InstallDesktopShortcut -active No -parent FEFD090D-C133-BC95-B3564F693CD3
+Condition E44CFF46-6302-C518-B9C30D2E43F7 -active Yes -parent DECC120D-6904-7F17-45A49184A5A3 -title {String Is Condition} -component StringIsCondition -TreeObject::id E44CFF46-6302-C518-B9C30D2E43F7
+Condition B0AA6839-AAB6-A602-C0E4ECA2E4FF -active Yes -parent DECC120D-6904-7F17-45A49184A5A3 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id B0AA6839-AAB6-A602-C0E4ECA2E4FF
+InstallComponent 7B770A07-A785-5215-956FA82CF14E -setup Install -type action -conditions {6F94698F-0839-3ABF-0CF2DF05A4C8 738DD098-7E3B-BC89-875CDB93CBE2 8C866252-8760-9B08-FE569C25B60D} -title {Install Quick Launch Shortcut} -component InstallWindowsShortcut -active No -parent FEFD090D-C133-BC95-B3564F693CD3
+Condition 6F94698F-0839-3ABF-0CF2DF05A4C8 -active Yes -parent 7B770A07-A785-5215-956FA82CF14E -title {String Is Condition} -component StringIsCondition -TreeObject::id 6F94698F-0839-3ABF-0CF2DF05A4C8
+Condition 738DD098-7E3B-BC89-875CDB93CBE2 -active Yes -parent 7B770A07-A785-5215-956FA82CF14E -title {Platform Condition} -component PlatformCondition -TreeObject::id 738DD098-7E3B-BC89-875CDB93CBE2
+Condition 8C866252-8760-9B08-FE569C25B60D -active Yes -parent 7B770A07-A785-5215-956FA82CF14E -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 8C866252-8760-9B08-FE569C25B60D
+InstallComponent C105AAAE-7C16-2C9E-769FE4535B60 -setup Install -type action -conditions {2583A547-11DE-1C27-B6D04B023CC0 A6E1B027-A1B4-5848-4F868D028D00 0357FAE9-FCFD-26D8-6541D810CD61} -title {View Readme Window} -component TextWindow -active No -parent FEFD090D-C133-BC95-B3564F693CD3
+Condition 2583A547-11DE-1C27-B6D04B023CC0 -active Yes -parent C105AAAE-7C16-2C9E-769FE4535B60 -title {String Is Condition} -component StringIsCondition -TreeObject::id 2583A547-11DE-1C27-B6D04B023CC0
+Condition A6E1B027-A1B4-5848-4F868D028D00 -active Yes -parent C105AAAE-7C16-2C9E-769FE4535B60 -title {String Is Condition} -component StringIsCondition -TreeObject::id A6E1B027-A1B4-5848-4F868D028D00
+Condition 0357FAE9-FCFD-26D8-6541D810CD61 -active Yes -parent C105AAAE-7C16-2C9E-769FE4535B60 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 0357FAE9-FCFD-26D8-6541D810CD61
+InstallComponent C33D74B2-26FA-16F5-433A10C6A747 -setup Install -type action -conditions {CC4337CC-F3B5-757C-DFCF5D1D365A 795EE61F-6C0D-4A8B-93E02AA3894A 1528F4F0-145C-A48D-A8526DBB6289} -title {Launch Application} -component ExecuteExternalProgram -active No -parent FEFD090D-C133-BC95-B3564F693CD3
+>>>>>>> 0.12
Condition CC4337CC-F3B5-757C-DFCF5D1D365A -active Yes -parent C33D74B2-26FA-16F5-433A10C6A747 -title {String Is Condition} -component StringIsCondition -TreeObject::id CC4337CC-F3B5-757C-DFCF5D1D365A
Condition 795EE61F-6C0D-4A8B-93E02AA3894A -active Yes -parent C33D74B2-26FA-16F5-433A10C6A747 -title {String Is Condition} -component StringIsCondition -TreeObject::id 795EE61F-6C0D-4A8B-93E02AA3894A
Condition 1528F4F0-145C-A48D-A8526DBB6289 -active Yes -parent C33D74B2-26FA-16F5-433A10C6A747 -title {File Exists Condition} -component FileExistsCondition -TreeObject::id 1528F4F0-145C-A48D-A8526DBB6289
@@ -474,6 +769,7 @@ InstallComponent 7A983CD8-302C-4942-BE59-525C5B5FA2F2 -setup Uninstall -type act
InstallComponent E4DEA723-FC78-45D7-BAB1-A3E4C4C96EA1 -setup Uninstall -type action -title {Stop Service} -component ExecuteExternalProgram -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
InstallComponent B4D31D1E-ADB1-DE8F-18EB7294DDA8 -setup Uninstall -type action -title {Remove Service} -component ExecuteExternalProgram -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
InstallComponent D55BA4AF-E73B-60D1-E26F79175227 -setup Uninstall -type action -title {Execute Action} -component ExecuteAction -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
+<<<<<<< HEAD
InstallComponent 69FD7409-5E2A-143B-DABD1C3B1E67 -setup Uninstall -type action -conditions {96A68CAC-9ED7-806C-086B104720FD E161F216-E597-B340-C1A71C476E2C} -title {Uninstall Leftover Files} -component UninstallLeftoverFiles -command insert -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
Condition 96A68CAC-9ED7-806C-086B104720FD -active Yes -parent 69FD7409-5E2A-143B-DABD1C3B1E67 -title {String Is Condition} -component StringIsCondition -TreeObject::id 96A68CAC-9ED7-806C-086B104720FD
Condition E161F216-E597-B340-C1A71C476E2C -active Yes -parent 69FD7409-5E2A-143B-DABD1C3B1E67 -title {Ask Yes or No} -component AskYesOrNo -TreeObject::id E161F216-E597-B340-C1A71C476E2C
@@ -483,6 +779,17 @@ Condition EB2B31A1-C111-3582-0C8A5656692A -active Yes -parent 41D3E165-C263-5F80
InstallComponent 3D33AA8C-0037-204B-39A339FD38BD -setup Uninstall -type pane -title {Uninstall Complete} -component UninstallComplete -active Yes -parent StandardUninstall
InstallComponent 49E59F91-27F7-46D1-A1C1-19865C2392D3 -setup Uninstall -type action -title {Console Ask Yes Or No} -component ConsoleAskYesOrNo -active Yes -parent ConsoleUninstall
InstallComponent ADA6EB2F-8820-4366-BBEF-ED1335B7F828 -setup Uninstall -type action -conditions 87DE6D78-81E1-495B-A214-B3FF3E7E5614 -title Exit -component Exit -command insert -active Yes -parent ConsoleUninstall
+=======
+InstallComponent 69FD7409-5E2A-143B-DABD1C3B1E67 -setup Uninstall -type action -conditions {96A68CAC-9ED7-806C-086B104720FD E161F216-E597-B340-C1A71C476E2C} -title {Uninstall Leftover Files} -component UninstallLeftoverFiles -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
+Condition 96A68CAC-9ED7-806C-086B104720FD -active Yes -parent 69FD7409-5E2A-143B-DABD1C3B1E67 -title {String Is Condition} -component StringIsCondition -TreeObject::id 96A68CAC-9ED7-806C-086B104720FD
+Condition E161F216-E597-B340-C1A71C476E2C -active Yes -parent 69FD7409-5E2A-143B-DABD1C3B1E67 -title {Ask Yes or No} -component AskYesOrNo -TreeObject::id E161F216-E597-B340-C1A71C476E2C
+InstallComponent 05060263-E852-87AB-8D0F2954CAA6 -setup Uninstall -type action -title {Move Forward} -component MoveForward -active Yes -parent 3B8CDC8E-1239-D2E9-DF4CA6B1756D
+InstallComponent 41D3E165-C263-5F80-0FEEC0AEE47A -setup Uninstall -type pane -conditions EB2B31A1-C111-3582-0C8A5656692A -title {Uninstall Details} -component UninstallDetails -active Yes -parent StandardUninstall
+Condition EB2B31A1-C111-3582-0C8A5656692A -active Yes -parent 41D3E165-C263-5F80-0FEEC0AEE47A -title {String Is Condition} -component StringIsCondition -TreeObject::id EB2B31A1-C111-3582-0C8A5656692A
+InstallComponent 3D33AA8C-0037-204B-39A339FD38BD -setup Uninstall -type pane -title {Uninstall Complete} -component UninstallComplete -active Yes -parent StandardUninstall
+InstallComponent 49E59F91-27F7-46D1-A1C1-19865C2392D3 -setup Uninstall -type action -title {Console Ask Yes Or No} -component ConsoleAskYesOrNo -active Yes -parent ConsoleUninstall
+InstallComponent ADA6EB2F-8820-4366-BBEF-ED1335B7F828 -setup Uninstall -type action -conditions 87DE6D78-81E1-495B-A214-B3FF3E7E5614 -title Exit -component Exit -active Yes -parent ConsoleUninstall
+>>>>>>> 0.12
Condition 87DE6D78-81E1-495B-A214-B3FF3E7E5614 -active Yes -parent ADA6EB2F-8820-4366-BBEF-ED1335B7F828 -title {String Is Condition} -component StringIsCondition -TreeObject::id 87DE6D78-81E1-495B-A214-B3FF3E7E5614
InstallComponent B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174 -setup Uninstall -type action -title {Console Message} -component ConsoleMessage -active Yes -parent ConsoleUninstall
InstallComponent 3C7130B3-3206-403D-B09E-59D4A758FBAD -setup Uninstall -type action -title {Execute Action} -component ExecuteAction -active Yes -parent ConsoleUninstall
@@ -491,7 +798,11 @@ InstallComponent 7F85263E-CAE2-46BA-AAC0-6B89D20FD2DE -setup Uninstall -type act
InstallComponent 17D8BA8E-5992-AA5C-F5ECB73A3433 -setup Uninstall -type action -title {Execute Action} -component ExecuteAction -active Yes -parent SilentUninstall
InstallComponent D3D73C76-D9D3-07DA-63D4163A44BE -setup Uninstall -type action -title Exit -component Exit -active Yes -parent SilentUninstall
InstallComponent 848844B5-6103-9343-8B731B0BE4E0 -setup Uninstall -type actiongroup -title {Startup Actions} -active Yes -parent ActionGroupsUninstall
+<<<<<<< HEAD
InstallComponent 97ACF525-C075-8635-E019202A83D8 -setup Uninstall -type action -conditions {DFFF91A9-2CA5-6ABE-8474D814AF88 4ACB0B47-42B3-2B3A-BFE9AA4EC707} -title Exit -component Exit -command insert -active Yes -parent 848844B5-6103-9343-8B731B0BE4E0
+=======
+InstallComponent 97ACF525-C075-8635-E019202A83D8 -setup Uninstall -type action -conditions {DFFF91A9-2CA5-6ABE-8474D814AF88 4ACB0B47-42B3-2B3A-BFE9AA4EC707} -title Exit -component Exit -active Yes -parent 848844B5-6103-9343-8B731B0BE4E0
+>>>>>>> 0.12
Condition DFFF91A9-2CA5-6ABE-8474D814AF88 -active Yes -parent 97ACF525-C075-8635-E019202A83D8 -title {String Is Condition} -component StringIsCondition -TreeObject::id DFFF91A9-2CA5-6ABE-8474D814AF88
Condition 4ACB0B47-42B3-2B3A-BFE9AA4EC707 -active Yes -parent 97ACF525-C075-8635-E019202A83D8 -title {Ask Yes or No} -component AskYesOrNo -TreeObject::id 4ACB0B47-42B3-2B3A-BFE9AA4EC707
InstallComponent F4024A3E-9A6D-2726-5E0CFFA93054 -setup Uninstall -type actiongroup -title {Uninstall Actions} -active Yes -parent ActionGroupsUninstall
@@ -501,7 +812,11 @@ InstallComponent 905DA2E9-988C-2F27-BB1F5F274AC9 -setup Uninstall -type actiongr
array set Properties {
0047FF40-0139-2A59-AAC0-A44D46D6F5CC,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
0047FF40-0139-2A59-AAC0-A44D46D6F5CC,Comment
{set BackupLocationName "BackupLocation_${BackupLocationNumber}"}
@@ -513,7 +828,11 @@ No
{Before Next Pane is Displayed}
0047FF40-0139-2A59-AAC0-A44D46D6F5CC,ResultVirtualText
+<<<<<<< HEAD
BackupLocationName
+=======
+{BackupLocationName}
+>>>>>>> 0.12
0047FF40-0139-2A59-AAC0-A44D46D6F5CC,TclScript
{set BackupLocationName "BackupLocation_${BackupLocationNumber}"}
@@ -522,22 +841,37 @@ BackupLocationName
{Before Action is Executed}
0357FAE9-FCFD-26D8-6541D810CD61,Filename
+<<<<<<< HEAD
<%ProgramReadme%>
+=======
+{<%ProgramReadme%>}
+>>>>>>> 0.12
05060263-E852-87AB-8D0F2954CAA6,Conditions
{0 conditions}
0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5,Prompt
+<<<<<<< HEAD
<%ConsoleSelectDestinationText%>
0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5,VirtualText
InstallDir
+=======
+{<%ConsoleSelectDestinationText%>}
+
+0C12D2D3-AEBC-42FE-A73A-0815EFB10DA5,VirtualText
+{InstallDir}
+>>>>>>> 0.12
0D93323D-779D-44A8-1E0614E5285D,Conditions
{0 conditions}
0D93323D-779D-44A8-1E0614E5285D,State
+<<<<<<< HEAD
disabled
+=======
+{disabled}
+>>>>>>> 0.12
0D93323D-779D-44A8-1E0614E5285D,Widget
{Back Button;Next Button}
@@ -549,7 +883,11 @@ disabled
{Before Next Pane is Displayed}
0FDBA082-90AB-808C-478A-A13E7C525336,ResultVirtualText
+<<<<<<< HEAD
BackupLocationNumber
+=======
+{BackupLocationNumber}
+>>>>>>> 0.12
0FDBA082-90AB-808C-478A-A13E7C525336,TclScript
{set BackupLocationNumber 1}
@@ -558,13 +896,21 @@ BackupLocationNumber
{Before Action is Executed}
13BD88FE-CD71-5AC7-E99C10B6CB28,Filename
+<<<<<<< HEAD
<%ProgramReadme%>
+=======
+{<%ProgramReadme%>}
+>>>>>>> 0.12
1528F4F0-145C-A48D-A8526DBB6289,CheckCondition
{Before Action is Executed}
1528F4F0-145C-A48D-A8526DBB6289,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
+=======
+{<%ProgramExecutable%>}
+>>>>>>> 0.12
1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,Alias
{Stop Backup Windows Process}
@@ -573,12 +919,17 @@ BackupLocationNumber
{0 conditions}
1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-killbackupprocess
+=======
+{<%ShortAppName%>-program-killbackupprocess}
+>>>>>>> 0.12
1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,ShortcutName
{Stop backup process}
1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/KillBackupProcess.bat
1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,WorkingDirectory
@@ -586,11 +937,21 @@ BackupLocationNumber
16D53E40-546B-54C3-088B1B5E3BBB,Background
white
+=======
+{<%InstallDir%>/tools/KillBackupProcess.bat}
+
+1681CF85-A5D2-4D73-A3FC-52B2A6A1847D,WorkingDirectory
+{<%InstallDir%>}
+
+16D53E40-546B-54C3-088B1B5E3BBB,Background
+{white}
+>>>>>>> 0.12
16D53E40-546B-54C3-088B1B5E3BBB,Conditions
{2 conditions}
16D53E40-546B-54C3-088B1B5E3BBB,Text,subst
+<<<<<<< HEAD
1
16D53E40-546B-54C3-088B1B5E3BBB,Type
@@ -607,6 +968,24 @@ CreateDesktopShortcut
175CBE81-9EBE-1E21-A91479BEEFAE,ExitType
Finish
+=======
+{1}
+
+16D53E40-546B-54C3-088B1B5E3BBB,Type
+{checkbutton}
+
+16D53E40-546B-54C3-088B1B5E3BBB,VirtualText
+{CreateDesktopShortcut}
+
+16D53E40-546B-54C3-088B1B5E3BBB,X
+{185}
+
+16D53E40-546B-54C3-088B1B5E3BBB,Y
+{180}
+
+175CBE81-9EBE-1E21-A91479BEEFAE,ExitType
+{Finish}
+>>>>>>> 0.12
17D8BA8E-5992-AA5C-F5ECB73A3433,Action
{Uninstall Actions}
@@ -618,7 +997,11 @@ Finish
{Before Action is Executed}
18C00430-D6B1-151F-307762B3A045,Platform
+<<<<<<< HEAD
Windows
+=======
+{Windows}
+>>>>>>> 0.12
198905FB-9FAC-23DE-7422D25B8ECA,Alias
{Install Actions}
@@ -630,13 +1013,21 @@ Windows
{0 conditions}
19ADBDDB-1690-4A57-913E32A026C4,State
+<<<<<<< HEAD
disabled
+=======
+{disabled}
+>>>>>>> 0.12
19ADBDDB-1690-4A57-913E32A026C4,Widget
{NextButton; CancelButton}
1AF5CD58-65C0-49CB-9A9D-994816CF414E,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
1AF5CD58-65C0-49CB-9A9D-994816CF414E,Alias
{Upload File Listing}
@@ -648,12 +1039,17 @@ No
{0 conditions}
1AF5CD58-65C0-49CB-9A9D-994816CF414E,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-TebucoSafeQuerypload
+=======
+{<%ShortAppName%>-program-TebucoSafeQuerypload}
+>>>>>>> 0.12
1AF5CD58-65C0-49CB-9A9D-994816CF414E,ShortcutName
{Upload Filelisting to TebucoSafe for review}
1AF5CD58-65C0-49CB-9A9D-994816CF414E,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/TebucoSafeQueryUpload.bat
1AF5CD58-65C0-49CB-9A9D-994816CF414E,WorkingDirectory
@@ -673,11 +1069,30 @@ Yes
1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,CompanyLabel,subst
0
+=======
+{<%InstallDir%>/tools/TebucoSafeQueryUpload.bat}
+
+1AF5CD58-65C0-49CB-9A9D-994816CF414E,WorkingDirectory
+{<%InstallDir%>}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,BackButton,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,CancelButton,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,Caption,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,CompanyLabel,subst
+{0}
+>>>>>>> 0.12
1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,Conditions
{0 conditions}
1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,Message,subst
+<<<<<<< HEAD
1
1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,NextButton,subst
@@ -694,6 +1109,24 @@ Yes
1C14291C-0971-4283-92E9-3808401303F5,Active
No
+=======
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,NextButton,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,Subtitle,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,Title,subst
+{1}
+
+1BEFB82C-C073-73D4-CFCE-F5DE7A674D9E,UserNameLabel,subst
+{0}
+
+1C14291C-0971-4283-92E9-3808401303F5,Active
+{No}
+>>>>>>> 0.12
1C14291C-0971-4283-92E9-3808401303F5,Comment
{Don't start it yet, need to install keys by hand.}
@@ -705,6 +1138,7 @@ No
{net start <%ServiceName%>}
1C14291C-0971-4283-92E9-3808401303F5,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
1F0926EE-6884-1330-B4A1DB11C1BF,BackButton,subst
@@ -721,6 +1155,24 @@ No
1F0926EE-6884-1330-B4A1DB11C1BF,NextButton,subst
1
+=======
+{<%InstallDir%>}
+
+1F0926EE-6884-1330-B4A1DB11C1BF,BackButton,subst
+{1}
+
+1F0926EE-6884-1330-B4A1DB11C1BF,CancelButton,subst
+{1}
+
+1F0926EE-6884-1330-B4A1DB11C1BF,Caption,subst
+{1}
+
+1F0926EE-6884-1330-B4A1DB11C1BF,Message,subst
+{1}
+
+1F0926EE-6884-1330-B4A1DB11C1BF,NextButton,subst
+{1}
+>>>>>>> 0.12
1F9E8CB8-02C1-0416-1F7445B4147F,Comment
{Ask the user if they want to proceed with the install.}
@@ -729,25 +1181,43 @@ No
{2 conditions}
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message,subst
+<<<<<<< HEAD
1
+=======
+{1}
+>>>>>>> 0.12
241BBFCE-4EB1-432F-94DD-69D444DDB6C0,CheckCondition
{Before Action is Executed}
241BBFCE-4EB1-432F-94DD-69D444DDB6C0,Operator
+<<<<<<< HEAD
false
241BBFCE-4EB1-432F-94DD-69D444DDB6C0,String
<%Answer%>
+=======
+{false}
+
+241BBFCE-4EB1-432F-94DD-69D444DDB6C0,String
+{<%Answer%>}
+>>>>>>> 0.12
2583A547-11DE-1C27-B6D04B023CC0,CheckCondition
{Before Action is Executed}
2583A547-11DE-1C27-B6D04B023CC0,Operator
+<<<<<<< HEAD
false
2583A547-11DE-1C27-B6D04B023CC0,String
<%SilentMode%>
+=======
+{false}
+
+2583A547-11DE-1C27-B6D04B023CC0,String
+{<%SilentMode%>}
+>>>>>>> 0.12
25AA533E-02FC-47D9-9273-25266B8FA1F9,Alias
{Remove Backup Service}
@@ -759,12 +1229,17 @@ false
{0 conditions}
25AA533E-02FC-47D9-9273-25266B8FA1F9,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-removeService
+=======
+{<%ShortAppName%>-program-removeService}
+>>>>>>> 0.12
25AA533E-02FC-47D9-9273-25266B8FA1F9,ShortcutName
{Remove Service}
25AA533E-02FC-47D9-9273-25266B8FA1F9,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/RemoveService.bat
25AA533E-02FC-47D9-9273-25266B8FA1F9,WorkingDirectory
@@ -772,6 +1247,15 @@ false
28E76C8B-2605-4739-9FFE-9C2880C17E59,Active
No
+=======
+{<%InstallDir%>/tools/RemoveService.bat}
+
+25AA533E-02FC-47D9-9273-25266B8FA1F9,WorkingDirectory
+{<%InstallDir%>}
+
+28E76C8B-2605-4739-9FFE-9C2880C17E59,Active
+{No}
+>>>>>>> 0.12
28E76C8B-2605-4739-9FFE-9C2880C17E59,Conditions
{0 conditions}
@@ -780,6 +1264,7 @@ No
{notepad <%ConfigFileName%>}
28E76C8B-2605-4739-9FFE-9C2880C17E59,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,BackButton,subst
@@ -790,11 +1275,24 @@ No
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Caption,subst
1
+=======
+{<%InstallDir%>}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,BackButton,subst
+{1}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,CancelButton,subst
+{1}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Caption,subst
+{1}
+>>>>>>> 0.12
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Conditions
{1 condition}
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Message,subst
+<<<<<<< HEAD
1
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,NextButton,subst
@@ -805,6 +1303,18 @@ No
2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Title,subst
1
+=======
+{1}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,NextButton,subst
+{1}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Subtitle,subst
+{1}
+
+2AC89879-6E9D-3D4E-F28E-5985EEBFAAA8,Title,subst
+{1}
+>>>>>>> 0.12
2BB06B72-DE53-2319-B1B8-351CDCBA2008,Conditions
{0 conditions}
@@ -813,18 +1323,33 @@ No
{Before Next Pane is Displayed}
2BB06B72-DE53-2319-B1B8-351CDCBA2008,ResultVirtualText
+<<<<<<< HEAD
AddBackupLocation
+=======
+{AddBackupLocation}
+>>>>>>> 0.12
2BB06B72-DE53-2319-B1B8-351CDCBA2008,TclScript
{set AddBackupLocation no}
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message,subst
+<<<<<<< HEAD
1
+=======
+{1}
+
+2C456223-3E1E-4D43-B31A-868EAD3241E1,Destination
+{<%InstallDir%>}
+
+2C456223-3E1E-4D43-B31A-868EAD3241E1,Name
+{Documents}
+>>>>>>> 0.12
2E2963BD-DDBD-738D-A910-B7F3F04946F9,Conditions
{0 conditions}
2E2963BD-DDBD-738D-A910-B7F3F04946F9,Text,subst
+<<<<<<< HEAD
1
2E2963BD-DDBD-738D-A910-B7F3F04946F9,Value
@@ -838,6 +1363,21 @@ AddBackupLocation
2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,AppendNewline
No
+=======
+{1}
+
+2E2963BD-DDBD-738D-A910-B7F3F04946F9,Value
+{<%AddBackupLocation%>}
+
+2E2963BD-DDBD-738D-A910-B7F3F04946F9,X
+{400}
+
+2E2963BD-DDBD-738D-A910-B7F3F04946F9,Y
+{70}
+
+2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,AppendNewline
+{No}
+>>>>>>> 0.12
2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,Comment
{.conf doesn't exist yet}
@@ -849,15 +1389,23 @@ No
{Append to file}
2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,Files
+<<<<<<< HEAD
<%ConfigFileTemplate%>
2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,TextToWrite,subst
1
+=======
+{<%ConfigFileTemplate%>}
+
+2EC82FBD-8294-A3E4-7F39-1CBA0582FA64,TextToWrite,subst
+{1}
+>>>>>>> 0.12
32B08FB1-99DF-234E-8BAF-333E80AAC9F5,Conditions
{0 conditions}
32B08FB1-99DF-234E-8BAF-333E80AAC9F5,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-Usage
32B08FB1-99DF-234E-8BAF-333E80AAC9F5,ShortcutName
@@ -868,6 +1416,18 @@ Usage
32B08FB1-99DF-234E-8BAF-333E80AAC9F5,WorkingDirectory
<%InstallDir%>
+=======
+{<%ShortAppName%>-program-Usage}
+
+32B08FB1-99DF-234E-8BAF-333E80AAC9F5,ShortcutName
+{Usage}
+
+32B08FB1-99DF-234E-8BAF-333E80AAC9F5,TargetFileName
+{<%InstallDir%>/tools/ShowUsage.bat}
+
+32B08FB1-99DF-234E-8BAF-333E80AAC9F5,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
32DC8FB1-A04B-71AA-EC18496D4BD0,Conditions
{0 conditions}
@@ -876,6 +1436,7 @@ Usage
{Before Action is Executed}
32F5B0AF-EB83-7A03-D8FAE1ECE473,Message,subst
+<<<<<<< HEAD
1
32F5B0AF-EB83-7A03-D8FAE1ECE473,Title,subst
@@ -883,11 +1444,21 @@ Usage
32F5B0AF-EB83-7A03-D8FAE1ECE473,TrueValue
No
+=======
+{1}
+
+32F5B0AF-EB83-7A03-D8FAE1ECE473,Title,subst
+{1}
+
+32F5B0AF-EB83-7A03-D8FAE1ECE473,TrueValue
+{No}
+>>>>>>> 0.12
3379F80B-36D6-73DC-6FC1D6223A26,CheckCondition
{Before Action is Executed}
3379F80B-36D6-73DC-6FC1D6223A26,Operator
+<<<<<<< HEAD
false
3379F80B-36D6-73DC-6FC1D6223A26,String
@@ -895,17 +1466,31 @@ false
362B6D6A-11BC-83CE-AFF6-410D8FBCF54D,Active
No
+=======
+{false}
+
+3379F80B-36D6-73DC-6FC1D6223A26,String
+{<%InstallStopped%>}
+
+362B6D6A-11BC-83CE-AFF6-410D8FBCF54D,Active
+{No}
+>>>>>>> 0.12
362B6D6A-11BC-83CE-AFF6-410D8FBCF54D,Conditions
{0 conditions}
362B6D6A-11BC-83CE-AFF6-410D8FBCF54D,ResultVirtualText
+<<<<<<< HEAD
BackupLocationExclusions
+=======
+{BackupLocationExclusions}
+>>>>>>> 0.12
362B6D6A-11BC-83CE-AFF6-410D8FBCF54D,TclScript
{set BackupLocationExclusions ""}
37E627F2-E04B-AEF2-D566C017A4D6,BackButton,subst
+<<<<<<< HEAD
1
37E627F2-E04B-AEF2-D566C017A4D6,CancelButton,subst
@@ -913,11 +1498,21 @@ BackupLocationExclusions
37E627F2-E04B-AEF2-D566C017A4D6,Caption,subst
1
+=======
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,CancelButton,subst
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,Caption,subst
+{1}
+>>>>>>> 0.12
37E627F2-E04B-AEF2-D566C017A4D6,Conditions
{0 conditions}
37E627F2-E04B-AEF2-D566C017A4D6,FileLabel,subst
+<<<<<<< HEAD
1
37E627F2-E04B-AEF2-D566C017A4D6,Message,subst
@@ -934,6 +1529,24 @@ BackupLocationExclusions
37E627F2-E04B-AEF2-D566C017A4D6,Title,subst
1
+=======
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,Message,subst
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,NextButton,subst
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,ProgressValue,subst
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,Subtitle,subst
+{1}
+
+37E627F2-E04B-AEF2-D566C017A4D6,Title,subst
+{1}
+>>>>>>> 0.12
39270FD8-932E-6132-7EF795ED9B93,Alias
{Finish Actions}
@@ -948,21 +1561,33 @@ BackupLocationExclusions
{Uninstall <%BrandName%>}
39B2B666-78D8-75E6-6EA071594D34,TargetFileName
+<<<<<<< HEAD
<%Uninstaller%>
39B2B666-78D8-75E6-6EA071594D34,WorkingDirectory
<%InstallDir%>
+=======
+{<%Uninstaller%>}
+
+39B2B666-78D8-75E6-6EA071594D34,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
39D7394E-04E9-CA70-0034DB830BFE,Conditions
{0 conditions}
3B6E2E7C-1A26-27F1-D578E383B128,Background
+<<<<<<< HEAD
white
+=======
+{white}
+>>>>>>> 0.12
3B6E2E7C-1A26-27F1-D578E383B128,Conditions
{2 conditions}
3B6E2E7C-1A26-27F1-D578E383B128,Text,subst
+<<<<<<< HEAD
1
3B6E2E7C-1A26-27F1-D578E383B128,Type
@@ -985,11 +1610,36 @@ ViewReadme
3B8CDC8E-1239-D2E9-DF4CA6B1756D,Caption,subst
1
+=======
+{1}
+
+3B6E2E7C-1A26-27F1-D578E383B128,Type
+{checkbutton}
+
+3B6E2E7C-1A26-27F1-D578E383B128,VirtualText
+{ViewReadme}
+
+3B6E2E7C-1A26-27F1-D578E383B128,X
+{185}
+
+3B6E2E7C-1A26-27F1-D578E383B128,Y
+{140}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,BackButton,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,CancelButton,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,Caption,subst
+{1}
+>>>>>>> 0.12
3B8CDC8E-1239-D2E9-DF4CA6B1756D,Conditions
{0 conditions}
3B8CDC8E-1239-D2E9-DF4CA6B1756D,FileValue,subst
+<<<<<<< HEAD
1
3B8CDC8E-1239-D2E9-DF4CA6B1756D,Message,subst
@@ -1006,6 +1656,24 @@ ViewReadme
3B8CDC8E-1239-D2E9-DF4CA6B1756D,Title,subst
1
+=======
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,Message,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,NextButton,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,ProgressValue,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,Subtitle,subst
+{1}
+
+3B8CDC8E-1239-D2E9-DF4CA6B1756D,Title,subst
+{1}
+>>>>>>> 0.12
3C7130B3-3206-403D-B09E-59D4A758FBAD,Action
{Uninstall Actions}
@@ -1014,21 +1682,33 @@ ViewReadme
{0 conditions}
3CFFF099-6122-46DD-9CE4-F5819434AC53,IgnoreErrors
+<<<<<<< HEAD
Yes
+=======
+{Yes}
+>>>>>>> 0.12
3CFFF099-6122-46DD-9CE4-F5819434AC53,ProgramCommandLine
{net stop <%ServiceName%>}
3CFFF099-6122-46DD-9CE4-F5819434AC53,ProgressiveOutputWidget
+<<<<<<< HEAD
Message
3CFFF099-6122-46DD-9CE4-F5819434AC53,WorkingDirectory
<%Temp%>
+=======
+{Message}
+
+3CFFF099-6122-46DD-9CE4-F5819434AC53,WorkingDirectory
+{<%Temp%>}
+>>>>>>> 0.12
3D0D1898-4C65-3E66-F82F56581E87,CheckCondition
{Before Action is Executed}
3D0D1898-4C65-3E66-F82F56581E87,Operator
+<<<<<<< HEAD
false
3D0D1898-4C65-3E66-F82F56581E87,String
@@ -1042,11 +1722,27 @@ false
3D33AA8C-0037-204B-39A339FD38BD,Caption,subst
1
+=======
+{false}
+
+3D0D1898-4C65-3E66-F82F56581E87,String
+{<%SilentMode%>}
+
+3D33AA8C-0037-204B-39A339FD38BD,BackButton,subst
+{1}
+
+3D33AA8C-0037-204B-39A339FD38BD,CancelButton,subst
+{1}
+
+3D33AA8C-0037-204B-39A339FD38BD,Caption,subst
+{1}
+>>>>>>> 0.12
3D33AA8C-0037-204B-39A339FD38BD,Conditions
{0 conditions}
3D33AA8C-0037-204B-39A339FD38BD,Message,subst
+<<<<<<< HEAD
1
3D33AA8C-0037-204B-39A339FD38BD,NextButton,subst
@@ -1066,11 +1762,33 @@ SetBackupLocations
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Caption,subst
1
+=======
+{1}
+
+3D33AA8C-0037-204B-39A339FD38BD,NextButton,subst
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Active
+{Yes}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Alias
+{SetBackupLocations}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,BackButton,subst
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,CancelButton,subst
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Caption,subst
+{1}
+>>>>>>> 0.12
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Conditions
{0 conditions}
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Message,subst
+<<<<<<< HEAD
1
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,NextButton,subst
@@ -1081,20 +1799,40 @@ SetBackupLocations
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Title,subst
1
+=======
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,NextButton,subst
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Subtitle,subst
+{1}
+
+3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7,Title,subst
+{1}
+>>>>>>> 0.12
3FDB57ED-598D-8A4E-CEF7-D90833305558,Conditions
{0 conditions}
3FDB57ED-598D-8A4E-CEF7-D90833305558,LabelSide
+<<<<<<< HEAD
left
3FDB57ED-598D-8A4E-CEF7-D90833305558,Text,subst
1
+=======
+{left}
+
+3FDB57ED-598D-8A4E-CEF7-D90833305558,Text,subst
+{1}
+>>>>>>> 0.12
3FDB57ED-598D-8A4E-CEF7-D90833305558,Type
{browse entry}
3FDB57ED-598D-8A4E-CEF7-D90833305558,VirtualText
+<<<<<<< HEAD
BackupLocationPath
3FDB57ED-598D-8A4E-CEF7-D90833305558,Y
@@ -1105,6 +1843,18 @@ Yes
3FE82C17-A3E2-4A57-A563-F80818B00B81,Prompt
<%InstallStartupText%>
+=======
+{BackupLocationPath}
+
+3FDB57ED-598D-8A4E-CEF7-D90833305558,Y
+{70}
+
+3FE82C17-A3E2-4A57-A563-F80818B00B81,Default
+{Yes}
+
+3FE82C17-A3E2-4A57-A563-F80818B00B81,Prompt
+{<%InstallStartupText%>}
+>>>>>>> 0.12
41CDE776-2667-5CEB-312A-FC4C33A83E7F,Conditions
{0 conditions}
@@ -1113,6 +1863,7 @@ Yes
{*/*.conf;*/*.txt;*/*.pem;*/*.raw;*/*.exe;*/*.bat;*/*.dll}
41CDE776-2667-5CEB-312A-FC4C33A83E7F,RenameFiles
+<<<<<<< HEAD
Yes
41D3E165-C263-5F80-0FEEC0AEE47A,BackButton,subst
@@ -1123,11 +1874,24 @@ Yes
41D3E165-C263-5F80-0FEEC0AEE47A,Caption,subst
1
+=======
+{Yes}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,BackButton,subst
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,CancelButton,subst
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,Caption,subst
+{1}
+>>>>>>> 0.12
41D3E165-C263-5F80-0FEEC0AEE47A,Conditions
{1 condition}
41D3E165-C263-5F80-0FEEC0AEE47A,Message,subst
+<<<<<<< HEAD
1
41D3E165-C263-5F80-0FEEC0AEE47A,NextButton,subst
@@ -1147,15 +1911,43 @@ Yes
481451CC-F49C-D389-8645076F595B,FileSize
15288767
+=======
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,NextButton,subst
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,Subtitle,subst
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,Text,subst
+{1}
+
+41D3E165-C263-5F80-0FEEC0AEE47A,Title,subst
+{1}
+
+481451CC-F49C-D389-8645076F595B,Destination
+{<%InstallDir%>}
+
+481451CC-F49C-D389-8645076F595B,FileSize
+{7893504}
+>>>>>>> 0.12
481451CC-F49C-D389-8645076F595B,Name
{Program Files}
49E59F91-27F7-46D1-A1C1-19865C2392D3,Default
+<<<<<<< HEAD
Yes
49E59F91-27F7-46D1-A1C1-19865C2392D3,Prompt
<%UninstallStartupText%>
+=======
+{Yes}
+
+49E59F91-27F7-46D1-A1C1-19865C2392D3,Prompt
+{<%UninstallStartupText%>}
+>>>>>>> 0.12
49E80443-62DB-1C10-392D-1091AEA5ED88,Conditions
{1 condition}
@@ -1164,6 +1956,7 @@ Yes
{Before Next Pane is Displayed}
49E80443-62DB-1C10-392D-1091AEA5ED88,Pane
+<<<<<<< HEAD
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
4A9C852B-647E-EED5-5482FFBCC2AF,Description,subst
@@ -1174,17 +1967,34 @@ Yes
4A9C852B-647E-EED5-5482FFBCC2AF,FileGroups
481451CC-F49C-D389-8645076F595B
+=======
+{3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7}
+
+4A9C852B-647E-EED5-5482FFBCC2AF,Description,subst
+{1}
+
+4A9C852B-647E-EED5-5482FFBCC2AF,DisplayName,subst
+{1}
+
+4A9C852B-647E-EED5-5482FFBCC2AF,FileGroups
+{481451CC-F49C-D389-8645076F595B}
+>>>>>>> 0.12
4A9C852B-647E-EED5-5482FFBCC2AF,Name
{Default Component}
4A9C852B-647E-EED5-5482FFBCC2AF,RequiredComponent
+<<<<<<< HEAD
Yes
+=======
+{Yes}
+>>>>>>> 0.12
4ACB0B47-42B3-2B3A-BFE9AA4EC707,CheckCondition
{Before Action is Executed}
4ACB0B47-42B3-2B3A-BFE9AA4EC707,Message,subst
+<<<<<<< HEAD
1
4ACB0B47-42B3-2B3A-BFE9AA4EC707,Title,subst
@@ -1192,42 +2002,77 @@ Yes
4ACB0B47-42B3-2B3A-BFE9AA4EC707,TrueValue
No
+=======
+{1}
+
+4ACB0B47-42B3-2B3A-BFE9AA4EC707,Title,subst
+{1}
+
+4ACB0B47-42B3-2B3A-BFE9AA4EC707,TrueValue
+{No}
+>>>>>>> 0.12
4D4A7BF0-7CCE-46E6-BDE5222F82D7,Conditions
{0 conditions}
4D4A7BF0-7CCE-46E6-BDE5222F82D7,UpdateFilePercentage
+<<<<<<< HEAD
Yes
4D4A7BF0-7CCE-46E6-BDE5222F82D7,UpdateFileText
Yes
+=======
+{Yes}
+
+4D4A7BF0-7CCE-46E6-BDE5222F82D7,UpdateFileText
+{Yes}
+>>>>>>> 0.12
4E643D8A-CA31-018D-57D7053C2CE8,CheckCondition
{Before Action is Executed}
4E643D8A-CA31-018D-57D7053C2CE8,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
+=======
+{<%ProgramExecutable%>}
+>>>>>>> 0.12
4EE35849-FAD7-170B-0E45-FA30636467B1,CheckCondition
{Before Next Pane is Displayed}
4EE35849-FAD7-170B-0E45-FA30636467B1,EncryptedPassword
+<<<<<<< HEAD
<%InstallPasswordEncrypted%>
+=======
+{<%InstallPasswordEncrypted%>}
+>>>>>>> 0.12
4EE35849-FAD7-170B-0E45-FA30636467B1,FailureFocus
{Password Entry}
4EE35849-FAD7-170B-0E45-FA30636467B1,FailureMessage
+<<<<<<< HEAD
<%PasswordIncorrectText%>
4EE35849-FAD7-170B-0E45-FA30636467B1,UnencryptedPassword
<%InstallPassword%>
+=======
+{<%PasswordIncorrectText%>}
+
+4EE35849-FAD7-170B-0E45-FA30636467B1,UnencryptedPassword
+{<%InstallPassword%>}
+>>>>>>> 0.12
4EF787E3-0643-DE46-15E64BAF0816,CheckCondition
{Before Action is Executed}
4EF787E3-0643-DE46-15E64BAF0816,Platform
+<<<<<<< HEAD
Windows
+=======
+{Windows}
+>>>>>>> 0.12
52F0A238-57E1-A578-2CE4DA177B32,Conditions
{0 conditions}
@@ -1236,6 +2081,7 @@ Windows
{0 conditions}
574198A7-7322-2F5E-02EF185D965C,BackButton,subst
+<<<<<<< HEAD
1
574198A7-7322-2F5E-02EF185D965C,CancelButton,subst
@@ -1243,11 +2089,21 @@ Windows
574198A7-7322-2F5E-02EF185D965C,Caption,subst
1
+=======
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,CancelButton,subst
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,Caption,subst
+{1}
+>>>>>>> 0.12
574198A7-7322-2F5E-02EF185D965C,Conditions
{0 conditions}
574198A7-7322-2F5E-02EF185D965C,FileLabel,subst
+<<<<<<< HEAD
1
574198A7-7322-2F5E-02EF185D965C,Message,subst
@@ -1279,10 +2135,44 @@ Windows
58E1119F-639E-17C9-5D3898F385AA,Caption,subst
1
+=======
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,Message,subst
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,NextButton,subst
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,ProgressValue,subst
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,Subtitle,subst
+{1}
+
+574198A7-7322-2F5E-02EF185D965C,Title,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,BackButton,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,BrowseButton,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,BrowseText,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,CancelButton,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,Caption,subst
+{1}
+>>>>>>> 0.12
58E1119F-639E-17C9-5D3898F385AA,Conditions
{1 condition}
+<<<<<<< HEAD
58E1119F-639E-17C9-5D3898F385AA,DestinationLabel,subst
0
@@ -1297,12 +2187,35 @@ Windows
58E1119F-639E-17C9-5D3898F385AA,Title,subst
1
+=======
+58E1119F-639E-17C9-5D3898F385AA,Destination,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,DestinationLabel,subst
+{0}
+
+58E1119F-639E-17C9-5D3898F385AA,Message,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,NextButton,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,Subtitle,subst
+{1}
+
+58E1119F-639E-17C9-5D3898F385AA,Title,subst
+{1}
+>>>>>>> 0.12
592F46AE-8CEE-01F3-0BA7EBDCA4F4,CheckCondition
{Before Action is Executed}
592F46AE-8CEE-01F3-0BA7EBDCA4F4,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
+=======
+{<%ProgramExecutable%>}
+>>>>>>> 0.12
5CA3EA16-E37C-AABE-E576C4636EB0,Action
{Install Actions}
@@ -1314,7 +2227,11 @@ Windows
{Before Action is Executed}
5EE78EF7-37CA-D440-3DB5-09136CD566B3,String
+<<<<<<< HEAD
<%AddBackupLocation%>
+=======
+{<%AddBackupLocation%>}
+>>>>>>> 0.12
5F2C1F1C-B9F7-1642-59D9-A18318C1D70B,Conditions
{0 conditions}
@@ -1323,7 +2240,11 @@ Windows
{<%ConfigFileTemplate%>;*/*.bat;<%InstallDir%>/*.vbs}
5F2C1F1C-B9F7-1642-59D9-A18318C1D70B,LineFeed
+<<<<<<< HEAD
Windows
+=======
+{Windows}
+>>>>>>> 0.12
5F2C1F1C-B9F7-1642-59D9-A18318C1D70B,StringMap
{"@@CUSTOMERCOMPANY@@" <%UserInfoCompany%>
@@ -1336,19 +2257,31 @@ Windows
"@@INSTALLDIR@@" <%InstallDir%>}
614C45B2-7515-780C-E444-7F165CF02DD7,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
614C45B2-7515-780C-E444-7F165CF02DD7,Conditions
{0 conditions}
614C45B2-7515-780C-E444-7F165CF02DD7,ResultVirtualText
+<<<<<<< HEAD
BackupLocationShortName
+=======
+{BackupLocationShortName}
+>>>>>>> 0.12
614C45B2-7515-780C-E444-7F165CF02DD7,TclScript
{set BackupLocationShortName ""}
6652193C-5D4B-44B6-ABC6-D6E96D89E5DC,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
6652193C-5D4B-44B6-ABC6-D6E96D89E5DC,Comment
{PJ removed. Is this the one at the top leve?}
@@ -1360,12 +2293,17 @@ No
{2 conditions}
6B4CB3C2-4799-4C9F-BA8E-1EE47C4606E1,ExitType
+<<<<<<< HEAD
Finish
+=======
+{Finish}
+>>>>>>> 0.12
6B966959-05D9-DB32-8D9C4AD2A3DF,CheckCondition
{Before Action is Executed}
6B966959-05D9-DB32-8D9C4AD2A3DF,Platform
+<<<<<<< HEAD
Windows
6C323815-B9AB-FA94-4F5D152EBC51,BackButton,subst
@@ -1376,15 +2314,34 @@ Windows
6C323815-B9AB-FA94-4F5D152EBC51,Caption,subst
1
+=======
+{Windows}
+
+6C323815-B9AB-FA94-4F5D152EBC51,BackButton,subst
+{1}
+
+6C323815-B9AB-FA94-4F5D152EBC51,CancelButton,subst
+{1}
+
+6C323815-B9AB-FA94-4F5D152EBC51,Caption,subst
+{1}
+>>>>>>> 0.12
6C323815-B9AB-FA94-4F5D152EBC51,Conditions
{0 conditions}
6C323815-B9AB-FA94-4F5D152EBC51,Message,subst
+<<<<<<< HEAD
1
6C323815-B9AB-FA94-4F5D152EBC51,NextButton,subst
1
+=======
+{1}
+
+6C323815-B9AB-FA94-4F5D152EBC51,NextButton,subst
+{1}
+>>>>>>> 0.12
6D9D1ABC-7146-443F-9EE9-205D5CA6C830,CheckCondition
{Before Action is Executed}
@@ -1405,25 +2362,43 @@ Windows
{0 conditions}
6F61CDA8-30C9-454F-82A3-9987E1203079,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-sync
+=======
+{<%ShortAppName%>-program-sync}
+>>>>>>> 0.12
6F61CDA8-30C9-454F-82A3-9987E1203079,ShortcutName
{Sync now}
6F61CDA8-30C9-454F-82A3-9987E1203079,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/Sync.bat
6F61CDA8-30C9-454F-82A3-9987E1203079,WorkingDirectory
<%InstallDir%>
+=======
+{<%InstallDir%>/tools/Sync.bat}
+
+6F61CDA8-30C9-454F-82A3-9987E1203079,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
6F94698F-0839-3ABF-0CF2DF05A4C8,CheckCondition
{Before Action is Executed}
6F94698F-0839-3ABF-0CF2DF05A4C8,String
+<<<<<<< HEAD
<%CreateQuickLaunchShortcut%>
6FEE2889-0338-1D49-60BF-1471F465AB26,AppendNewline
No
+=======
+{<%CreateQuickLaunchShortcut%>}
+
+6FEE2889-0338-1D49-60BF-1471F465AB26,AppendNewline
+{No}
+>>>>>>> 0.12
6FEE2889-0338-1D49-60BF-1471F465AB26,Comment
{Closing final BackupLocations bracket}
@@ -1435,6 +2410,7 @@ No
{Append to file}
6FEE2889-0338-1D49-60BF-1471F465AB26,Files
+<<<<<<< HEAD
<%ConfigFileTemplate%>
6FEE2889-0338-1D49-60BF-1471F465AB26,LineFeed
@@ -1442,21 +2418,41 @@ Windows
6FEE2889-0338-1D49-60BF-1471F465AB26,TextToWrite,subst
1
+=======
+{<%ConfigFileTemplate%>}
+
+6FEE2889-0338-1D49-60BF-1471F465AB26,LineFeed
+{Windows}
+
+6FEE2889-0338-1D49-60BF-1471F465AB26,TextToWrite,subst
+{1}
+>>>>>>> 0.12
738DD098-7E3B-BC89-875CDB93CBE2,CheckCondition
{Before Action is Executed}
738DD098-7E3B-BC89-875CDB93CBE2,Platform
+<<<<<<< HEAD
Windows
+=======
+{Windows}
+>>>>>>> 0.12
73DD4D07-B1DC-BA38-2B12-07EB24A7F0C8,Conditions
{0 conditions}
73DD4D07-B1DC-BA38-2B12-07EB24A7F0C8,Destination
+<<<<<<< HEAD
<%ConfigFileName%>
73DD4D07-B1DC-BA38-2B12-07EB24A7F0C8,Source
<%ConfigFileTemplate%>
+=======
+{<%ConfigFileName%>}
+
+73DD4D07-B1DC-BA38-2B12-07EB24A7F0C8,Source
+{<%ConfigFileTemplate%>}
+>>>>>>> 0.12
73EA65C1-3BE3-B190-55C3E99F6269,Conditions
{1 condition}
@@ -1465,31 +2461,53 @@ Windows
{Before Action is Executed}
748D673B-DFE6-5F74-329903ACE4DB,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
+=======
+{<%ProgramExecutable%>}
+>>>>>>> 0.12
793D8178-0F51-7F07-BC5886586D3C,CheckCondition
{Before Action is Executed}
793D8178-0F51-7F07-BC5886586D3C,Operator
+<<<<<<< HEAD
false
793D8178-0F51-7F07-BC5886586D3C,String
<%InstallStopped%>
+=======
+{false}
+
+793D8178-0F51-7F07-BC5886586D3C,String
+{<%InstallStopped%>}
+>>>>>>> 0.12
795EE61F-6C0D-4A8B-93E02AA3894A,CheckCondition
{Before Action is Executed}
795EE61F-6C0D-4A8B-93E02AA3894A,String
+<<<<<<< HEAD
<%LaunchApplication%>
+=======
+{<%LaunchApplication%>}
+>>>>>>> 0.12
79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C,CheckCondition
{Before Action is Executed}
79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C,Operator
+<<<<<<< HEAD
false
79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C,String
<%LicenseAccepted%>
+=======
+{false}
+
+79DAC913-A33D-4ED6-9BAE-B3A2053C0F2C,String
+{<%LicenseAccepted%>}
+>>>>>>> 0.12
7A983CD8-302C-4942-BE59-525C5B5FA2F2,Conditions
{0 conditions}
@@ -1498,15 +2516,23 @@ false
{ServiceControl terminate}
7A983CD8-302C-4942-BE59-525C5B5FA2F2,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
7B770A07-A785-5215-956FA82CF14E,Active
No
+=======
+{<%InstallDir%>}
+
+7B770A07-A785-5215-956FA82CF14E,Active
+{No}
+>>>>>>> 0.12
7B770A07-A785-5215-956FA82CF14E,Conditions
{3 conditions}
7B770A07-A785-5215-956FA82CF14E,ShortcutDirectory
+<<<<<<< HEAD
<%QUICK_LAUNCH%>
7B770A07-A785-5215-956FA82CF14E,ShortcutName
@@ -1517,6 +2543,18 @@ No
7B770A07-A785-5215-956FA82CF14E,WorkingDirectory
<%InstallDir%>
+=======
+{<%QUICK_LAUNCH%>}
+
+7B770A07-A785-5215-956FA82CF14E,ShortcutName
+{<%BrandName%>}
+
+7B770A07-A785-5215-956FA82CF14E,TargetFileName
+{<%ProgramExecutable%>}
+
+7B770A07-A785-5215-956FA82CF14E,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
7D8E1902-2BC4-80D8-2C18771E7C22,Conditions
{0 conditions}
@@ -1525,6 +2563,7 @@ No
{<%ServiceExeName%> -i -S <%ServiceName%> -c "<%ConfigFileName%>"}
7D8E1902-2BC4-80D8-2C18771E7C22,ProgressiveOutputWidget
+<<<<<<< HEAD
Message
7D8E1902-2BC4-80D8-2C18771E7C22,ShowProgressiveOutput
@@ -1550,11 +2589,39 @@ Typical
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Checked
No
+=======
+{Message}
+
+7D8E1902-2BC4-80D8-2C18771E7C22,ShowProgressiveOutput
+{Yes}
+
+7D8E1902-2BC4-80D8-2C18771E7C22,WorkingDirectory
+{<%InstallDir%>}
+
+7F85263E-CAE2-46BA-AAC0-6B89D20FD2DE,ExitType
+{Finish}
+
+8202CECC-54A0-9B6C-D24D111BA52E,Components
+{4A9C852B-647E-EED5-5482FFBCC2AF}
+
+8202CECC-54A0-9B6C-D24D111BA52E,Description,subst
+{1}
+
+8202CECC-54A0-9B6C-D24D111BA52E,DisplayName,subst
+{1}
+
+8202CECC-54A0-9B6C-D24D111BA52E,Name
+{Typical}
+
+8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Checked
+{No}
+>>>>>>> 0.12
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Conditions
{0 conditions}
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Text,subst
+<<<<<<< HEAD
1
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Type
@@ -1568,6 +2635,21 @@ AddBackupLocation
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Y
250
+=======
+{1}
+
+8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Type
+{checkbutton}
+
+8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Value
+{Yes}
+
+8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,VirtualText
+{AddBackupLocation}
+
+8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Y
+{250}
+>>>>>>> 0.12
848844B5-6103-9343-8B731B0BE4E0,Alias
{Startup Actions}
@@ -1579,10 +2661,17 @@ AddBackupLocation
{Before Next Pane is Displayed}
84DA7F05-9FB7-CC36-9EC98F8A6826,FailureMessage
+<<<<<<< HEAD
<%DirectoryPermissionText%>
84DA7F05-9FB7-CC36-9EC98F8A6826,Filename
<%InstallDir%>
+=======
+{<%DirectoryPermissionText%>}
+
+84DA7F05-9FB7-CC36-9EC98F8A6826,Filename
+{<%InstallDir%>}
+>>>>>>> 0.12
84DA7F05-9FB7-CC36-9EC98F8A6826,Permission
{can create}
@@ -1591,6 +2680,7 @@ AddBackupLocation
{0 conditions}
855DE408-060E-3D35-08B5-1D9AB05C2865,Height
+<<<<<<< HEAD
100
855DE408-060E-3D35-08B5-1D9AB05C2865,Text,subst
@@ -1604,11 +2694,27 @@ BackupLocationExclusions
855DE408-060E-3D35-08B5-1D9AB05C2865,Y
130
+=======
+{100}
+
+855DE408-060E-3D35-08B5-1D9AB05C2865,Text,subst
+{1}
+
+855DE408-060E-3D35-08B5-1D9AB05C2865,Type
+{text}
+
+855DE408-060E-3D35-08B5-1D9AB05C2865,VirtualText
+{BackupLocationExclusions}
+
+855DE408-060E-3D35-08B5-1D9AB05C2865,Y
+{130}
+>>>>>>> 0.12
87DE6D78-81E1-495B-A214-B3FF3E7E5614,CheckCondition
{Before Action is Executed}
87DE6D78-81E1-495B-A214-B3FF3E7E5614,Operator
+<<<<<<< HEAD
false
87DE6D78-81E1-495B-A214-B3FF3E7E5614,String
@@ -1616,6 +2722,15 @@ false
88A50FD5-480F-19A5-DA74-C915EB0A9765,Active
No
+=======
+{false}
+
+87DE6D78-81E1-495B-A214-B3FF3E7E5614,String
+{<%Answer%>}
+
+88A50FD5-480F-19A5-DA74-C915EB0A9765,Active
+{No}
+>>>>>>> 0.12
88A50FD5-480F-19A5-DA74-C915EB0A9765,Conditions
{1 condition}
@@ -1624,13 +2739,21 @@ No
{After Pane is Finished}
88A50FD5-480F-19A5-DA74-C915EB0A9765,Pane
+<<<<<<< HEAD
3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7
+=======
+{3FD9BFF3-2F6E-E4FC-2FAE-98F2017916A7}
+>>>>>>> 0.12
8A761DBD-0640-D98C-9B3AD7672A8F,Conditions
{0 conditions}
8A761DBD-0640-D98C-9B3AD7672A8F,State
+<<<<<<< HEAD
disabled
+=======
+{disabled}
+>>>>>>> 0.12
8A761DBD-0640-D98C-9B3AD7672A8F,Widget
{Back Button;Next Button}
@@ -1639,15 +2762,23 @@ disabled
{Before Action is Executed}
8C866252-8760-9B08-FE569C25B60D,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
8E095096-F018-A880-429D-A2177A9B70EA,Active
No
+=======
+{<%ProgramExecutable%>}
+
+8E095096-F018-A880-429D-A2177A9B70EA,Active
+{No}
+>>>>>>> 0.12
8E095096-F018-A880-429D-A2177A9B70EA,Conditions
{0 conditions}
8E095096-F018-A880-429D-A2177A9B70EA,Text,subst
+<<<<<<< HEAD
1
8E095096-F018-A880-429D-A2177A9B70EA,X
@@ -1655,10 +2786,20 @@ No
8E095096-F018-A880-429D-A2177A9B70EA,Y
150
+=======
+{1}
+
+8E095096-F018-A880-429D-A2177A9B70EA,X
+{50}
+
+8E095096-F018-A880-429D-A2177A9B70EA,Y
+{150}
+>>>>>>> 0.12
8E1A5944-5AF5-5906-16D395E386D8,Conditions
{0 conditions}
+<<<<<<< HEAD
9013E862-8E81-5290-64F9-D8BCD13EC7E5,Active
Yes
@@ -1673,11 +2814,25 @@ Yes
9013E862-8E81-5290-64F9-D8BCD13EC7E5,CompanyLabel,subst
1
+=======
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,BackButton,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,CancelButton,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,Caption,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,CompanyLabel,subst
+{1}
+>>>>>>> 0.12
9013E862-8E81-5290-64F9-D8BCD13EC7E5,Conditions
{0 conditions}
9013E862-8E81-5290-64F9-D8BCD13EC7E5,Message,subst
+<<<<<<< HEAD
1
9013E862-8E81-5290-64F9-D8BCD13EC7E5,NextButton,subst
@@ -1691,6 +2846,21 @@ Yes
9013E862-8E81-5290-64F9-D8BCD13EC7E5,UserNameLabel,subst
1
+=======
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,NextButton,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,Subtitle,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,Title,subst
+{1}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,UserNameLabel,subst
+{1}
+>>>>>>> 0.12
905DA2E9-988C-2F27-BB1F5F274AC9,Alias
{Cancel Actions}
@@ -1699,6 +2869,7 @@ Yes
{0 conditions}
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,BackButton,subst
+<<<<<<< HEAD
1
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,CancelButton,subst
@@ -1706,11 +2877,21 @@ Yes
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Caption,subst
1
+=======
+{1}
+
+908CE221-5A3D-0A78-24A1-E7C91EBE38D4,CancelButton,subst
+{1}
+
+908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Caption,subst
+{1}
+>>>>>>> 0.12
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Conditions
{0 conditions}
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Message,subst
+<<<<<<< HEAD
1
908CE221-5A3D-0A78-24A1-E7C91EBE38D4,NextButton,subst
@@ -1724,11 +2905,27 @@ Yes
937C3FDD-FB28-98BD-3DAB276E59ED,Background
white
+=======
+{1}
+
+908CE221-5A3D-0A78-24A1-E7C91EBE38D4,NextButton,subst
+{1}
+
+908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Subtitle,subst
+{1}
+
+908CE221-5A3D-0A78-24A1-E7C91EBE38D4,Title,subst
+{1}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,Background
+{white}
+>>>>>>> 0.12
937C3FDD-FB28-98BD-3DAB276E59ED,Conditions
{3 conditions}
937C3FDD-FB28-98BD-3DAB276E59ED,Text,subst
+<<<<<<< HEAD
1
937C3FDD-FB28-98BD-3DAB276E59ED,Type
@@ -1745,6 +2942,24 @@ CreateQuickLaunchShortcut
93AA298C-B64E-5683-14D2-7B86F7DEFD2C,Active
No
+=======
+{1}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,Type
+{checkbutton}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,VirtualText
+{CreateQuickLaunchShortcut}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,X
+{185}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,Y
+{200}
+
+93AA298C-B64E-5683-14D2-7B86F7DEFD2C,Active
+{No}
+>>>>>>> 0.12
93AA298C-B64E-5683-14D2-7B86F7DEFD2C,Comment
{set BackupLocationName "BackupLocation_${BackupLocationNumber}"}
@@ -1753,7 +2968,11 @@ No
{0 conditions}
93AA298C-B64E-5683-14D2-7B86F7DEFD2C,ResultVirtualText
+<<<<<<< HEAD
BackupLocationName
+=======
+{BackupLocationName}
+>>>>>>> 0.12
93AA298C-B64E-5683-14D2-7B86F7DEFD2C,TclScript
{set BackupLocationName "BackupLocation_${BackupLocationNumber}"}
@@ -1762,24 +2981,37 @@ BackupLocationName
{Before Action is Executed}
96A68CAC-9ED7-806C-086B104720FD,String
+<<<<<<< HEAD
<%ErrorsOccurred%>
+=======
+{<%ErrorsOccurred%>}
+>>>>>>> 0.12
97ACF525-C075-8635-E019202A83D8,Comment
{Ask the user if they want to proceed with the uninstall.}
9892B25C-689B-5B8F-F0C9-B14FF6ACC40C,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
9892B25C-689B-5B8F-F0C9-B14FF6ACC40C,Conditions
{0 conditions}
9892B25C-689B-5B8F-F0C9-B14FF6ACC40C,ResultVirtualText
+<<<<<<< HEAD
AddBackupLocation
+=======
+{AddBackupLocation}
+>>>>>>> 0.12
9892B25C-689B-5B8F-F0C9-B14FF6ACC40C,TclScript
{set AddBackupLocation no}
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Active
+<<<<<<< HEAD
Yes
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,BackButton,subst
@@ -1790,11 +3022,24 @@ Yes
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Caption,subst
1
+=======
+{Yes}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,BackButton,subst
+{1}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,CancelButton,subst
+{1}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Caption,subst
+{1}
+>>>>>>> 0.12
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Conditions
{0 conditions}
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Message,subst
+<<<<<<< HEAD
1
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,NextButton,subst
@@ -1805,21 +3050,44 @@ Yes
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Title,subst
1
+=======
+{1}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,NextButton,subst
+{1}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Subtitle,subst
+{1}
+
+9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Title,subst
+{1}
+>>>>>>> 0.12
9A663209-495B-ED16-09BE-457B61148022,Conditions
{0 conditions}
9A663209-495B-ED16-09BE-457B61148022,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-QueryCurrent
+=======
+{<%ShortAppName%>-program-QueryCurrent}
+>>>>>>> 0.12
9A663209-495B-ED16-09BE-457B61148022,ShortcutName
{Query Current Only}
9A663209-495B-ED16-09BE-457B61148022,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/QueryOutputCurrent.bat
9A663209-495B-ED16-09BE-457B61148022,WorkingDirectory
<%InstallDir%>
+=======
+{<%InstallDir%>/tools/QueryOutputCurrent.bat}
+
+9A663209-495B-ED16-09BE-457B61148022,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
9D101299-B80C-441B-8685-6E3AC61808E8,Alias
{Remote Control}
@@ -1831,6 +3099,7 @@ Yes
{0 conditions}
9D101299-B80C-441B-8685-6E3AC61808E8,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-RemoteControl
9D101299-B80C-441B-8685-6E3AC61808E8,ShortcutName
@@ -1841,6 +3110,18 @@ RemoteControl
9D101299-B80C-441B-8685-6E3AC61808E8,WorkingDirectory
<%InstallDir%>
+=======
+{<%ShortAppName%>-program-RemoteControl}
+
+9D101299-B80C-441B-8685-6E3AC61808E8,ShortcutName
+{RemoteControl}
+
+9D101299-B80C-441B-8685-6E3AC61808E8,TargetFileName
+{<%InstallDir%>/tools/RemoteControl.exe}
+
+9D101299-B80C-441B-8685-6E3AC61808E8,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
A1DD1DC2-85D7-9BC6-998AC3D4A3A9,Alias
{Startup Actions}
@@ -1852,7 +3133,11 @@ A5B32DA1-B2FE-C1FA-6057-FBC3059EF076,Conditions
{0 conditions}
A5B32DA1-B2FE-C1FA-6057-FBC3059EF076,ResultVirtualText
+<<<<<<< HEAD
AddBackupLocation
+=======
+{AddBackupLocation}
+>>>>>>> 0.12
A5B32DA1-B2FE-C1FA-6057-FBC3059EF076,TclScript
{set AddBackupLocation no }
@@ -1861,12 +3146,17 @@ A6E1B027-A1B4-5848-4F868D028D00,CheckCondition
{Before Action is Executed}
A6E1B027-A1B4-5848-4F868D028D00,String
+<<<<<<< HEAD
<%ViewReadme%>
+=======
+{<%ViewReadme%>}
+>>>>>>> 0.12
ADA6EB2F-8820-4366-BBEF-ED1335B7F828,Conditions
{1 condition}
AE3BD5B4-35DE-4240-B79914D43E56,Active
+<<<<<<< HEAD
No
AE3BD5B4-35DE-4240-B79914D43E56,BackButton,subst
@@ -1877,11 +3167,24 @@ AE3BD5B4-35DE-4240-B79914D43E56,CancelButton,subst
AE3BD5B4-35DE-4240-B79914D43E56,Caption,subst
1
+=======
+{No}
+
+AE3BD5B4-35DE-4240-B79914D43E56,BackButton,subst
+{1}
+
+AE3BD5B4-35DE-4240-B79914D43E56,CancelButton,subst
+{1}
+
+AE3BD5B4-35DE-4240-B79914D43E56,Caption,subst
+{1}
+>>>>>>> 0.12
AE3BD5B4-35DE-4240-B79914D43E56,Conditions
{0 conditions}
AE3BD5B4-35DE-4240-B79914D43E56,Message,subst
+<<<<<<< HEAD
1
AE3BD5B4-35DE-4240-B79914D43E56,NextButton,subst
@@ -1910,11 +3213,45 @@ Standard
AIX-ppc,InstallType
Typical
+=======
+{1}
+
+AE3BD5B4-35DE-4240-B79914D43E56,NextButton,subst
+{1}
+
+AIX-ppc,Active
+{No}
+
+AIX-ppc,BuildSeparateArchives
+{No}
+
+AIX-ppc,DefaultDirectoryPermission
+{0755}
+
+AIX-ppc,DefaultFilePermission
+{0755}
+
+AIX-ppc,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+AIX-ppc,FallBackToConsole
+{Yes}
+
+AIX-ppc,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+AIX-ppc,InstallMode
+{Standard}
+
+AIX-ppc,InstallType
+{Typical}
+>>>>>>> 0.12
AIX-ppc,ProgramExecutable
{}
AIX-ppc,ProgramFolderAllUsers
+<<<<<<< HEAD
No
AIX-ppc,ProgramFolderName
@@ -1922,11 +3259,21 @@ AIX-ppc,ProgramFolderName
AIX-ppc,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+AIX-ppc,ProgramFolderName
+{<%AppName%>}
+
+AIX-ppc,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
AIX-ppc,ProgramName
{}
AIX-ppc,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
AIX-ppc,PromptForRoot
@@ -1940,6 +3287,21 @@ AIX-ppc,RootInstallDir
B002A311-F8E7-41DE-B039-521391924E5B,Message,subst
1
+=======
+{<%InstallDir%>/README.txt}
+
+AIX-ppc,PromptForRoot
+{Yes}
+
+AIX-ppc,RequireRoot
+{No}
+
+AIX-ppc,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message,subst
+{1}
+>>>>>>> 0.12
B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,Alias
{Stop Backup Service}
@@ -1951,31 +3313,53 @@ B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,Conditions
{0 conditions}
B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-stopservice
+=======
+{<%ShortAppName%>-program-stopservice}
+>>>>>>> 0.12
B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,ShortcutName
{Stop Service}
B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/StopService.bat
B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,WorkingDirectory
<%InstallDir%>
+=======
+{<%InstallDir%>/tools/StopService.bat}
+
+B01CBBB2-6A78-CA53-9ED9-C3C4CFC9239E,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
B0AA6839-AAB6-A602-C0E4ECA2E4FF,CheckCondition
{Before Action is Executed}
B0AA6839-AAB6-A602-C0E4ECA2E4FF,Filename
+<<<<<<< HEAD
<%ProgramExecutable%>
+=======
+{<%ProgramExecutable%>}
+>>>>>>> 0.12
B39C0455-D1B6-7DDC-E2717F83463E,CheckCondition
{Before Action is Executed}
B39C0455-D1B6-7DDC-E2717F83463E,Operator
+<<<<<<< HEAD
false
B39C0455-D1B6-7DDC-E2717F83463E,String
<%InstallStopped%>
+=======
+{false}
+
+B39C0455-D1B6-7DDC-E2717F83463E,String
+{<%InstallStopped%>}
+>>>>>>> 0.12
B3B99E2D-C368-A921-B7BC-A71EBDE3AD4D,Conditions
{0 conditions}
@@ -1984,7 +3368,11 @@ B3B99E2D-C368-A921-B7BC-A71EBDE3AD4D,ExecuteAction
{Before Next Pane is Displayed}
B3B99E2D-C368-A921-B7BC-A71EBDE3AD4D,Password
+<<<<<<< HEAD
<%InstallPassword%>
+=======
+{<%InstallPassword%>}
+>>>>>>> 0.12
B4D31D1E-ADB1-DE8F-18EB7294DDA8,Conditions
{0 conditions}
@@ -1993,6 +3381,7 @@ B4D31D1E-ADB1-DE8F-18EB7294DDA8,ProgramCommandLine
{<%ServiceExeName%> -r -S <%ServiceName%>}
B4D31D1E-ADB1-DE8F-18EB7294DDA8,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message,subst
@@ -2012,11 +3401,33 @@ B506E7DA-E7C4-4D42-8C03-FD27BA16D078,CancelButton,subst
B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Caption,subst
1
+=======
+{<%InstallDir%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,AcceptRadiobutton,subst
+{0}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Active
+{Yes}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,BackButton,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,CancelButton,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Caption,subst
+{1}
+>>>>>>> 0.12
B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Conditions
{0 conditions}
B506E7DA-E7C4-4D42-8C03-FD27BA16D078,DeclineRadiobutton,subst
+<<<<<<< HEAD
0
B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Message,subst
@@ -2033,6 +3444,24 @@ B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Text,subst
B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Title,subst
1
+=======
+{0}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Message,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,NextButton,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Subtitle,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Text,subst
+{1}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Title,subst
+{1}
+>>>>>>> 0.12
B5DFEC63-92A9-4686-909E-0CE78A7069D6,Alias
{Restart Backup Service}
@@ -2044,7 +3473,11 @@ B5DFEC63-92A9-4686-909E-0CE78A7069D6,Conditions
{0 conditions}
B5DFEC63-92A9-4686-909E-0CE78A7069D6,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-restartservice
+=======
+{<%ShortAppName%>-program-restartservice}
+>>>>>>> 0.12
B5DFEC63-92A9-4686-909E-0CE78A7069D6,ShortcutName
{Restart Service}
@@ -2053,12 +3486,17 @@ B5DFEC63-92A9-4686-909E-0CE78A7069D6,TargetFileName
{<%InstallDir%>\tools\RestartService.bat}
B5DFEC63-92A9-4686-909E-0CE78A7069D6,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
+=======
+{<%InstallDir%>}
+>>>>>>> 0.12
B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Conditions
{0 conditions}
B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,LabelSide
+<<<<<<< HEAD
left
B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Text,subst
@@ -2072,24 +3510,53 @@ BackupLocationShortName
B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Y
100
+=======
+{left}
+
+B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Text,subst
+{1}
+
+B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Type
+{entry}
+
+B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,VirtualText
+{BackupLocationShortName}
+
+B927A5AF-4DFE-82A3-DCA8-35FA4D91EC5A,Y
+{100}
+>>>>>>> 0.12
B93D2216-1DDB-484C-A9AC-D6C18ED7DE23,Conditions
{2 conditions}
B93D2216-1DDB-484C-A9AC-D6C18ED7DE23,State
+<<<<<<< HEAD
disabled
B93D2216-1DDB-484C-A9AC-D6C18ED7DE23,Widget
NextButton
+=======
+{disabled}
+
+B93D2216-1DDB-484C-A9AC-D6C18ED7DE23,Widget
+{NextButton}
+>>>>>>> 0.12
BC4EA5FD-50BD-4D6E-953F-5E3EDB957360,CheckCondition
{Before Next Action is Executed}
BC4EA5FD-50BD-4D6E-953F-5E3EDB957360,FailureMessage
+<<<<<<< HEAD
<%DirectoryPermissionText%>
BC4EA5FD-50BD-4D6E-953F-5E3EDB957360,Filename
<%InstallDir%>
+=======
+{<%DirectoryPermissionText%>}
+
+BC4EA5FD-50BD-4D6E-953F-5E3EDB957360,Filename
+{<%InstallDir%>}
+>>>>>>> 0.12
BC4EA5FD-50BD-4D6E-953F-5E3EDB957360,Permission
{can create}
@@ -2104,27 +3571,43 @@ C0452595-F3EB-43AD-BCA2-661437584636,Conditions
{0 conditions}
C0452595-F3EB-43AD-BCA2-661437584636,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-editconfig
+=======
+{<%ShortAppName%>-program-editconfig}
+>>>>>>> 0.12
C0452595-F3EB-43AD-BCA2-661437584636,ShortcutName
{Edit Config File}
C0452595-F3EB-43AD-BCA2-661437584636,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/EditConfig.bat
C0452595-F3EB-43AD-BCA2-661437584636,WorkingDirectory
<%InstallDir%>
+=======
+{<%InstallDir%>/tools/EditConfig.bat}
+
+C0452595-F3EB-43AD-BCA2-661437584636,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
C0AF7C05-A31A-8376-BCB9-BA8B3A666252,Conditions
{0 conditions}
C0AF7C05-A31A-8376-BCB9-BA8B3A666252,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-QueryAll
+=======
+{<%ShortAppName%>-program-QueryAll}
+>>>>>>> 0.12
C0AF7C05-A31A-8376-BCB9-BA8B3A666252,ShortcutName
{Query All}
C0AF7C05-A31A-8376-BCB9-BA8B3A666252,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/QueryOutputAll.bat
C0AF7C05-A31A-8376-BCB9-BA8B3A666252,WorkingDirectory
@@ -2138,11 +3621,27 @@ C105AAAE-7C16-2C9E-769FE4535B60,Caption,subst
C105AAAE-7C16-2C9E-769FE4535B60,CloseButton,subst
1
+=======
+{<%InstallDir%>/tools/QueryOutputAll.bat}
+
+C0AF7C05-A31A-8376-BCB9-BA8B3A666252,WorkingDirectory
+{<%InstallDir%>}
+
+C105AAAE-7C16-2C9E-769FE4535B60,Active
+{No}
+
+C105AAAE-7C16-2C9E-769FE4535B60,Caption,subst
+{1}
+
+C105AAAE-7C16-2C9E-769FE4535B60,CloseButton,subst
+{1}
+>>>>>>> 0.12
C105AAAE-7C16-2C9E-769FE4535B60,Conditions
{3 conditions}
C105AAAE-7C16-2C9E-769FE4535B60,Message,subst
+<<<<<<< HEAD
1
C105AAAE-7C16-2C9E-769FE4535B60,TextFile
@@ -2153,11 +3652,24 @@ C105AAAE-7C16-2C9E-769FE4535B60,Title,subst
C33D74B2-26FA-16F5-433A10C6A747,Active
No
+=======
+{1}
+
+C105AAAE-7C16-2C9E-769FE4535B60,TextFile
+{<%ProgramReadme%>}
+
+C105AAAE-7C16-2C9E-769FE4535B60,Title,subst
+{1}
+
+C33D74B2-26FA-16F5-433A10C6A747,Active
+{No}
+>>>>>>> 0.12
C33D74B2-26FA-16F5-433A10C6A747,Conditions
{3 conditions}
C33D74B2-26FA-16F5-433A10C6A747,ProgramCommandLine
+<<<<<<< HEAD
<%ProgramExecutable%>
C33D74B2-26FA-16F5-433A10C6A747,WaitForProgram
@@ -2165,6 +3677,15 @@ No
C33D74B2-26FA-16F5-433A10C6A747,WorkingDirectory
<%InstallDir%>
+=======
+{<%ProgramExecutable%>}
+
+C33D74B2-26FA-16F5-433A10C6A747,WaitForProgram
+{No}
+
+C33D74B2-26FA-16F5-433A10C6A747,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
C7762473-273F-E3CA-17E3-65789B14CDB0,Conditions
{0 conditions}
@@ -2176,19 +3697,33 @@ C7762473-273F-E3CA-17E3-65789B14CDB0,FileOpenAction
{Append to file}
C7762473-273F-E3CA-17E3-65789B14CDB0,Files
+<<<<<<< HEAD
<%ConfigFileTemplate%>
C7762473-273F-E3CA-17E3-65789B14CDB0,TextToWrite,subst
1
+=======
+{<%ConfigFileTemplate%>}
+
+C7762473-273F-E3CA-17E3-65789B14CDB0,TextToWrite,subst
+{1}
+>>>>>>> 0.12
CC4337CC-F3B5-757C-DFCF5D1D365A,CheckCondition
{Before Action is Executed}
CC4337CC-F3B5-757C-DFCF5D1D365A,Operator
+<<<<<<< HEAD
false
CC4337CC-F3B5-757C-DFCF5D1D365A,String
<%SilentMode%>
+=======
+{false}
+
+CC4337CC-F3B5-757C-DFCF5D1D365A,String
+{<%SilentMode%>}
+>>>>>>> 0.12
CDD84DE3-C970-458F-9162-1A3CE0AA716B,Alias
{Start Backup Service}
@@ -2200,7 +3735,11 @@ CDD84DE3-C970-458F-9162-1A3CE0AA716B,Conditions
{0 conditions}
CDD84DE3-C970-458F-9162-1A3CE0AA716B,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-startservice
+=======
+{<%ShortAppName%>-program-startservice}
+>>>>>>> 0.12
CDD84DE3-C970-458F-9162-1A3CE0AA716B,ShortcutName
{Start Service}
@@ -2209,15 +3748,23 @@ CDD84DE3-C970-458F-9162-1A3CE0AA716B,TargetFileName
{<%InstallDir%>\tools\StartService.bat}
CDD84DE3-C970-458F-9162-1A3CE0AA716B,WorkingDirectory
+<<<<<<< HEAD
<%InstallDir%>
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Background
white
+=======
+{<%InstallDir%>}
+
+CFFA27AF-A641-E41C-B4A0E3BB3CBB,Background
+{white}
+>>>>>>> 0.12
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Conditions
{2 conditions}
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Text,subst
+<<<<<<< HEAD
1
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Type
@@ -2231,6 +3778,21 @@ CFFA27AF-A641-E41C-B4A0E3BB3CBB,X
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Y
160
+=======
+{1}
+
+CFFA27AF-A641-E41C-B4A0E3BB3CBB,Type
+{checkbutton}
+
+CFFA27AF-A641-E41C-B4A0E3BB3CBB,VirtualText
+{LaunchApplication}
+
+CFFA27AF-A641-E41C-B4A0E3BB3CBB,X
+{185}
+
+CFFA27AF-A641-E41C-B4A0E3BB3CBB,Y
+{160}
+>>>>>>> 0.12
D23DD94C-E517-7F34-FD59-802CB18AB887,Comment
{Need to do before starting anything else.}
@@ -2242,13 +3804,21 @@ D23DD94C-E517-7F34-FD59-802CB18AB887,Files
{*/*.conf;*/*.txt;*/*.bat}
D23DD94C-E517-7F34-FD59-802CB18AB887,LineFeed
+<<<<<<< HEAD
Windows
+=======
+{Windows}
+>>>>>>> 0.12
D3D73C76-D9D3-07DA-63D4163A44BE,Conditions
{0 conditions}
D3D73C76-D9D3-07DA-63D4163A44BE,ExitType
+<<<<<<< HEAD
Finish
+=======
+{Finish}
+>>>>>>> 0.12
D4FC6EB5-DDEE-4E4A-B8E1-D4B588A7928B,Action
{Install Actions}
@@ -2263,7 +3833,11 @@ D7FBBEBB-2186-5674-BA87-BB7151859D4E,Conditions
{0 conditions}
D7FBBEBB-2186-5674-BA87-BB7151859D4E,ResultVirtualText
+<<<<<<< HEAD
BackupLocationNumber
+=======
+{BackupLocationNumber}
+>>>>>>> 0.12
D7FBBEBB-2186-5674-BA87-BB7151859D4E,TclScript
{incr BackupLocationNumber}
@@ -2275,16 +3849,27 @@ D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,Conditions
{0 conditions}
D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-reloadconfig
+=======
+{<%ShortAppName%>-program-reloadconfig}
+>>>>>>> 0.12
D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,ShortcutName
{Reload configuration file}
D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/ReloadConfig.bat
D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,WorkingDirectory
<%InstallDir%>
+=======
+{<%InstallDir%>/tools/ReloadConfig.bat}
+
+D8B8A9BF-5F2E-4236-A63E-5A8C5FFA8968,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
D8F0AA0F-AD79-C566-15CC508F503B,Action
{Install Actions}
@@ -2296,6 +3881,7 @@ D9F88AC1-3D2D-F6DB-871E-3A0E016770B1,Conditions
{0 conditions}
D9F88AC1-3D2D-F6DB-871E-3A0E016770B1,Destination
+<<<<<<< HEAD
<%ConfigFileTemplate%>
D9F88AC1-3D2D-F6DB-871E-3A0E016770B1,Source
@@ -2312,11 +3898,30 @@ DA33B826-E633-A845-4646-76DFA78B907B,CancelButton,subst
DA33B826-E633-A845-4646-76DFA78B907B,Caption,subst
1
+=======
+{<%ConfigFileTemplate%>}
+
+D9F88AC1-3D2D-F6DB-871E-3A0E016770B1,Source
+{<%InstallDir%>/templates/original.conf}
+
+DA33B826-E633-A845-4646-76DFA78B907B,Active
+{Yes}
+
+DA33B826-E633-A845-4646-76DFA78B907B,BackButton,subst
+{1}
+
+DA33B826-E633-A845-4646-76DFA78B907B,CancelButton,subst
+{1}
+
+DA33B826-E633-A845-4646-76DFA78B907B,Caption,subst
+{1}
+>>>>>>> 0.12
DA33B826-E633-A845-4646-76DFA78B907B,Conditions
{0 conditions}
DA33B826-E633-A845-4646-76DFA78B907B,Message,subst
+<<<<<<< HEAD
1
DA33B826-E633-A845-4646-76DFA78B907B,NextButton,subst
@@ -2333,11 +3938,30 @@ No
DDBBD8A9-13D7-9509-9202-419E989F60A9,Checked
No
+=======
+{1}
+
+DA33B826-E633-A845-4646-76DFA78B907B,NextButton,subst
+{1}
+
+DA33B826-E633-A845-4646-76DFA78B907B,Subtitle,subst
+{1}
+
+DA33B826-E633-A845-4646-76DFA78B907B,Title,subst
+{1}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,Active
+{No}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,Checked
+{No}
+>>>>>>> 0.12
DDBBD8A9-13D7-9509-9202-419E989F60A9,Conditions
{0 conditions}
DDBBD8A9-13D7-9509-9202-419E989F60A9,Text,subst
+<<<<<<< HEAD
1
DDBBD8A9-13D7-9509-9202-419E989F60A9,Type
@@ -2351,6 +3975,21 @@ DDBBD8A9-13D7-9509-9202-419E989F60A9,X
DDBBD8A9-13D7-9509-9202-419E989F60A9,Y
200
+=======
+{1}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,Type
+{checkbutton}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,VirtualText
+{AddBackupLocation}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,X
+{50}
+
+DDBBD8A9-13D7-9509-9202-419E989F60A9,Y
+{200}
+>>>>>>> 0.12
DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,Alias
{Install Backup Service}
@@ -2362,12 +4001,17 @@ DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,Conditions
{0 conditions}
DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,FileName
+<<<<<<< HEAD
<%ShortAppName%>-program-installService
+=======
+{<%ShortAppName%>-program-installService}
+>>>>>>> 0.12
DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,ShortcutName
{Install Service}
DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,TargetFileName
+<<<<<<< HEAD
<%InstallDir%>/tools/InstallService.bat
DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,WorkingDirectory
@@ -2375,11 +4019,21 @@ DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,WorkingDirectory
DECC120D-6904-7F17-45A49184A5A3,Active
No
+=======
+{<%InstallDir%>/tools/InstallService.bat}
+
+DE800F1C-CB1A-E1CE-AEB8-B0A6DB4818E7,WorkingDirectory
+{<%InstallDir%>}
+
+DECC120D-6904-7F17-45A49184A5A3,Active
+{No}
+>>>>>>> 0.12
DECC120D-6904-7F17-45A49184A5A3,Conditions
{2 conditions}
DECC120D-6904-7F17-45A49184A5A3,ShortcutName
+<<<<<<< HEAD
<%AppName%>
DECC120D-6904-7F17-45A49184A5A3,TargetFileName
@@ -2387,33 +4041,63 @@ DECC120D-6904-7F17-45A49184A5A3,TargetFileName
DECC120D-6904-7F17-45A49184A5A3,WorkingDirectory
<%InstallDir%>
+=======
+{<%AppName%>}
+
+DECC120D-6904-7F17-45A49184A5A3,TargetFileName
+{<%ProgramExecutable%>}
+
+DECC120D-6904-7F17-45A49184A5A3,WorkingDirectory
+{<%InstallDir%>}
+>>>>>>> 0.12
DFFF91A9-2CA5-6ABE-8474D814AF88,CheckCondition
{Before Action is Executed}
DFFF91A9-2CA5-6ABE-8474D814AF88,Operator
+<<<<<<< HEAD
false
DFFF91A9-2CA5-6ABE-8474D814AF88,String
<%SilentMode%>
+=======
+{false}
+
+DFFF91A9-2CA5-6ABE-8474D814AF88,String
+{<%SilentMode%>}
+>>>>>>> 0.12
E02368C5-95B5-03A7-3282740037B0,CheckCondition
{Before Action is Executed}
E02368C5-95B5-03A7-3282740037B0,Operator
+<<<<<<< HEAD
false
E02368C5-95B5-03A7-3282740037B0,String
<%InstallStopped%>
+=======
+{false}
+
+E02368C5-95B5-03A7-3282740037B0,String
+{<%InstallStopped%>}
+>>>>>>> 0.12
E161F216-E597-B340-C1A71C476E2C,CheckCondition
{Before Action is Executed}
E161F216-E597-B340-C1A71C476E2C,Message,subst
+<<<<<<< HEAD
1
E161F216-E597-B340-C1A71C476E2C,Title,subst
1
+=======
+{1}
+
+E161F216-E597-B340-C1A71C476E2C,Title,subst
+{1}
+>>>>>>> 0.12
E23AC50D-7CFB-800E-A99C6F4068F8,Alias
{Cancel Actions}
@@ -2425,7 +4109,11 @@ E44CFF46-6302-C518-B9C30D2E43F7,CheckCondition
{Before Action is Executed}
E44CFF46-6302-C518-B9C30D2E43F7,String
+<<<<<<< HEAD
<%CreateDesktopShortcut%>
+=======
+{<%CreateDesktopShortcut%>}
+>>>>>>> 0.12
E4DEA723-FC78-45D7-BAB1-A3E4C4C96EA1,Conditions
{0 conditions}
@@ -2443,13 +4131,21 @@ E56ADFF4-C15E-AEDB-A599-C468AF72C4BB,Source
{<%InstallDir%>\templates\NotifySysAdmin.template.vbs}
EB2B31A1-C111-3582-0C8A5656692A,String
+<<<<<<< HEAD
<%ErrorsOccurred%>
+=======
+{<%ErrorsOccurred%>}
+>>>>>>> 0.12
EB532611-5F30-3C24-66EB-F3826D9054FD,CheckCondition
{Before Action is Executed}
EB532611-5F30-3C24-66EB-F3826D9054FD,String
+<<<<<<< HEAD
<%AddBackupLocation%>
+=======
+{<%AddBackupLocation%>}
+>>>>>>> 0.12
F4024A3E-9A6D-2726-5E0CFFA93054,Alias
{Uninstall Actions}
@@ -2458,7 +4154,11 @@ F4024A3E-9A6D-2726-5E0CFFA93054,Conditions
{0 conditions}
F5F21749-8B3A-49C6-9138-9C4D6D703D26,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
F5F21749-8B3A-49C6-9138-9C4D6D703D26,Conditions
{0 conditions}
@@ -2467,6 +4167,7 @@ F5F21749-8B3A-49C6-9138-9C4D6D703D26,ProgramCommandLine
{cmd /k tools/7za.exe encrypted_keys.exe -p<%InstallPassword%>}
F5F21749-8B3A-49C6-9138-9C4D6D703D26,ProgressiveOutputWidget
+<<<<<<< HEAD
Message
F5F21749-8B3A-49C6-9138-9C4D6D703D26,ShowProgressiveOutput
@@ -2489,11 +4190,36 @@ F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Caption,subst
F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,CompanyLabel,subst
0
+=======
+{Message}
+
+F5F21749-8B3A-49C6-9138-9C4D6D703D26,ShowProgressiveOutput
+{Yes}
+
+F5F21749-8B3A-49C6-9138-9C4D6D703D26,WorkingDirectory
+{<%InstallDir%>}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Active
+{Yes}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,BackButton,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,CancelButton,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Caption,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,CompanyLabel,subst
+{0}
+>>>>>>> 0.12
F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Conditions
{0 conditions}
F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Message,subst
+<<<<<<< HEAD
1
F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,NextButton,subst
@@ -2510,39 +4236,80 @@ F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,UserNameLabel,subst
F9E38720-6ABA-8B99-2471-496902E4CBC2,Active
No
+=======
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,NextButton,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Subtitle,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,Title,subst
+{1}
+
+F8FD4BD6-F1DF-3F8D-B857-98310E4B1143,UserNameLabel,subst
+{1}
+
+F9E38720-6ABA-8B99-2471-496902E4CBC2,Active
+{No}
+>>>>>>> 0.12
F9E38720-6ABA-8B99-2471-496902E4CBC2,Conditions
{0 conditions}
F9E38720-6ABA-8B99-2471-496902E4CBC2,ResultVirtualText
+<<<<<<< HEAD
BackupLocationPath
+=======
+{BackupLocationPath}
+>>>>>>> 0.12
F9E38720-6ABA-8B99-2471-496902E4CBC2,TclScript
{set BackupLocationPath "" }
FB697A88-2842-468E-9776-85E84B009340,Active
+<<<<<<< HEAD
No
+=======
+{No}
+>>>>>>> 0.12
FB697A88-2842-468E-9776-85E84B009340,Conditions
{0 conditions}
FB697A88-2842-468E-9776-85E84B009340,IgnoreErrors
+<<<<<<< HEAD
Yes
+=======
+{Yes}
+>>>>>>> 0.12
FB697A88-2842-468E-9776-85E84B009340,ProgramCommandLine
{"<%InstallDir%>\<%ServiceExeName%> -r -S <%ServiceName%>}
FB697A88-2842-468E-9776-85E84B009340,WorkingDirectory
+<<<<<<< HEAD
<%Temp%>
FDF68FD6-BEA8-4A74-867D-5139F4D9E793,Active
No
+=======
+{<%Temp%>}
+
+FDF68FD6-BEA8-4A74-867D-5139F4D9E793,Active
+{No}
+>>>>>>> 0.12
FDF68FD6-BEA8-4A74-867D-5139F4D9E793,Conditions
{0 conditions}
FDF68FD6-BEA8-4A74-867D-5139F4D9E793,WaitTime
+<<<<<<< HEAD
2000
+=======
+{2000}
+>>>>>>> 0.12
FEFD090D-C133-BC95-B3564F693CD3,Alias
{Finish Actions}
@@ -2551,6 +4318,7 @@ FEFD090D-C133-BC95-B3564F693CD3,Conditions
{0 conditions}
FreeBSD-4-x86,Active
+<<<<<<< HEAD
No
FreeBSD-4-x86,DefaultDirectoryPermission
@@ -2573,11 +4341,39 @@ Standard
FreeBSD-4-x86,InstallType
Typical
+=======
+{No}
+
+FreeBSD-4-x86,BuildSeparateArchives
+{No}
+
+FreeBSD-4-x86,DefaultDirectoryPermission
+{0755}
+
+FreeBSD-4-x86,DefaultFilePermission
+{0755}
+
+FreeBSD-4-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+FreeBSD-4-x86,FallBackToConsole
+{Yes}
+
+FreeBSD-4-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+FreeBSD-4-x86,InstallMode
+{Standard}
+
+FreeBSD-4-x86,InstallType
+{Typical}
+>>>>>>> 0.12
FreeBSD-4-x86,ProgramExecutable
{}
FreeBSD-4-x86,ProgramFolderAllUsers
+<<<<<<< HEAD
No
FreeBSD-4-x86,ProgramFolderName
@@ -2585,11 +4381,21 @@ FreeBSD-4-x86,ProgramFolderName
FreeBSD-4-x86,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+FreeBSD-4-x86,ProgramFolderName
+{<%AppName%>}
+
+FreeBSD-4-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
FreeBSD-4-x86,ProgramName
{}
FreeBSD-4-x86,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
FreeBSD-4-x86,PromptForRoot
@@ -2675,11 +4481,213 @@ Standard
HPUX-hppa,InstallType
Typical
+=======
+{<%InstallDir%>/README.txt}
+
+FreeBSD-4-x86,PromptForRoot
+{Yes}
+
+FreeBSD-4-x86,RequireRoot
+{No}
+
+FreeBSD-4-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+FreeBSD-5-x86,Active
+{No}
+
+FreeBSD-5-x86,BuildSeparateArchives
+{No}
+
+FreeBSD-5-x86,DefaultDirectoryPermission
+{0755}
+
+FreeBSD-5-x86,DefaultFilePermission
+{0755}
+
+FreeBSD-5-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+FreeBSD-5-x86,FallBackToConsole
+{Yes}
+
+FreeBSD-5-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+FreeBSD-5-x86,InstallMode
+{Standard}
+
+FreeBSD-5-x86,InstallType
+{Typical}
+
+FreeBSD-5-x86,ProgramExecutable
+{}
+
+FreeBSD-5-x86,ProgramFolderAllUsers
+{No}
+
+FreeBSD-5-x86,ProgramFolderName
+{<%AppName%>}
+
+FreeBSD-5-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+
+FreeBSD-5-x86,ProgramName
+{}
+
+FreeBSD-5-x86,ProgramReadme
+{<%InstallDir%>/README.txt}
+
+FreeBSD-5-x86,PromptForRoot
+{Yes}
+
+FreeBSD-5-x86,RequireRoot
+{No}
+
+FreeBSD-5-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+FreeBSD-6-x86,Active
+{No}
+
+FreeBSD-6-x86,BuildSeparateArchives
+{No}
+
+FreeBSD-6-x86,DefaultDirectoryPermission
+{0755}
+
+FreeBSD-6-x86,DefaultFilePermission
+{0755}
+
+FreeBSD-6-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+FreeBSD-6-x86,FallBackToConsole
+{Yes}
+
+FreeBSD-6-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+FreeBSD-6-x86,InstallMode
+{Standard}
+
+FreeBSD-6-x86,InstallType
+{Typical}
+
+FreeBSD-6-x86,ProgramExecutable
+{}
+
+FreeBSD-6-x86,ProgramFolderAllUsers
+{No}
+
+FreeBSD-6-x86,ProgramFolderName
+{<%AppName%>}
+
+FreeBSD-6-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+
+FreeBSD-6-x86,ProgramName
+{}
+
+FreeBSD-6-x86,ProgramReadme
+{<%InstallDir%>/README.txt}
+
+FreeBSD-6-x86,PromptForRoot
+{Yes}
+
+FreeBSD-6-x86,RequireRoot
+{No}
+
+FreeBSD-6-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+FreeBSD-7-x86,Active
+{No}
+
+FreeBSD-7-x86,BuildSeparateArchives
+{No}
+
+FreeBSD-7-x86,DefaultDirectoryPermission
+{0755}
+
+FreeBSD-7-x86,DefaultFilePermission
+{0755}
+
+FreeBSD-7-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+FreeBSD-7-x86,FallBackToConsole
+{Yes}
+
+FreeBSD-7-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+FreeBSD-7-x86,InstallMode
+{Standard}
+
+FreeBSD-7-x86,InstallType
+{Typical}
+
+FreeBSD-7-x86,ProgramExecutable
+{}
+
+FreeBSD-7-x86,ProgramFolderAllUsers
+{No}
+
+FreeBSD-7-x86,ProgramFolderName
+{<%AppName%>}
+
+FreeBSD-7-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+
+FreeBSD-7-x86,ProgramName
+{}
+
+FreeBSD-7-x86,ProgramReadme
+{<%InstallDir%>/README.txt}
+
+FreeBSD-7-x86,PromptForRoot
+{Yes}
+
+FreeBSD-7-x86,RequireRoot
+{No}
+
+FreeBSD-7-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+HPUX-hppa,Active
+{No}
+
+HPUX-hppa,BuildSeparateArchives
+{No}
+
+HPUX-hppa,DefaultDirectoryPermission
+{0755}
+
+HPUX-hppa,DefaultFilePermission
+{0755}
+
+HPUX-hppa,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+HPUX-hppa,FallBackToConsole
+{Yes}
+
+HPUX-hppa,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+HPUX-hppa,InstallMode
+{Standard}
+
+HPUX-hppa,InstallType
+{Typical}
+>>>>>>> 0.12
HPUX-hppa,ProgramExecutable
{}
HPUX-hppa,ProgramFolderAllUsers
+<<<<<<< HEAD
No
HPUX-hppa,ProgramFolderName
@@ -2687,11 +4695,21 @@ HPUX-hppa,ProgramFolderName
HPUX-hppa,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+HPUX-hppa,ProgramFolderName
+{<%AppName%>}
+
+HPUX-hppa,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
HPUX-hppa,ProgramName
{}
HPUX-hppa,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
HPUX-hppa,PromptForRoot
@@ -2741,11 +4759,66 @@ Linux-x86,ProgramFolderName
Linux-x86,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{<%InstallDir%>/README.txt}
+
+HPUX-hppa,PromptForRoot
+{Yes}
+
+HPUX-hppa,RequireRoot
+{No}
+
+HPUX-hppa,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+Linux-x86,Active
+{No}
+
+Linux-x86,BuildSeparateArchives
+{No}
+
+Linux-x86,BuildType
+{dynamic}
+
+Linux-x86,DefaultDirectoryPermission
+{00755}
+
+Linux-x86,DefaultFilePermission
+{00755}
+
+Linux-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+Linux-x86,FallBackToConsole
+{Yes}
+
+Linux-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+Linux-x86,InstallMode
+{Standard}
+
+Linux-x86,InstallType
+{Typical}
+
+Linux-x86,ProgramExecutable
+{<%InstallDir%>/TebucoSafe}
+
+Linux-x86,ProgramFolderAllUsers
+{No}
+
+Linux-x86,ProgramFolderName
+{<%AppName%>}
+
+Linux-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
Linux-x86,ProgramName
{}
Linux-x86,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
Linux-x86,PromptForRoot
@@ -2780,11 +4853,105 @@ Standard
Solaris-sparc,InstallType
Typical
+=======
+{<%InstallDir%>/README.txt}
+
+Linux-x86,PromptForRoot
+{Yes}
+
+Linux-x86,RequireRoot
+{No}
+
+Linux-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+Linux-x86_64,Active
+{No}
+
+Linux-x86_64,BuildSeparateArchives
+{No}
+
+Linux-x86_64,DefaultDirectoryPermission
+{0755}
+
+Linux-x86_64,DefaultFilePermission
+{0755}
+
+Linux-x86_64,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+Linux-x86_64,FallBackToConsole
+{Yes}
+
+Linux-x86_64,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+Linux-x86_64,InstallMode
+{Standard}
+
+Linux-x86_64,InstallType
+{Typical}
+
+Linux-x86_64,ProgramExecutable
+{}
+
+Linux-x86_64,ProgramFolderAllUsers
+{No}
+
+Linux-x86_64,ProgramFolderName
+{<%AppName%>}
+
+Linux-x86_64,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+
+Linux-x86_64,ProgramName
+{}
+
+Linux-x86_64,ProgramReadme
+{<%InstallDir%>/README.txt}
+
+Linux-x86_64,PromptForRoot
+{Yes}
+
+Linux-x86_64,RequireRoot
+{No}
+
+Linux-x86_64,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+Solaris-sparc,Active
+{No}
+
+Solaris-sparc,BuildSeparateArchives
+{No}
+
+Solaris-sparc,DefaultDirectoryPermission
+{0755}
+
+Solaris-sparc,DefaultFilePermission
+{0755}
+
+Solaris-sparc,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+Solaris-sparc,FallBackToConsole
+{Yes}
+
+Solaris-sparc,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+Solaris-sparc,InstallMode
+{Standard}
+
+Solaris-sparc,InstallType
+{Typical}
+>>>>>>> 0.12
Solaris-sparc,ProgramExecutable
{}
Solaris-sparc,ProgramFolderAllUsers
+<<<<<<< HEAD
No
Solaris-sparc,ProgramFolderName
@@ -2792,11 +4959,21 @@ Solaris-sparc,ProgramFolderName
Solaris-sparc,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+Solaris-sparc,ProgramFolderName
+{<%AppName%>}
+
+Solaris-sparc,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
Solaris-sparc,ProgramName
{}
Solaris-sparc,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
Solaris-sparc,PromptForRoot
@@ -2837,11 +5014,111 @@ Typical
TarArchive,OutputFileName
<%ShortAppName%>-<%Version%>.tar.gz
+=======
+{<%InstallDir%>/README.txt}
+
+Solaris-sparc,PromptForRoot
+{Yes}
+
+Solaris-sparc,RequireRoot
+{No}
+
+Solaris-sparc,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+Solaris-x86,Active
+{No}
+
+Solaris-x86,BuildSeparateArchives
+{No}
+
+Solaris-x86,DefaultDirectoryPermission
+{0755}
+
+Solaris-x86,DefaultFilePermission
+{0755}
+
+Solaris-x86,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+Solaris-x86,FallBackToConsole
+{Yes}
+
+Solaris-x86,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+Solaris-x86,InstallMode
+{Standard}
+
+Solaris-x86,InstallType
+{Typical}
+
+Solaris-x86,ProgramExecutable
+{}
+
+Solaris-x86,ProgramFolderAllUsers
+{No}
+
+Solaris-x86,ProgramFolderName
+{<%AppName%>}
+
+Solaris-x86,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+
+Solaris-x86,ProgramName
+{}
+
+Solaris-x86,ProgramReadme
+{<%InstallDir%>/README.txt}
+
+Solaris-x86,PromptForRoot
+{Yes}
+
+Solaris-x86,RequireRoot
+{No}
+
+Solaris-x86,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+
+TarArchive,Active
+{No}
+
+TarArchive,BuildSeparateArchives
+{No}
+
+TarArchive,CompressionLevel
+{6}
+
+TarArchive,DefaultDirectoryPermission
+{0755}
+
+TarArchive,DefaultFilePermission
+{0755}
+
+TarArchive,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+TarArchive,FallBackToConsole
+{Yes}
+
+TarArchive,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+TarArchive,InstallMode
+{Standard}
+
+TarArchive,InstallType
+{Typical}
+
+TarArchive,OutputFileName
+{<%ShortAppName%>-<%Version%>.tar.gz}
+>>>>>>> 0.12
TarArchive,ProgramExecutable
{}
TarArchive,ProgramFolderAllUsers
+<<<<<<< HEAD
No
TarArchive,ProgramFolderName
@@ -2849,11 +5126,21 @@ TarArchive,ProgramFolderName
TarArchive,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+TarArchive,ProgramFolderName
+{<%AppName%>}
+
+TarArchive,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
TarArchive,ProgramName
{}
TarArchive,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
TarArchive,PromptForRoot
@@ -2864,39 +5151,85 @@ No
TarArchive,RootInstallDir
/usr/local/<%ShortAppName%>
+=======
+{<%InstallDir%>/README.txt}
+
+TarArchive,PromptForRoot
+{Yes}
+
+TarArchive,RequireRoot
+{No}
+
+TarArchive,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+>>>>>>> 0.12
TarArchive,VirtualTextMap
{<%InstallDir%> <%ShortAppName%>}
Windows,Active
+<<<<<<< HEAD
Yes
+=======
+{Yes}
+
+Windows,BuildSeparateArchives
+{No}
+>>>>>>> 0.12
Windows,BuildType
{}
Windows,Executable
+<<<<<<< HEAD
installer.exe
Windows,IncludeTWAPI
No
+=======
+{installer.exe}
+
+Windows,FileDescription
+{<%AppName%> <%Version%> Setup}
+
+Windows,IncludeTWAPI
+{No}
+>>>>>>> 0.12
Windows,InstallDir
{C:\Program Files\<%BrandName%>}
Windows,InstallMode
+<<<<<<< HEAD
Standard
Windows,InstallType
Typical
+=======
+{Standard}
+
+Windows,InstallType
+{Typical}
+
+Windows,LastRequireAdministrator
+{Yes}
+>>>>>>> 0.12
Windows,ProgramExecutable
{}
Windows,ProgramFolderAllUsers
+<<<<<<< HEAD
No
Windows,ProgramFolderName
<%BrandName%>
+=======
+{No}
+
+Windows,ProgramFolderName
+{<%BrandName%>}
+>>>>>>> 0.12
Windows,ProgramLicense
{<%InstallDir%>\LICENSE.txt}
@@ -2907,10 +5240,20 @@ Windows,ProgramName
Windows,ProgramReadme
{}
+<<<<<<< HEAD
+=======
+Windows,RequireAdministrator
+{Yes}
+
+Windows,UseUncompressedBinaries
+{No}
+
+>>>>>>> 0.12
Windows,WindowsIcon
{}
ZipArchive,Active
+<<<<<<< HEAD
No
ZipArchive,CompressionLevel
@@ -2939,11 +5282,45 @@ Typical
ZipArchive,OutputFileName
<%ShortAppName%>-<%Version%>.zip
+=======
+{No}
+
+ZipArchive,BuildSeparateArchives
+{No}
+
+ZipArchive,CompressionLevel
+{6}
+
+ZipArchive,DefaultDirectoryPermission
+{0755}
+
+ZipArchive,DefaultFilePermission
+{0755}
+
+ZipArchive,Executable
+{<%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>}
+
+ZipArchive,FallBackToConsole
+{Yes}
+
+ZipArchive,InstallDir
+{<%Home%>/<%ShortAppName%>}
+
+ZipArchive,InstallMode
+{Standard}
+
+ZipArchive,InstallType
+{Typical}
+
+ZipArchive,OutputFileName
+{<%ShortAppName%>-<%Version%>.zip}
+>>>>>>> 0.12
ZipArchive,ProgramExecutable
{}
ZipArchive,ProgramFolderAllUsers
+<<<<<<< HEAD
No
ZipArchive,ProgramFolderName
@@ -2951,11 +5328,21 @@ ZipArchive,ProgramFolderName
ZipArchive,ProgramLicense
<%InstallDir%>/LICENSE.txt
+=======
+{No}
+
+ZipArchive,ProgramFolderName
+{<%AppName%>}
+
+ZipArchive,ProgramLicense
+{<%InstallDir%>/LICENSE.txt}
+>>>>>>> 0.12
ZipArchive,ProgramName
{}
ZipArchive,ProgramReadme
+<<<<<<< HEAD
<%InstallDir%>/README.txt
ZipArchive,PromptForRoot
@@ -2966,6 +5353,18 @@ No
ZipArchive,RootInstallDir
/usr/local/<%ShortAppName%>
+=======
+{<%InstallDir%>/README.txt}
+
+ZipArchive,PromptForRoot
+{Yes}
+
+ZipArchive,RequireRoot
+{No}
+
+ZipArchive,RootInstallDir
+{/usr/local/<%ShortAppName%>}
+>>>>>>> 0.12
ZipArchive,VirtualTextMap
{<%InstallDir%> <%ShortAppName%>}
@@ -2974,6 +5373,7 @@ ZipArchive,VirtualTextMap
::msgcat::mcmset de {
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+<<<<<<< HEAD
<%UninstallCompleteText%>
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
@@ -2984,10 +5384,23 @@ B002A311-F8E7-41DE-B039-521391924E5B,Message
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
<%UninstallingApplicationText%>
+=======
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message
+{<%InstallingApplicationText%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+>>>>>>> 0.12
}
::msgcat::mcmset en {
16D53E40-546B-54C3-088B1B5E3BBB,Text
+<<<<<<< HEAD
<%CreateDesktopShortcutText%>
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
@@ -2995,6 +5408,15 @@ B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
<%InstallationCompleteText%>
+=======
+{<%CreateDesktopShortcutText%>}
+
+20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+>>>>>>> 0.12
2E2963BD-DDBD-738D-A910-B7F3F04946F9,Text
{No:<%BackupLocationNumber%> }
@@ -3003,6 +5425,7 @@ B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
BackupLocations\n\{\n
32F5B0AF-EB83-7A03-D8FAE1ECE473,Message
+<<<<<<< HEAD
<%InstallStartupText%>
32F5B0AF-EB83-7A03-D8FAE1ECE473,Title
@@ -3013,6 +5436,18 @@ BackupLocations\n\{\n
3B6E2E7C-1A26-27F1-D578E383B128,Text
<%ViewReadmeText%>
+=======
+{<%InstallStartupText%>}
+
+32F5B0AF-EB83-7A03-D8FAE1ECE473,Title
+{<%InstallApplicationText%>}
+
+36FF8915-8148-0F1F-27D7239CBFA1,Text
+{<%ViewReadmeText%>}
+
+3B6E2E7C-1A26-27F1-D578E383B128,Text
+{<%ViewReadmeText%>}
+>>>>>>> 0.12
3D33AA8C-0037-204B-39A339FD38BD,Message
{<%BrandName%> has been removed from your system. Thank you for using the <%BrandName%> Backup Service. If you need further assistance, please contact us at http://<%BrandName%>.com or support@<%BrandName%>.com.}
@@ -3033,6 +5468,7 @@ BackupLocations\n\{\n
{Backup Directory}
4A9C852B-647E-EED5-5482FFBCC2AF,Description
+<<<<<<< HEAD
<%ProgramFilesDescription%>
4ACB0B47-42B3-2B3A-BFE9AA4EC707,Message
@@ -3040,6 +5476,15 @@ BackupLocations\n\{\n
4ACB0B47-42B3-2B3A-BFE9AA4EC707,Title
<%UninstallApplicationText%>
+=======
+{<%ProgramFilesDescription%>}
+
+4ACB0B47-42B3-2B3A-BFE9AA4EC707,Message
+{<%UninstallStartupText%>}
+
+4ACB0B47-42B3-2B3A-BFE9AA4EC707,Title
+{<%UninstallApplicationText%>}
+>>>>>>> 0.12
58E1119F-639E-17C9-5D3898F385AA,Caption
{Setup will install <%ShortAppName%> in the following folder.
@@ -3088,13 +5533,21 @@ You will be presented with the current configuration file so that you may make a
\}\n
8202CECC-54A0-9B6C-D24D111BA52E,Description
+<<<<<<< HEAD
<%TypicalInstallDescription%>
+=======
+{<%TypicalInstallDescription%>}
+>>>>>>> 0.12
8419AAAD-5860-F73E-8D11-4D1BDA4D7D37,Text
{Add another backup location?}
855DE408-060E-3D35-08B5-1D9AB05C2865,Text
+<<<<<<< HEAD
Exclusions
+=======
+{Exclusions}
+>>>>>>> 0.12
8E095096-F018-A880-429D-A2177A9B70EA,Text
{AddAnother: <%AddBackupLocation%>}
@@ -3103,6 +5556,7 @@ Exclusions
{Please enter your phone number and email address.}
9013E862-8E81-5290-64F9-D8BCD13EC7E5,CompanyLabel
+<<<<<<< HEAD
Email:
9013E862-8E81-5290-64F9-D8BCD13EC7E5,UserNameLabel
@@ -3110,6 +5564,15 @@ Phone:
937C3FDD-FB28-98BD-3DAB276E59ED,Text
<%CreateQuickLaunchShortcutText%>
+=======
+{Email:}
+
+9013E862-8E81-5290-64F9-D8BCD13EC7E5,UserNameLabel
+{Phone:}
+
+937C3FDD-FB28-98BD-3DAB276E59ED,Text
+{<%CreateQuickLaunchShortcutText%>}
+>>>>>>> 0.12
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Caption
{Click Next to continue...}
@@ -3121,16 +5584,27 @@ Phone:
{}
9A23D3ED-4D9D-9C57-C2A7-71DE0FFF0266,Title
+<<<<<<< HEAD
Continue
+=======
+{Continue}
+>>>>>>> 0.12
9BAB328D-414B-D351-CA8D-824DF94B9DCA,Text
{Add another backup location after this one?}
A18C2977-1409-C1FB-892415711F72,Text
+<<<<<<< HEAD
<%LaunchApplicationText%>
AAF2142A-9FC9-4664-DFF2-13B9EB7BA0E1,CompanyLabel
Company:
+=======
+{<%LaunchApplicationText%>}
+
+AAF2142A-9FC9-4664-DFF2-13B9EB7BA0E1,CompanyLabel
+{Company:}
+>>>>>>> 0.12
AE3BD5B4-35DE-4240-B79914D43E56,Caption
{Welcome to the Installation Wizard for <%BrandName%> Backup Service!}
@@ -3148,6 +5622,7 @@ Click Next to continue or Cancel to exit Setup.
}
B002A311-F8E7-41DE-B039-521391924E5B,Message
+<<<<<<< HEAD
<%InstallingApplicationText%>
B4404713-AF4F-4F4B-670F3115517F,Description
@@ -3174,6 +5649,94 @@ Redistribution and use in source and binary forms, with or without modification,
[Where legally impermissible the Authors do not disclaim liability for direct physical injury or death caused solely by defects in the software unless it is modified by a third party.]
THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE}
+=======
+{<%InstallingApplicationText%>}
+
+B4404713-AF4F-4F4B-670F3115517F,Description
+{<%CustomInstallDescription%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+
+B506E7DA-E7C4-4D42-8C03-FD27BA16D078,Text
+{Box Backup, http://www.boxbackup.org/
+
+Copyright (c) 2003-2010, Ben Summers and contributors.
+All rights reserved.
+
+The license of the code was changed on 23-Jan-2010 in order to meet the
+Fedora Project's definition of Free Software, and therefore allow inclusion
+in Fedora, Red Hat Linux and CentOS. This also solves a long-standing
+incompatibility with the GNU Readline library that prevented us from
+distributing Box Backup binaries compiled against that library. You can
+review our discussions of the change in the mailing list archives at:
+http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000005.html
+
+Note that this project uses mixed licensing. Different parts of the project
+may be used and distributed under different licenses, as described below.
+The two licenses used are "Box Backup GPL" and a BSD-style license.
+
+Unless stated otherwise in the file, all files in the following directories
+fall under the "Box Backup GPL" license, described below:
+
+bin/bbackupctl
+bin/bbackupd
+bin/bbackupobjdump
+bin/bbackupquery
+bin/bbstoreaccounts
+bin/bbstored
+bin/s3simulator
+lib/backupclient
+lib/backupstore
+test/backupdiff
+test/backupstore
+test/backupstorefix
+test/backupstorepatch
+test/bbackupd
+contrib/bbadmin
+contrib/bbreporter
+contrib/cygwin
+contrib/debian
+contrib/mac_osx
+contrib/redhat
+contrib/rpm
+contrib/solaris
+contrib/suse
+contrib/windows
+distribution/boxbackup
+
+The "Box Backup GPL" license text may be found in the file
+LICENSE-GPL.txt, or online at:
+[https://www.boxbackup.org/svn/box/trunk/LICENSE-GPL.txt]
+
+Unless stated otherwise in the file, all files in the following directories
+are dual licensed under the BSD and GPL licenses. You may use and distribute
+them providing that you comply EITHER with the terms of the BSD license,
+OR the GPL license. It is not necessary to comply with both licenses,
+only one.
+
+lib/common
+lib/compress
+lib/crypto
+lib/httpserver
+lib/intercept
+lib/raidfile
+lib/server
+lib/win32
+test/basicserver
+test/common
+test/compress
+test/crypto
+test/httpserver
+test/raidfile
+test/win32
+infrastructure
+distribution
+
+The dual license text may be found in the file
+LICENSE-DUAL.txt, or online at:
+[https://www.boxbackup.org/svn/box/trunk/LICENSE-DUAL.txt]}
+>>>>>>> 0.12
B57F8C91-2439-CFD3-7EB5-57D4EA48D3C6,Caption
{<%BrandName%> will backup the following folder.
@@ -3199,19 +5762,31 @@ B9B85EF1-1D76-4BF5-ABB9-092A8DB35851,Caption
{Please enter the agreed-upon password for your encrypted key file...}
B9B85EF1-1D76-4BF5-ABB9-092A8DB35851,CompanyLabel
+<<<<<<< HEAD
Password:
+=======
+{Password:}
+>>>>>>> 0.12
B9B85EF1-1D76-4BF5-ABB9-092A8DB35851,Subtitle
{Please enter your encrypted key file password.}
C105AAAE-7C16-2C9E-769FE4535B60,Caption
+<<<<<<< HEAD
<%ApplicationReadmeText%>
+=======
+{<%ApplicationReadmeText%>}
+>>>>>>> 0.12
C105AAAE-7C16-2C9E-769FE4535B60,Message
{}
C105AAAE-7C16-2C9E-769FE4535B60,Title
+<<<<<<< HEAD
<%ApplicationReadmeText%>
+=======
+{<%ApplicationReadmeText%>}
+>>>>>>> 0.12
C7762473-273F-E3CA-17E3-65789B14CDB0,TextToWrite
{<%BackupLocationShortName%>
@@ -3237,10 +5812,17 @@ CB058DBA-C3B7-2F48-D985-BE2F7107A76D,Title
{Choose Backup Location}
CFFA27AF-A641-E41C-B4A0E3BB3CBB,Text
+<<<<<<< HEAD
<%LaunchApplicationText%>
D4625CA6-9864-D8EF-F252D7B7DC87,Text
<%CreateDesktopShortcutText%>
+=======
+{<%LaunchApplicationText%>}
+
+D4625CA6-9864-D8EF-F252D7B7DC87,Text
+{<%CreateDesktopShortcutText%>}
+>>>>>>> 0.12
D47BE952-79F2-844E-D2E5-8F22044E7A9D,Text
{Account Number:}
@@ -3255,7 +5837,11 @@ DA33B826-E633-A845-4646-76DFA78B907B,Subtitle
{}
DA33B826-E633-A845-4646-76DFA78B907B,Title
+<<<<<<< HEAD
Continue
+=======
+{Continue}
+>>>>>>> 0.12
DDBBD8A9-13D7-9509-9202-419E989F60A9,Text
{Add another Backup Location?}
@@ -3264,7 +5850,11 @@ E0CADC4E-08A6-E429-3B49-BB8CFB7B097F,Text
{Simple name for this Backup Location (short, no spaces or special characters)}
E161F216-E597-B340-C1A71C476E2C,Message
+<<<<<<< HEAD
<%UninstallLeftoverText%>
+=======
+{<%UninstallLeftoverText%>}
+>>>>>>> 0.12
E161F216-E597-B340-C1A71C476E2C,Title
{Uninstall <%BrandName%>}
@@ -3291,7 +5881,11 @@ F98784B1-1965-0F42-6BB0542AE1A9,Message
{Click Next to install the TebucoSafe Backup Service as an operating system service on your computer (see services.msc), and start up that service. }
FC678E76-6823-2E55-204CA01C35EF,Text
+<<<<<<< HEAD
<%CreateQuickLaunchShortcutText%>
+=======
+{<%CreateQuickLaunchShortcutText%>}
+>>>>>>> 0.12
FF4F6EEA-F4CC-428E-AF33-EB0E88E2147E,Text
{
@@ -3335,6 +5929,7 @@ POSSIBILITY OF SUCH DAMAGE.
}
::msgcat::mcmset es {
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+<<<<<<< HEAD
<%UninstallCompleteText%>
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
@@ -3345,10 +5940,23 @@ B002A311-F8E7-41DE-B039-521391924E5B,Message
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
<%UninstallingApplicationText%>
+=======
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message
+{<%InstallingApplicationText%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+>>>>>>> 0.12
}
::msgcat::mcmset fr {
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+<<<<<<< HEAD
<%UninstallCompleteText%>
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
@@ -3359,10 +5967,23 @@ B002A311-F8E7-41DE-B039-521391924E5B,Message
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
<%UninstallingApplicationText%>
+=======
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message
+{<%InstallingApplicationText%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+>>>>>>> 0.12
}
::msgcat::mcmset pl {
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+<<<<<<< HEAD
<%UninstallCompleteText%>
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
@@ -3373,10 +5994,23 @@ B002A311-F8E7-41DE-B039-521391924E5B,Message
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
<%UninstallingApplicationText%>
+=======
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message
+{<%InstallingApplicationText%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+>>>>>>> 0.12
}
::msgcat::mcmset pt_br {
20CBDBEA-2217-457B-8D98-D692C4F591E9,Message
+<<<<<<< HEAD
<%UninstallCompleteText%>
2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
@@ -3387,6 +6021,18 @@ B002A311-F8E7-41DE-B039-521391924E5B,Message
B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
<%UninstallingApplicationText%>
+=======
+{<%UninstallCompleteText%>}
+
+2BF07B5A-9B06-4C1E-810D-5B5E9303D2C6,Message
+{<%InstallationCompleteText%>}
+
+B002A311-F8E7-41DE-B039-521391924E5B,Message
+{<%InstallingApplicationText%>}
+
+B4ED4636-22D8-41DC-9E3D-BD1E1CAD2174,Message
+{<%UninstallingApplicationText%>}
+>>>>>>> 0.12
}
diff --git a/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt b/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
index 3677d376..2fca9572 100644
--- a/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
+++ b/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
@@ -1,4 +1,8 @@
LICENSE-GPL.txt
+<<<<<<< HEAD
+=======
+qdbm
+>>>>>>> 0.12
LICENSE DUAL
lib/intercept
@@ -27,8 +31,11 @@ test/backupstorepatch
test/bbackupd
test/bbackupd/testfiles
test/backupdiff
+<<<<<<< HEAD
test/httpserver/testfiles
test/httpserver/testfiles/photos
+=======
+>>>>>>> 0.12
docs/Makefile
docs/tools
diff --git a/distribution/boxbackup/VERSION.txt b/distribution/boxbackup/VERSION.txt
index 129b41fa..feeac86a 100644
--- a/distribution/boxbackup/VERSION.txt
+++ b/distribution/boxbackup/VERSION.txt
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
0.11.1
+=======
+0.12
+>>>>>>> 0.12
boxbackup
diff --git a/docs/api-notes/win32_build_on_cygwin_using_mingw.txt b/docs/api-notes/win32_build_on_cygwin_using_mingw.txt
index e93af6cd..34dbac0b 100644
--- a/docs/api-notes/win32_build_on_cygwin_using_mingw.txt
+++ b/docs/api-notes/win32_build_on_cygwin_using_mingw.txt
@@ -10,26 +10,30 @@ Start by installing Cygwin on your Windows machine from [http://www.cygwin.org/c
Make sure to select the following packages during installation:
+ * Archive/unzip
* Devel/automake
* Devel/autoconf
* Devel/gcc-mingw
- * Devel/gcc-mingw-core
* Devel/gcc-mingw-g++
* Devel/make
- * Devel/mingw-runtime
- * Lib/libxml2
- * Lib/libxslt (for xsltproc)
- * Mingw/mingw-zlib
+ * Libs/libxml2
+ * Libs/libxslt (for xsltproc)
+ * Mingw/mingw-zlib-devel
* Perl/Perl
If you already have Cygwin installed, please re-run the installer and
ensure that those packages are installed.
-You may also want to install the debugger, Devel/gdb.
+You may also want to install:
+
+ * Devel/gdb (the debugger)
+ * Devel/subversion (the command-line Subversion client)
+ * Editors/vim (the Vim text editor)
== Base Directory ==
-Choose a directory where you will unpack and compile OpenSSL, Zlib and Box Backup. We will call this the ''base directory''. An example might be:
+Choose a directory where you will unpack and compile OpenSSL, Zlib and
+Box Backup. We will call this the ''base directory''. An example might be:
C:\Cygwin\Home\YourUsername
@@ -41,46 +45,84 @@ your user's home directory in /etc/passwd to match.
== OpenSSL ==
-Download OpenSSL from [http://www.openssl.org/source/openssl-1.0.0a.tar.gz]
+Download OpenSSL from [http://www.openssl.org/source/openssl-1.0.0e.tar.gz]
Open a Cygwin shell, go to the base directory, and unpack OpenSSL:
- tar xzvf openssl-1.0.0a.tar.gz
+ tar xzvf openssl-1.0.0e.tar.gz
Configure OpenSSL for MinGW compilation, and build and install it:
- cd openssl-1.0.0a
+ cd openssl-1.0.0e
./Configure --prefix=/usr/i686-pc-mingw32/ mingw
make
- make install
+ make install_sw
== PCRE ==
This step is only required to support regular expressions in including/excluding files from backups. However, this is a very useful feature.
Download PCRE from
-[http://prdownloads.sourceforge.net/pcre/pcre-8.10.tar.bz2?download]
-
-Open a Cygwin shell, go to the base directory, and unpack PCRE:
+[http://prdownloads.sourceforge.net/pcre/pcre-8.12.tar.bz2?download].
- tar xjvf pcre-8.10.tar.bz2
+Open a Cygwin shell, go to the base directory, and unpack, build and
+install PCRE:
-Configure PCRE for MinGW compilation, and build and install it:
-
- cd pcre-8.10
+ tar xjvf pcre-8.12.tar.bz2
+ cd pcre-8.12
export CFLAGS="-mno-cygwin"
export CXXFLAGS="-mno-cygwin"
- ./configure --prefix=/usr/i686-pc-mingw32
+ ./configure --prefix=/usr/i686-pc-mingw32 --disable-shared
make
make install
+Note: we must disable shared libraries on Windows because otherwise
+libpcreposix.a is built to depend on libpcre.dll, even if you define
+PCRE_STATIC, and since /usr/i686-pc-mingw32/bin (the location of the DLL)
+is not normally on the PATH, the DLL can't be found, which stops you
+from running any executables.
+
+== Readline (Optional) ==
+
+Readline enables editing and completion of commands in bbackupquery.
+It is optional, but it makes bbackupquery easier to use. However, please
+do not enable readline if you intend to distribute the resulting Box
+Backup binaries, as this would be a violation of the GPL license of
+readline.
+
+If you want Readline support, download PDCurses from
+[http://sourceforge.net/projects/pdcurses/files/pdcurses/3.4/PDCurses-3.4.tar.gz/download]. Save it in your base directory, then open a Cygwin shell there,
+unpack it, compile and install it:
+
+ tar xzvf PDCurses-3.4.tar.gz
+ cd PDCurses-3.4/win32
+ make -f gccwin32.mak CC="gcc -mno-cygwin" LINK="gcc -mno-cygwin"
+ cp pdcurses.a /usr/i686-pc-mingw32/lib/libpdcurses.a
+
+Download Readline version 6.2 from
+[ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz], and unpack
+and install it thus:
+
+ tar xzvf readline-6.2.tar.gz
+ cd readline-6.2
+ ./configure --prefix=/usr/i686-pc-mingw32 \
+ CFLAGS="-mno-cygwin" \
+ CPPFLAGS="-mno-cygwin" \
+ LDFLAGS="-mno-cygwin" \
+ LIBS="-lpdcurses" \
+ --with-curses --disable-shared
+ make
+ make install
+
== Download Box Backup ==
Go back to the base directory, and download the latest Box Backup sources:
svn co https://www.boxbackup.org/svn/box/trunk/ trunk
-Note: If you have problems during the configure or make stage, please try to eliminate one potential source of problems by running the following command to convert all line endings to Unix format:
+Note: If you have problems during the configure or make stage, please try to
+eliminate one potential source of problems by running the following command
+to convert all line endings to Unix format:
find -type f -not \( -wholename .*svn*. \) -exec dos2unix {} \;
@@ -89,14 +131,16 @@ Note: If you have problems during the configure or make stage, please try to eli
Enter the source directory and configure like this:
cd trunk
- ./infrastructure/mingw/configure.sh
+ ./infrastructure/mingw/configure.sh [--enable-gnu-readline]
make
== Installation ==
Create the destination directory, ''C:\Program Files\Box Backup\bbackupd''.
-Write a configuration file, keys and certificate on a Unix machine, and copy them into the ''Box Backup'' directory, together with the following files from the ''base directory'':
+Write a configuration file, keys and certificate on a Unix machine, and
+copy them into the ''Box Backup'' directory, together with the following
+files from the ''base directory'':
* boxbackup\release\bin\bbackupd\bbackupd.exe
* boxbackup\release\bin\bbackupquery\bbackupquery.exe
@@ -105,9 +149,13 @@ Write a configuration file, keys and certificate on a Unix machine, and copy the
* openssl\out32dll\ssleay32.dll
* zlib\zlib1.dll
-Ensure that the user running Box Backup can read from the ''Box Backup'' directory, and write to the ''bbackupd'' directory inside it.
+Ensure that the user running Box Backup can read from the ''Box Backup''
+directory, and write to the ''bbackupd'' directory inside it.
-Run Box Backup by double-clicking on it, and check that it connects to the server. If the window opens and closes immediately, it's probably due to a problem with the configuration file - check the Windows Event Viewer for details.
+Run Box Backup by double-clicking on it, and check that it connects to
+the server. If the window opens and closes immediately, it's probably
+due to a problem with the configuration file. Check the Windows Event
+Viewer for details.
See also the service installation and upgrade instructions at
[https://www.boxbackup.org/trac/wiki/CompilationOnWindows].
diff --git a/docs/xsl-generic/html/biblio-iso690.xsl b/docs/xsl-generic/html/biblio-iso690.xsl
index 366212f5..d3f43198 100644
--- a/docs/xsl-generic/html/biblio-iso690.xsl
+++ b/docs/xsl-generic/html/biblio-iso690.xsl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="windows-1250"?>
+<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in
index 59ab5d85..f3c71308 100644
--- a/infrastructure/BoxPlatform.pm.in
+++ b/infrastructure/BoxPlatform.pm.in
@@ -24,11 +24,25 @@ BEGIN
# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
# Box Backup tried on Win2000,XP only :)
$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
+<<<<<<< HEAD
$make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
$bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
$build_os ne "SunOS" && $build_os ne 'GNU/kFreeBSD');
+=======
+ $build_os = 'MINGW32' if $build_os =~ m/MINGW32/;
+
+ if ($build_os eq 'Darwin') {
+ $xcode_ver = `xcodebuild -version | awk '/^Xcode/ {print \$2}'`
+ }
+
+ $make_command = ($build_os eq 'Darwin' && $xcode_ver < 4) ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
+
+ $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
+ $build_os ne "MINGW32" && $build_os ne "SunOS"
+ && $build_os ne 'GNU/kFreeBSD' && $xcode_ver < 4);
+>>>>>>> 0.12
# blank extra flags by default
$platform_compile_line_extra = '';
@@ -82,6 +96,7 @@ BEGIN
# where to put the files
$install_into_dir = '@sbindir_expanded@';
+<<<<<<< HEAD
# if it's Darwin,
if($build_os eq 'Darwin')
{
@@ -93,6 +108,32 @@ BEGIN
$sub_make_options = ' -j '.($1 + 1);
}
+=======
+ # see how many processors there are, and set make flags accordingly
+ if($build_os eq 'Darwin' || $build_os =~ /(Free|Net|Open)BSD/)
+ {
+ $cpus = `sysctl -n hw.ncpu`;
+ }
+ elsif($build_os eq 'Linux')
+ {
+ $cpus = `grep -c ^processor /proc/cpuinfo`;
+ }
+ elsif($build_os eq 'SunOS')
+ {
+ $cpus = `psrinfo -p`;
+ }
+
+ chomp $cpus;
+ if($cpus > 1)
+ {
+ print STDERR "$cpus processors detected, will set make to perform concurrent jobs\n";
+ $sub_make_options = ' -j '.($cpus + 1);
+ }
+
+ # if it's Darwin,
+ if($build_os eq 'Darwin')
+ {
+>>>>>>> 0.12
# test for fink installation
if(-d '/sw/include' && -d '/sw/lib')
{
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
index b646a27b..287c4bff 100644
--- a/infrastructure/buildenv-testmain-template.cpp
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -29,9 +29,23 @@
#include <getopt.h>
#endif
+<<<<<<< HEAD
#include <sys/stat.h>
#include <sys/types.h>
+=======
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+
+>>>>>>> 0.12
#include <exception>
#include <string>
@@ -76,7 +90,19 @@ inline bool checkfilesleftopen() { return false; }
#define FILEDES_MAX 256
+<<<<<<< HEAD
bool filedes_open[FILEDES_MAX];
+=======
+typedef enum
+{
+ OPEN,
+ CLOSED,
+ SYSLOG
+}
+filedes_t;
+
+filedes_t filedes_open[FILEDES_MAX];
+>>>>>>> 0.12
bool check_filedes(bool report)
{
@@ -87,11 +113,59 @@ bool check_filedes(bool report)
{
if(::fcntl(d, F_GETFD) != -1)
{
+<<<<<<< HEAD
// File descriptor obviously exists
if (report && !filedes_open[d])
{
struct stat st;
if (fstat(d, &st) == 0)
+=======
+ // File descriptor obviously exists, but is it /dev/log?
+
+ struct stat st;
+ bool stat_success = false;
+ bool is_syslog_socket = false;
+
+ if(fstat(d, &st) == 0)
+ {
+ stat_success = true;
+ }
+
+ if(stat_success && (st.st_mode & S_IFSOCK))
+ {
+ char buffer[256];
+ socklen_t addrlen = sizeof(buffer);
+
+#ifdef HAVE_GETPEERNAME
+ if(getpeername(d, (sockaddr*)buffer, &addrlen) != 0)
+ {
+ BOX_WARNING("Failed to getpeername(" <<
+ d << "), cannot identify /dev/log");
+ }
+ else
+ {
+ struct sockaddr_un *sa =
+ (struct sockaddr_un *)buffer;
+ if(sa->sun_family == PF_UNIX &&
+ !strcmp(sa->sun_path, "/dev/log"))
+ {
+ is_syslog_socket = true;
+ }
+ }
+#endif // HAVE_GETPEERNAME
+ }
+
+ if(report && filedes_open[d] != OPEN)
+ {
+ if(filedes_open[d] == SYSLOG)
+ {
+ // Different libcs have different ideas
+ // about when to open and close this
+ // socket, and it's not a leak, so
+ // ignore it.
+ }
+ else if(stat_success)
+>>>>>>> 0.12
{
int m = st.st_mode;
#define flag(x) ((m & x) ? #x " " : "")
@@ -105,11 +179,16 @@ bool check_filedes(bool report)
flag(S_IFLNK) <<
flag(S_IFSOCK) <<
" or " << m << ")");
+<<<<<<< HEAD
+=======
+ allOk = false;
+>>>>>>> 0.12
}
else
{
BOX_FATAL("File descriptor " << d <<
" left open (and stat failed)");
+<<<<<<< HEAD
}
allOk = false;
@@ -118,10 +197,19 @@ bool check_filedes(bool report)
else if (!report)
{
filedes_open[d] = true;
+=======
+ allOk = false;
+ }
+ }
+ else if (!report)
+ {
+ filedes_open[d] = is_syslog_socket ? SYSLOG : OPEN;
+>>>>>>> 0.12
}
}
else
{
+<<<<<<< HEAD
if (report && filedes_open[d])
{
BOX_FATAL("File descriptor " << d <<
@@ -131,6 +219,27 @@ bool check_filedes(bool report)
else
{
filedes_open[d] = false;
+=======
+ if (report && filedes_open[d] != CLOSED)
+ {
+ if (filedes_open[d] == SYSLOG)
+ {
+ // Different libcs have different ideas
+ // about when to open and close this
+ // socket, and it's not a leak, so
+ // ignore it.
+ }
+ else if(filedes_open[d] == OPEN)
+ {
+ BOX_FATAL("File descriptor " << d <<
+ " was open, now closed");
+ allOk = false;
+ }
+ }
+ else
+ {
+ filedes_open[d] = CLOSED;
+>>>>>>> 0.12
}
}
}
@@ -183,7 +292,11 @@ int main(int argc, char * const * argv)
int ch;
+<<<<<<< HEAD
while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUV", longopts, NULL))
+=======
+ while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUVW:", longopts, NULL))
+>>>>>>> 0.12
!= -1)
{
switch(ch)
@@ -255,6 +368,20 @@ int main(int argc, char * const * argv)
}
break;
+<<<<<<< HEAD
+=======
+ case 'W':
+ {
+ logLevel = Logging::GetNamedLevel(optarg);
+ if (logLevel == Log::INVALID)
+ {
+ BOX_FATAL("Invalid logging level: " << optarg);
+ return 2;
+ }
+ }
+ break;
+
+>>>>>>> 0.12
case 't':
{
Logging::SetProgramName(optarg);
@@ -292,6 +419,10 @@ int main(int argc, char * const * argv)
}
Logging::SetGlobalLevel((Log::Level)logLevel);
+<<<<<<< HEAD
+=======
+ Logging::FilterConsole((Log::Level)logLevel);
+>>>>>>> 0.12
argc -= optind - 1;
argv += optind - 1;
@@ -369,6 +500,15 @@ int main(int argc, char * const * argv)
return returncode;
}
+<<<<<<< HEAD
+=======
+ catch(BoxException &e)
+ {
+ printf("FAILED: Exception caught: %s: %s\n", e.what(),
+ e.GetMessage().c_str());
+ return 1;
+ }
+>>>>>>> 0.12
catch(std::exception &e)
{
printf("FAILED: Exception caught: %s\n", e.what());
diff --git a/infrastructure/m4/ax_check_ssl.m4 b/infrastructure/m4/ax_check_ssl.m4
index 03362bb6..1714080c 100644
--- a/infrastructure/m4/ax_check_ssl.m4
+++ b/infrastructure/m4/ax_check_ssl.m4
@@ -27,7 +27,12 @@ AC_DEFUN([AX_CHECK_SSL], [
ax_check_ssl_found=yes
AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])
+<<<<<<< HEAD
AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])
+=======
+ AC_SEARCH_LIBS([HMAC_CTX_init], [crypto])
+ AC_SEARCH_LIBS([SSL_read], [ssl],, [ax_check_ssl_found=no])
+>>>>>>> 0.12
if test "x$ax_check_ssl_found" = "xyes"; then
AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])
diff --git a/infrastructure/m4/boxbackup_tests.m4 b/infrastructure/m4/boxbackup_tests.m4
new file mode 100644
index 00000000..9e6bc2f2
--- /dev/null
+++ b/infrastructure/m4/boxbackup_tests.m4
@@ -0,0 +1,315 @@
+dnl All Box Backup configury magic is here, to be shared with Boxi
+
+case $build_os in
+solaris*)
+ isa_bits=`isainfo -b`
+ AC_MSG_NOTICE([setting compiler to use -m$isa_bits on Solaris])
+ CFLAGS="$CFLAGS -m$isa_bits"
+ CXXFLAGS="$CXXFLAGS -m$isa_bits"
+ LDFLAGS="$LDFLAGS -m$isa_bits"
+ ;;
+esac
+
+if test "x$GXX" = "xyes"; then
+ # Use -Wall if we have gcc. This gives better warnings
+ AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef'])
+
+ # Don't check for gcc -rdynamic on Solaris as it's broken, but returns 0.
+ # On Cygwin it does nothing except cause gcc to emit a warning message.
+ case $build_os in
+ solaris*|cygwin)
+ AC_MSG_NOTICE([skipping check for -rdynamic on $build_os])
+ ;;
+ *)
+ # Check whether gcc supports -rdynamic, thanks to Steve Ellcey
+ # [http://readlist.com/lists/gcc.gnu.org/gcc/6/31502.html]
+ # This is needed to get symbols in backtraces.
+ # Note that this apparently fails on HP-UX and Solaris
+ LDFLAGS="$LDFLAGS -rdynamic"
+ AC_MSG_CHECKING([whether gcc accepts -rdynamic])
+ AC_TRY_LINK([], [return 0;],
+ [AC_MSG_RESULT([yes]); have_rdynamic=yes],
+ [AC_MSG_RESULT([no])])
+ if test x"$have_rdynamic" = x"yes" ; then
+ AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic'])
+ fi
+ ;;
+ esac
+fi
+
+AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])])
+
+case $target_os in
+mingw*)
+ TARGET_PERL=perl
+ ;;
+*)
+ TARGET_PERL=$PERL
+ ;;
+esac
+
+AC_SUBST([TARGET_PERL])
+AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$TARGET_PERL"],
+ [Location of the perl executable])
+
+AC_CHECK_TOOL([AR], [ar],
+ [AC_MSG_ERROR([[cannot find ar executable]])])
+AC_CHECK_TOOL([RANLIB], [ranlib],
+ [AC_MSG_ERROR([[cannot find ranlib executable]])])
+
+case $target_os in
+mingw*)
+ AC_CHECK_TOOL([WINDRES], [windres],
+ [AC_MSG_ERROR([[cannot find windres executable]])])
+ ;;
+esac
+
+### Checks for libraries.
+
+case $target_os in
+mingw32*)
+ AC_CHECK_LIB([crypto -lws2_32 -lgdi32], [CRYPTO_lock])
+ ;;
+winnt)
+ ;;
+*)
+ AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
+ [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
+ ;;
+esac
+
+AC_CHECK_HEADER([zlib.h],, [AC_MSG_ERROR([[cannot find zlib.h]])])
+AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
+VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
+AC_CHECK_FUNCS([rl_filename_completion_function])
+
+## Check for Berkely DB. Restrict to certain versions
+AX_PATH_BDB([1.x or 4.1], [
+ LIBS="$BDB_LIBS $LIBS"
+ LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
+
+ AX_COMPARE_VERSION([$BDB_VERSION],[ge],[4.1],,
+ [AX_COMPARE_VERSION([$BDB_VERSION],[lt],[2],,
+ [AC_MSG_ERROR([[only Berkely DB versions 1.x or at least 4.1 are currently supported]])]
+ )]
+ )
+ AX_SPLIT_VERSION([BDB_VERSION], [$BDB_VERSION])
+])
+
+# need to find libdl before trying to link openssl, apparently
+AC_SEARCH_LIBS([dlsym], ["dl"])
+AC_CHECK_FUNCS([dlsym dladdr])
+
+## Check for Open SSL, use old versions only if explicitly requested
+AC_SEARCH_LIBS([gethostbyname], [nsl socket resolv])
+AC_SEARCH_LIBS([shutdown], [nsl socket resolv])
+AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])])
+AC_ARG_ENABLE(
+ [old-ssl],
+ [AC_HELP_STRING([--enable-old-ssl],
+ [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])
+AC_SEARCH_LIBS(
+ [EVP_CipherInit_ex],
+ [crypto],, [
+ if test "x$enable_old_ssl" = "xyes"; then
+ AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])
+ else
+ AC_MSG_ERROR([[found an old (pre 0.9.7) version of SSL.
+Upgrade or read the documentation for alternatives]])
+ fi
+ ])
+
+
+### Checks for header files.
+
+case $target_os in
+mingw32*) ;;
+winnt*) ;;
+*)
+ AC_HEADER_DIRENT
+ ;;
+esac
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([dlfcn.h fcntl.h getopt.h process.h pwd.h signal.h])
+AC_CHECK_HEADERS([syslog.h time.h cxxabi.h])
+AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h])
+AC_CHECK_HEADERS([sys/file.h sys/param.h sys/socket.h sys/time.h sys/types.h])
+AC_CHECK_HEADERS([sys/uio.h sys/un.h sys/wait.h sys/xattr.h])
+AC_CHECK_HEADERS([bsd/unistd.h])
+AC_CHECK_HEADERS([sys/socket.h], [have_sys_socket_h=yes])
+AC_CHECK_HEADERS([winsock2.h], [have_winsock2_h=yes])
+AC_CHECK_HEADERS([execinfo.h], [have_execinfo_h=yes])
+
+if test "$have_execinfo_h" = "yes"; then
+ AC_SEARCH_LIBS([backtrace],[execinfo])
+fi
+
+AC_CHECK_HEADER([regex.h], [have_regex_h=yes])
+
+if test "$have_regex_h" = "yes"; then
+ AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available])
+else
+ AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes])
+fi
+
+if test "$have_pcreposix_h" = "yes"; then
+ AC_DEFINE([PCRE_STATIC], [1], [Box Backup always uses static PCRE])
+ AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp])
+fi
+
+if test "$have_pcreposix_h" = "yes"; then
+ AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available])
+fi
+
+if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then
+ have_regex_support=yes
+ AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported])
+else
+ have_regex_support=no
+fi
+
+### Checks for typedefs, structures, and compiler characteristics.
+
+AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])
+AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t])
+
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+
+AC_CHECK_MEMBERS([struct stat.st_flags])
+AC_CHECK_MEMBERS([struct stat.st_mtimespec])
+AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
+AC_CHECK_MEMBERS([struct stat.st_atimensec])
+AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ ]])
+AC_CHECK_MEMBERS([DIR.d_fd],,, [[#include <dirent.h>]])
+AC_CHECK_MEMBERS([DIR.dd_fd],,, [[#include <dirent.h>]])
+AC_CHECK_MEMBERS([struct tcp_info.tcpi_rtt],,, [[#include <netinet/tcp.h>]])
+
+AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]])
+AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]])
+AC_CHECK_DECLS([O_BINARY],,,)
+AC_CHECK_DECLS([SOL_TCP],,, [[#include <netinet/tcp.h>]])
+AC_CHECK_DECLS([TCP_INFO],,, [[#include <netinet/tcp.h>]])
+
+if test -n "$have_sys_socket_h"; then
+ AC_CHECK_DECLS([SO_SNDBUF],,, [[#include <sys/socket.h>]])
+elif test -n "$have_winsock2_h"; then
+ AC_CHECK_DECLS([SO_SNDBUF],,, [[#include <winsock2.h>]])
+else
+ # unlikely to succeed, but defined HAVE_DECL_SO_SNDBUF to 0 instead
+ # of leaving it undefined, which makes cpp #ifdefs simpler.
+ AC_CHECK_DECLS([SO_SNDBUF])
+fi
+
+# Solaris provides getpeerucred() instead of getpeereid() or SO_PEERCRED
+AC_CHECK_HEADERS([ucred.h])
+AC_CHECK_FUNCS([getpeerucred])
+
+AC_CHECK_DECLS([optreset],,, [[#include <getopt.h>]])
+AC_CHECK_DECLS([dirfd],,,
+ [[
+ #include <getopt.h>
+ #include <dirent.h>
+ ]])
+
+AC_HEADER_TIME
+AC_STRUCT_TM
+AX_CHECK_DIRENT_D_TYPE
+AC_SYS_LARGEFILE
+AX_CHECK_DEFINE_PRAGMA
+if test "x$ac_cv_c_bigendian" != "xyes"; then
+ AX_BSWAP64
+fi
+
+case $target_os in
+mingw32*) ;;
+winnt*) ;;
+*)
+ AX_RANDOM_DEVICE
+ AX_CHECK_MOUNT_POINT(,[
+ AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
+ ])
+ AC_CHECK_MEMBERS([struct dirent.d_ino],,, [[#include <dirent.h>]])
+;;
+esac
+
+AX_CHECK_MALLOC_WORKAROUND
+
+
+### Checks for library functions.
+
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_ERROR_AT_LINE
+AC_TYPE_SIGNAL
+AC_FUNC_STAT
+AC_CHECK_FUNCS([getpeereid getpeername lchown setproctitle getpid gettimeofday waitpid ftruncate])
+AC_SEARCH_LIBS([setproctitle], ["bsd"])
+
+# NetBSD implements kqueue too differently for us to get it fixed by 0.10
+# TODO: Remove this when NetBSD kqueue implementation is working
+netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
+if test "$netbsd_hack" != "netbsd"; then
+ AC_CHECK_FUNCS([kqueue])
+fi
+
+AX_FUNC_SYSCALL
+AX_CHECK_SYSCALL_LSEEK
+AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])
+AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#include <sys/xattr.h>]])
+
+
+### Miscellaneous complicated feature checks
+
+## Check for large file support active. AC_SYS_LARGEFILE has already worked
+## out how to enable it if necessary, we just use this to report to the user
+AC_CACHE_CHECK([if we have large file support enabled],
+ [box_cv_have_large_file_support],
+ [AC_TRY_RUN([
+ $ac_includes_default
+ int main()
+ {
+ return sizeof(off_t)==4;
+ }
+ ],
+ [box_cv_have_large_file_support=yes],
+ [box_cv_have_large_file_support=no],
+ [box_cv_have_large_file_support=no # safe for cross-compile]
+ )
+ ])
+
+if test "x$box_cv_have_large_file_support" = "xyes"; then
+ AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1],
+ [Define to 1 if large files are supported])
+fi
+
+## Find out how to do file locking
+AC_CHECK_FUNCS([flock fcntl])
+AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]])
+AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]])
+
+case $target_os in
+mingw32*) ;;
+winnt*) ;;
+*)
+if test "x$ac_cv_func_flock" != "xyes" && \
+ test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \
+ test "x$ac_cv_have_decl_F_SETLK" != "xyes"
+then
+ AC_MSG_ERROR([[cannot work out how to do file locking on your platform]])
+fi
+;;
+esac
+
+
diff --git a/infrastructure/m4/vl_lib_readline.m4 b/infrastructure/m4/vl_lib_readline.m4
index a0571bfa..e04a5f5f 100644
--- a/infrastructure/m4/vl_lib_readline.m4
+++ b/infrastructure/m4/vl_lib_readline.m4
@@ -79,6 +79,7 @@ AC_DEFUN([VL_LIB_READLINE], [
fi
])
+<<<<<<< HEAD
dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers)
AC_DEFUN([VL_LIB_READLINE_CHECK], [
AC_CACHE_CHECK([for $1 library],
@@ -87,6 +88,26 @@ AC_DEFUN([VL_LIB_READLINE_CHECK], [
vl_cv_lib_$1=""
for readline_lib in $2; do
for termcap_lib in "" termcap curses ncurses; do
+=======
+dnl BOX_CHECK_VAR(name, where, headers)
+AC_DEFUN([BOX_CHECK_VAR], [
+ AC_CACHE_CHECK([for $1 $2], [vl_cv_var_$1],
+ [AC_TRY_LINK([$3], [(void) $1], [vl_cv_var_$1=yes], [vl_cv_var_$1=no])
+ ])
+ if test "${vl_cv_var_$1}" = "yes"; then
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1, [Define if you have $1 $2])
+ fi
+ ])
+
+dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers)
+AC_DEFUN([VL_LIB_READLINE_CHECK], [
+ ORIG_LIBS="$LIBS"
+ AC_CACHE_CHECK([for $1 library],
+ [vl_cv_lib_$1], [
+ vl_cv_lib_$1=""
+ for readline_lib in $2; do
+ for termcap_lib in "" termcap curses ncurses pdcurses; do
+>>>>>>> 0.12
if test -z "$termcap_lib"; then
TRY_LIB="-l$readline_lib"
else
@@ -108,12 +129,44 @@ AC_DEFUN([VL_LIB_READLINE_CHECK], [
fi
])
+<<<<<<< HEAD
vl_cv_lib_readline_compat_found=no
if test "x$vl_cv_lib_$1" != "xno"; then
AC_CHECK_HEADERS([$3], [vl_cv_lib_readline_compat_found=yes])
fi
if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+=======
+ vl_cv_lib_includes=""
+
+ vl_cv_lib_readline_compat_found=no
+ if test "x$vl_cv_lib_$1" != "xno"; then
+ AC_CHECK_HEADERS([$3], [
+ vl_cv_lib_readline_compat_found=yes
+ vl_cv_lib_includes="$vl_cv_lib_headers #include <$ac_header>"
+ ])
+ fi
+
+ AC_TRY_LINK([$vl_cv_lib_includes], [(void) readline;],
+ [vl_compiles=yes], [vl_compiles=no])
+ if test "x$vl_compiles" = "xno"; then
+ AC_TRY_LINK([#include <stdio.h>
+ $vl_cv_lib_includes], [(void) readline;],
+ [vl_compiles_with_stdio=yes], [vl_compiles_with_stdio=no])
+ if test "x$vl_compiles_with_stdio" = "xyes"; then
+ vl_cv_lib_includes="#include <stdio.h>
+$vl_cv_lib_includes"
+ fi
+ fi
+
+ if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+ BOX_CHECK_VAR([rl_completion_matches], [in readline headers],
+ [$vl_cv_lib_includes])
+
+ BOX_CHECK_VAR([completion_matches], [in readline headers],
+ [$vl_cv_lib_includes])
+
+>>>>>>> 0.12
AC_DEFINE([HAVE_LIBREADLINE], 1,
[Define if you have a readline compatible library])
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in
index 33b0b635..ed963c93 100755
--- a/infrastructure/makebuildenv.pl.in
+++ b/infrastructure/makebuildenv.pl.in
@@ -261,7 +261,11 @@ for(@modules_files)
push @modules,$mod;
my @md; # module dependencies
my @lo; # link line options
+<<<<<<< HEAD
for(@deps)
+=======
+ for (@deps)
+>>>>>>> 0.12
{
if(/\A-l/)
{
@@ -277,7 +281,11 @@ for(@modules_files)
# make directories, but not if we're using an external library and this a library module
my ($s,$d) = split /\//,$mod;
+<<<<<<< HEAD
if($s ne 'lib' || $external_lib eq '')
+=======
+ if ($s ne 'lib' or $external_lib eq '')
+>>>>>>> 0.12
{
mkdir "release/$s",0755;
mkdir "release/$s/$d",0755;
@@ -346,7 +354,12 @@ for my $mod (@modules, @implicit_deps)
for(grep /\.h\Z/i, @items)
{
next if /\A\._/; # Temp Mac OS Resource hack
+<<<<<<< HEAD
die "Header file $_ already used in module ".$hfiles{$_}."\n" if exists $hfiles{$_};
+=======
+ die "Header file $_ already used in module ".$hfiles{$_}.
+ ", cannot add to $mod\n" if exists $hfiles{$_};
+>>>>>>> 0.12
$hfiles{$_} = $mod
}
}
@@ -375,11 +388,18 @@ for my $mod (@modules, @implicit_deps)
closedir DIR;
}
+<<<<<<< HEAD
+=======
+# Then write a makefile for each module
+>>>>>>> 0.12
print "done\n\nGenerating Makefiles...\n";
my %module_resources_win32;
+<<<<<<< HEAD
# Then write a makefile for each module
+=======
+>>>>>>> 0.12
for my $mod (@implicit_deps, @modules)
{
print $mod,"\n";
@@ -483,6 +503,10 @@ __E
}
my @all_deps_for_module;
+<<<<<<< HEAD
+=======
+
+>>>>>>> 0.12
{
# work out what dependencies need to be run
my @deps_raw;
@@ -566,16 +590,27 @@ WINDRES = @WINDRES@
DEFAULT_CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\
$include_paths $extra_platform_defines \\
-DBOX_VERSION="\\"$product_version\\""
+<<<<<<< HEAD
LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@
.ifdef RELEASE
CXXFLAGS = -DBOX_RELEASE_BUILD $release_flags \$(DEFAULT_CXXFLAGS)
+=======
+LDFLAGS += @LDFLAGS@ @LDADD_RDYNAMIC@
+
+.ifdef RELEASE
+CXXFLAGS += -DBOX_RELEASE_BUILD $release_flags \$(DEFAULT_CXXFLAGS)
+>>>>>>> 0.12
OUTBASE = ../../release
OUTDIR = ../../release/$mod
DEPENDMAKEFLAGS = -D RELEASE
VARIENT = RELEASE
.else
+<<<<<<< HEAD
CXXFLAGS = -g \$(DEFAULT_CXXFLAGS)
+=======
+CXXFLAGS += -g \$(DEFAULT_CXXFLAGS)
+>>>>>>> 0.12
OUTBASE = ../../debug
OUTDIR = ../../debug/$mod
DEPENDMAKEFLAGS =
@@ -620,6 +655,15 @@ _PERL = \$(if \$(V),\$(PERL), @ echo " [PERL] \$@" && \$(PERL) >/dev/n
__E
}
+<<<<<<< HEAD
+=======
+
+ # if there is a Makefile.pre, include it now
+ if(-e "$mod/Makefile.pre")
+ {
+ print MAKE ".include <Makefile.pre>\n\n";
+ }
+>>>>>>> 0.12
# read directory
opendir DIR,$mod;
@@ -740,7 +784,11 @@ __E
$has_deps = 1;
$has_deps = 0 if $target_is_library;
+<<<<<<< HEAD
# Depenency stuff
+=======
+ # Dependency stuff
+>>>>>>> 0.12
my $deps_makeinfo;
if($has_deps)
{
@@ -766,15 +814,56 @@ __E
# run make for things we require
for my $dep (@all_deps_for_module)
{
+<<<<<<< HEAD
$deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options -q \$(DEPENDMAKEFLAGS) -D NODEPS || \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
+=======
+ my $dep_target = "";
+ if ($dep =~ m|^lib/(.*)|)
+ {
+ $dep_target = "\$(OUTBASE)/$dep/$1.a";
+ }
+ elsif ($dep =~ m|^.*/(.*)|)
+ {
+ $dep_target = "\$(OUTBASE)/$dep/$1$platform_exe_ext";
+ }
+ else
+ {
+ $dep_target = "lib$dep.a";
+ }
+
+ $deps_makeinfo .= <<EOF;
+ \$(HIDE) ( \\
+ cd ../../$dep; \\
+ \$(MAKE) $sub_make_options -q \$(DEPENDMAKEFLAGS) -D NODEPS $dep_target \\
+ || \$(MAKE) $sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS $dep_target \\
+ )
+EOF
+>>>>>>> 0.12
}
$deps_makeinfo .= ".\tendif\n.endif\n\n";
}
print MAKE $deps_makeinfo if $bsd_make;
+<<<<<<< HEAD
# get the list of library things to add -- in order of dependency so things link properly
my $lib_files = join(' ',map {($_ =~ m/lib\/(.+)\Z/)?('$(OUTBASE)/'.$_.'/'.$1.'.a'):undef} (reverse(@all_deps_for_module)));
+=======
+ # get the list of library things to add -- in order of dependency
+ # so things link properly
+ my @lib_files;
+ foreach my $dep (reverse @all_deps_for_module)
+ {
+ if ($dep =~ m|^lib\/(.+)$|)
+ {
+ push @lib_files, "\$(OUTBASE)/$dep/$1.a";
+ }
+ elsif ($dep =~ m|^([^/]+)$|)
+ {
+ push @lib_files, "../../$dep/lib$1.a";
+ }
+ }
+>>>>>>> 0.12
# need to see if the extra makefile fragments require extra object files
# or include any more makefiles
@@ -793,7 +882,11 @@ __E
}
print MAKE $end_target,': ',$o_file_list;
+<<<<<<< HEAD
print MAKE " ",$lib_files unless $target_is_library;
+=======
+ print MAKE " @lib_files" unless $target_is_library;
+>>>>>>> 0.12
print MAKE "\n";
if ($target_windows)
@@ -820,6 +913,7 @@ __E
# work out library options
# need to be... least used first, in absolute order they appear in the modules.txt file
my @libops;
+<<<<<<< HEAD
sub libops_fill
{
my ($m,$r) = @_;
@@ -827,6 +921,28 @@ __E
libops_fill($_,$r) for(@{$module_dependency{$m}});
}
libops_fill($mod,\@libops);
+=======
+
+ sub libops_fill
+ {
+ my ($module, $libops_ref) = @_;
+
+ my $library_link_opts = $module_library_link_opts{$module};
+ if ($library_link_opts)
+ {
+ push @$libops_ref, @$library_link_opts;
+ }
+
+ my $deps = $module_dependency{$module};
+ foreach my $dep (@$deps)
+ {
+ libops_fill($dep, $libops_ref);
+ }
+ }
+
+ libops_fill($mod,\@libops);
+
+>>>>>>> 0.12
my $lo = '';
my %ldone;
for(@libops)
@@ -839,14 +955,24 @@ __E
# link line...
print MAKE "\t\$(_LINK) \$(LDFLAGS) $link_line_extra " .
"-o $end_target $o_file_list " .
+<<<<<<< HEAD
"$lib_files$lo $platform_lib_files\n";
}
+=======
+ "@lib_files $lo $platform_lib_files\n";
+ }
+
+>>>>>>> 0.12
# tests need to copy the test file over
if($type eq 'test')
{
print MAKE "\tcp _t \$(OUTDIR)/t\n\tchmod u+x \$(OUTDIR)/t\n";
print MAKE "\tcp _t-gdb \$(OUTDIR)/t-gdb\n\tchmod u+x \$(OUTDIR)/t-gdb\n";
}
+<<<<<<< HEAD
+=======
+
+>>>>>>> 0.12
# dependency line?
print MAKE "\n";
diff --git a/infrastructure/makeparcels.pl.in b/infrastructure/makeparcels.pl.in
index 4dc94925..f468dc1f 100755
--- a/infrastructure/makeparcels.pl.in
+++ b/infrastructure/makeparcels.pl.in
@@ -123,7 +123,11 @@ release/common/test:
.PHONY: docs
docs:
+<<<<<<< HEAD
\$(MAKE) -C docs
+=======
+ cd docs; \$(MAKE)
+>>>>>>> 0.12
__END_OF_FRAGMENT
@@ -137,6 +141,12 @@ for my $parcel (@parcels)
my $dir = BoxPlatform::parcel_dir($parcel);
my @parcel_deps;
+<<<<<<< HEAD
+=======
+ # Need to use BSD install on Solaris
+ my $install_bin = $build_os eq 'SunOS' ? '/usr/ucb/install' : 'install';
+
+>>>>>>> 0.12
unless ($target_windows)
{
open SCRIPT,">parcels/scripts/install-$parcel" or die
@@ -217,10 +227,18 @@ $dir/${name}.gz: docs/man/${name}.gz
EOF
# Releases have the docs pre-made, but users
# may want to rebuild them for some reason.
+<<<<<<< HEAD
print MAKE <<EOF;
.PHONY: docs/man/${name}.gz
docs/man/${name}.gz:
\$(MAKE) -C docs man/${name}.gz
+=======
+ my $docbook_source = "docs/docbook/${name}";
+ $docbook_source =~ s/\.[58]$/.xml/;
+ print MAKE <<EOF;
+docs/man/${name}.gz: $docbook_source docs/docbook/bb-man.xsl
+ cd docs; \$(MAKE) man/${name}.gz
+>>>>>>> 0.12
EOF
push @parcel_deps, "$dir/${name}.gz";
@@ -235,24 +253,43 @@ $dir/docs/${name}.html: docs/htmlguide/man-html/${name}.html
EOF
# Releases have the docs pre-made, but users
# may want to rebuild them for some reason.
+<<<<<<< HEAD
print MAKE <<EOF;
.PHONY: docs/htmlguide/man-html/${name}.html
docs/htmlguide/man-html/${name}.html:
\$(MAKE) -C docs htmlguide/man-html/${name}.html
+=======
+ my $docbook_source = "docs/docbook/${name}.xml";
+ print MAKE <<EOF;
+docs/htmlguide/man-html/${name}.html: $docbook_source docs/docbook/bb-nochunk-book.xsl
+ cd docs; \$(MAKE) htmlguide/man-html/${name}.html
+>>>>>>> 0.12
EOF
push @parcel_deps, "$dir/docs/${name}.html";
}
elsif ($type eq 'subdir')
{
+<<<<<<< HEAD
+=======
+ shift @args;
+ my $subdir = shift @args;
+>>>>>>> 0.12
print MAKE <<EOF;
.PHONY: $name-build $name-clean
$name-build:
+<<<<<<< HEAD
\$(MAKE) -C $name
$name-clean:
\$(MAKE) -C $name clean
+=======
+ cd $subdir; \$(MAKE) @args
+
+$name-clean:
+ cd $name; \$(MAKE) clean
+>>>>>>> 0.12
EOF
push @parcel_deps, "$name-build";
push @clean_deps, "$name-clean";
@@ -297,7 +334,11 @@ EOF
if ($type eq 'html')
{
+<<<<<<< HEAD
$dest = "share/doc/$version";
+=======
+ $dest = "share/doc/@PACKAGE_TARNAME@";
+>>>>>>> 0.12
$name = "docs/$name.html";
}
@@ -308,7 +349,11 @@ EOF
$name =~ s/$/\.gz/;
}
+<<<<<<< HEAD
if ($install and not $target_windows)
+=======
+ if ($install and not $target_windows and not $type eq "subdir")
+>>>>>>> 0.12
{
my $local_install_dir = $install_into_dir;
if (defined $dest)
@@ -325,7 +370,11 @@ EOF
}
print SCRIPT "mkdir -p " .
"\${DESTDIR}$local_install_dir/\n";
+<<<<<<< HEAD
print SCRIPT "install $name " .
+=======
+ print SCRIPT "$install_bin $name " .
+>>>>>>> 0.12
"\${DESTDIR}$local_install_dir\n";
}
}
@@ -359,22 +408,42 @@ install:
cat local/install.msg
clean: @clean_deps
+<<<<<<< HEAD
\$(MAKE) -C docs clean
+=======
+ cd docs; \$(MAKE) clean
+>>>>>>> 0.12
EOF
if ($build_os eq 'CYGWIN')
{
+<<<<<<< HEAD
print MAKE "\tfind release debug -type f | xargs -r rm -f\n";
}
else
{
print MAKE "\tfind release debug -type f -exec rm -f {} \\;\n";
+=======
+ print MAKE "\tfind release debug -type f | xargs -r rm\n";
+ print MAKE "\tfind . -name 'autogen_*' -type f | xargs -r rm\n";
+}
+else
+{
+ print MAKE "\tfind release debug -type f -exec rm -f {} \\;\n";
+ print MAKE "\tfind . -name 'autogen_*' -type f -exec rm -f {} \\;\n";
+>>>>>>> 0.12
}
for my $parcel (@parcels)
{
+<<<<<<< HEAD
print MAKE "\trm -rf ", BoxPlatform::parcel_dir($parcel), "\n";
print MAKE "\trm -f ", BoxPlatform::parcel_target($parcel), "\n";
+=======
+ # need to use -f to avoid error if they don't exist (already cleaned)
+ print MAKE "\trm -rf ", BoxPlatform::parcel_dir($parcel), "\n";
+ print MAKE "\trm -f ", BoxPlatform::parcel_target($parcel), "\n";
+>>>>>>> 0.12
}
close MAKE;
diff --git a/infrastructure/mingw/configure.sh b/infrastructure/mingw/configure.sh
index 0486b20d..5f16c558 100755
--- a/infrastructure/mingw/configure.sh
+++ b/infrastructure/mingw/configure.sh
@@ -16,12 +16,21 @@ if [ ! -r "$DEP_PATH/lib/libpcreposix.a" \
exit 2
fi
+<<<<<<< HEAD
export CXX="g++ -mno-cygwin"
export LD="g++ -mno-cygwin"
export CFLAGS="-mno-cygwin -mthreads"
export CXXFLAGS="-mno-cygwin -mthreads"
export LDFLAGS="-mno-cygwin -mthreads"
export LIBS="-lcrypto -lws2_32 -lgdi32"
+=======
+LIBZ_PATH="${DEP_PATH}/sys-root/mingw/lib"
+
+if [ ! -r "$LIBZ_PATH/libz.dll.a" ]; then
+ echo "Error: upgrade your Cygwin mingw-zlib-devel package" >&2
+ exit 2
+fi
+>>>>>>> 0.12
if [ ! -x "configure" ]; then
if ! ./bootstrap; then
@@ -30,7 +39,16 @@ if [ ! -x "configure" ]; then
fi
fi
+<<<<<<< HEAD
if ! ./configure --target=i686-pc-mingw32; then
+=======
+if ! ./configure "$@" --target=i686-pc-mingw32 \
+ CFLAGS="-mno-cygwin -mthreads" \
+ CPPFLAGS="-mno-cygwin" \
+ CXXFLAGS="-mno-cygwin -mthreads" \
+ LDFLAGS="-Wl,-Bstatic -mno-cygwin -mthreads -L${DEP_PATH}/lib -L${LIBZ_PATH}"
+then
+>>>>>>> 0.12
echo "Error: configure failed, aborting." >&2
exit 1
fi
diff --git a/infrastructure/msvc/2010/bbackupctl.vcxproj b/infrastructure/msvc/2010/bbackupctl.vcxproj
new file mode 100644
index 00000000..5751b4d8
--- /dev/null
+++ b/infrastructure/msvc/2010/bbackupctl.vcxproj
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9FD51412-E945-4457-A17A-CA3C505CF431}</ProjectGuid>
+ <RootNamespace>bbackupctl</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)bbackupctl.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\..\openssl\inc32;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\lib\common\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib;$(ProjectDir)..\..\..\Release\common.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupctl.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupctl\bbackupctl.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="libbackupclient.vcxproj">
+ <Project>{32604097-c934-4711-b1ad-206336640e70}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/bbackupd.vcxproj b/infrastructure/msvc/2010/bbackupd.vcxproj
new file mode 100644
index 00000000..a98bd852
--- /dev/null
+++ b/infrastructure/msvc/2010/bbackupd.vcxproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{22D325FB-9131-4BD6-B390-968F0491D687}</ProjectGuid>
+ <RootNamespace>bbackupd</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ENABLE_VSS;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>VssApi.lib;$(OutDir)\libbackupclient.lib;$(OutDir)\libbackupstore.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)bbackupd.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\..\openssl\inc32;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\lib\common\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib;$(ProjectDir)..\..\..\Release\common.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupd.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupd\autogen_ClientException.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientContext.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupDaemon.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\bbackupd.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\Win32BackupService.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbackupd\autogen_ClientException.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientContext.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientDeleteList.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupDaemon.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\Win32BackupService.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\Win32ServiceFunctions.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <Private>true</Private>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="qdbm.vcxproj">
+ <Project>{72af22a7-b339-4fdf-b6ae-ca6522d4bb8d}</Project>
+ <Private>true</Private>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/bbstoreaccounts.vcxproj b/infrastructure/msvc/2010/bbstoreaccounts.vcxproj
new file mode 100644
index 00000000..abaf06db
--- /dev/null
+++ b/infrastructure/msvc/2010/bbstoreaccounts.vcxproj
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C8A1509C-F91B-4140-BD51-B87FF24FB95F}</ProjectGuid>
+ <RootNamespace>bbstoreaccounts</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbstoreaccounts\bbstoreaccounts.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/bbstored.vcxproj b/infrastructure/msvc/2010/bbstored.vcxproj
new file mode 100644
index 00000000..7d09f75d
--- /dev/null
+++ b/infrastructure/msvc/2010/bbstored.vcxproj
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D8404314-73DD-4270-8205-BE677F8FDAC7}</ProjectGuid>
+ <RootNamespace>bbstored</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbstored\BackupStoreDaemon.cpp" />
+ <ClCompile Include="..\..\..\bin\bbstored\bbstored.cpp" />
+ <ClCompile Include="..\..\..\bin\bbstored\BBStoreDHousekeeping.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbstored\BackupStoreDaemon.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\bin\bbstored\bbstored-certs.in" />
+ <None Include="..\..\..\bin\bbstored\bbstored-config.in" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/boxbackup.sln b/infrastructure/msvc/2010/boxbackup.sln
new file mode 100644
index 00000000..384ff58c
--- /dev/null
+++ b/infrastructure/msvc/2010/boxbackup.sln
@@ -0,0 +1,89 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupquery", "boxquery.vcxproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcxproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+ ProjectSection(ProjectDependencies) = postProject
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D} = {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcxproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D} = {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcxproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcxproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qdbm", "qdbm.vcxproj", "{72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbstored", "bbstored.vcxproj", "{D8404314-73DD-4270-8205-BE677F8FDAC7}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbackupstore", "libbackupstore.vcxproj", "{97D89AEF-2BE4-4E34-8703-03BA67BF4494}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbstoreaccounts", "bbstoreaccounts.vcxproj", "{C8A1509C-F91B-4140-BD51-B87FF24FB95F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbackupclient", "libbackupclient.vcxproj", "{32604097-C934-4711-B1AD-206336640E70}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.Build.0 = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.ActiveCfg = Release|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.Build.0 = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.Build.0 = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.ActiveCfg = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.Build.0 = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.ActiveCfg = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.Build.0 = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.ActiveCfg = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.Build.0 = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.Build.0 = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.ActiveCfg = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.Build.0 = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.Build.0 = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.ActiveCfg = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.Build.0 = Release|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Debug|Win32.Build.0 = Debug|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Release|Win32.ActiveCfg = Release|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Release|Win32.Build.0 = Release|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Debug|Win32.Build.0 = Debug|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Release|Win32.ActiveCfg = Release|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Release|Win32.Build.0 = Release|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Debug|Win32.ActiveCfg = Debug|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Debug|Win32.Build.0 = Debug|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Release|Win32.ActiveCfg = Release|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Release|Win32.Build.0 = Release|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Debug|Win32.Build.0 = Debug|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Release|Win32.ActiveCfg = Release|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Release|Win32.Build.0 = Release|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Debug|Win32.ActiveCfg = Debug|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Debug|Win32.Build.0 = Debug|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Release|Win32.ActiveCfg = Release|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/infrastructure/msvc/2010/boxquery.vcxproj b/infrastructure/msvc/2010/boxquery.vcxproj
new file mode 100644
index 00000000..c419c4b7
--- /dev/null
+++ b/infrastructure/msvc/2010/boxquery.vcxproj
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}</ProjectGuid>
+ <RootNamespace>boxquery</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>bbackupquery</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\pcre;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)boxquery.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\lib\common\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\Release\common.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupquery.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupquery\autogen_Documentation.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\BackupQueries.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\bbackupquery.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\CommandCompletion.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbackupquery\BackupQueries.h" />
+ <ClInclude Include="..\..\..\bin\bbackupquery\BoxBackupCompareParams.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="libbackupclient.vcxproj">
+ <Project>{32604097-c934-4711-b1ad-206336640e70}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/common.vcxproj b/infrastructure/msvc/2010/common.vcxproj
new file mode 100644
index 00000000..a644891a
--- /dev/null
+++ b/infrastructure/msvc/2010/common.vcxproj
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A089CEE6-EBF0-4232-A0C0-74850A8127A6}</ProjectGuid>
+ <RootNamespace>common</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</IntDir>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PreBuildEvent />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\qdbm;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\..\pcre</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Lib />
+ <CustomBuildStep />
+ <CustomBuildStep />
+ <CustomBuildStep />
+ <Lib>
+ <AdditionalDependencies>Ws2_32.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2010\debug\pcre.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2010\debug\pcreposix.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ <PreBuildEvent>
+ <Command>perl $(ProjectDir)..\getversion.pl</Command>
+ </PreBuildEvent>
+ <PreBuildEvent>
+ <Message>Determining Version Number</Message>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\common\;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\inc32;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\..\pcre\pcre-6.7\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)common.lib</OutputFile>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\common\BufferedStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BufferedWriteStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FileModificationTime.cpp" />
+ <ClCompile Include="..\..\..\lib\common\GetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\InvisibleTempFileStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\NamedLock.cpp" />
+ <ClCompile Include="..\..\..\lib\common\RateLimitingStream.cpp" />
+ <ClCompile Include="..\..\..\lib\compress\autogen_CompressException.cpp" />
+ <ClCompile Include="..\..\..\lib\compress\CompressStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\autogen_CommonException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\autogen_ConversionException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxTime.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxTimeToText.cpp" />
+ <ClCompile Include="..\..\..\lib\common\CollectInBufferStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Configuration.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ConversionString.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugAssertFailed.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugMemLeakFinder.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugPrintf.cpp" />
+ <ClCompile Include="..\..\..\lib\common\EventWatchFilesystemObject.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ExcludeList.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FdGetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FileStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\IOStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\IOStreamGetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Logging.cpp" />
+ <ClCompile Include="..\..\..\lib\common\MemBlockStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\PartialReadStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\PathUtils.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ReadGatherStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ReadLoggingStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\StreamableMemBlock.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Timer.cpp" />
+ <ClCompile Include="..\..\..\lib\common\UnixUser.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Utils.cpp" />
+ <ClCompile Include="..\..\..\lib\common\WaitForEvent.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\autogen_CipherException.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherAES.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherBlowfish.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherContext.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherDescription.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CryptoUtils.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\MD5Digest.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\Random.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\RollingChecksum.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Message.cpp" />
+ <ClCompile Include="..\..\..\lib\server\TcpNice.cpp" />
+ <ClCompile Include="..\..\..\lib\win32\emu.cpp" />
+ <ClCompile Include="..\..\..\lib\win32\getopt_long.cpp" />
+ <ClCompile Include="..\..\..\lib\server\autogen_ConnectionException.cpp" />
+ <ClCompile Include="..\..\..\lib\server\autogen_ServerException.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Daemon.cpp" />
+ <ClCompile Include="..\..\..\lib\server\LocalProcessStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Protocol.cpp" />
+ <ClCompile Include="..\..\..\lib\server\ProtocolUncertainStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Socket.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SocketStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SocketStreamTLS.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SSLLib.cpp" />
+ <ClCompile Include="..\..\..\lib\server\TLSContext.cpp" />
+ <ClCompile Include="..\..\..\lib\server\WinNamedPipeStream.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\common\BufferedStream.h" />
+ <ClInclude Include="..\..\..\lib\common\BufferedWriteStream.h" />
+ <ClInclude Include="..\..\..\lib\common\GetLine.h" />
+ <ClInclude Include="..\..\..\lib\common\InvisibleTempFileStream.h" />
+ <ClInclude Include="..\..\..\lib\common\RateLimitingStream.h" />
+ <ClInclude Include="..\..\..\lib\compress\autogen_CompressException.h" />
+ <ClInclude Include="..\..\..\lib\compress\Compress.h" />
+ <ClInclude Include="..\..\..\lib\compress\CompressException.h" />
+ <ClInclude Include="..\..\..\lib\compress\CompressStream.h" />
+ <ClInclude Include="..\..\..\lib\common\autogen_CommonException.h" />
+ <ClInclude Include="..\..\..\lib\common\autogen_ConversionException.h" />
+ <ClInclude Include="..\..\..\lib\common\BannerText.h" />
+ <ClInclude Include="..\..\..\lib\common\BeginStructPackForWire.h" />
+ <ClInclude Include="..\..\..\lib\common\Box.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxConfig-MSVC.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxException.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxPlatform.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxPortsAndFiles.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTime.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTimeToText.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTimeToUnix.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxVersion.h" />
+ <ClInclude Include="..\..\..\lib\common\CollectInBufferStream.h" />
+ <ClInclude Include="..\..\..\lib\common\CommonException.h" />
+ <ClInclude Include="..\..\..\lib\common\Configuration.h" />
+ <ClInclude Include="..\..\..\lib\common\Conversion.h" />
+ <ClInclude Include="..\..\..\lib\common\EndStructPackForWire.h" />
+ <ClInclude Include="..\..\..\lib\common\EventWatchFilesystemObject.h" />
+ <ClInclude Include="..\..\..\lib\common\ExcludeList.h" />
+ <ClInclude Include="..\..\..\lib\common\FdGetLine.h" />
+ <ClInclude Include="..\..\..\lib\common\FileModificationTime.h" />
+ <ClInclude Include="..\..\..\lib\common\FileStream.h" />
+ <ClInclude Include="..\..\..\lib\common\Guards.h" />
+ <ClInclude Include="..\..\..\lib\common\IOStream.h" />
+ <ClInclude Include="..\..\..\lib\common\IOStreamGetLine.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CryptoUtils.h" />
+ <ClInclude Include="..\..\..\lib\server\LocalProcessStream.h" />
+ <ClInclude Include="..\..\..\lib\common\Logging.h" />
+ <ClInclude Include="..\..\..\lib\common\MainHelper.h" />
+ <ClInclude Include="..\..\..\lib\common\MemBlockStream.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFinder.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFindOff.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFindOn.h" />
+ <ClInclude Include="..\..\..\lib\common\NamedLock.h" />
+ <ClInclude Include="..\..\..\lib\common\PartialReadStream.h" />
+ <ClInclude Include="..\..\..\lib\common\PathUtils.h" />
+ <ClInclude Include="..\..\..\lib\common\ReadGatherStream.h" />
+ <ClInclude Include="..\..\..\lib\common\ReadLoggingStream.h" />
+ <ClInclude Include="..\..\..\lib\common\StreamableMemBlock.h" />
+ <ClInclude Include="..\..\..\lib\common\TemporaryDirectory.h" />
+ <ClInclude Include="..\..\..\lib\common\Test.h" />
+ <ClInclude Include="..\..\..\lib\common\Timer.h" />
+ <ClInclude Include="..\..\..\lib\common\UnixUser.h" />
+ <ClInclude Include="..\..\..\lib\common\Utils.h" />
+ <ClInclude Include="..\..\..\lib\common\WaitForEvent.h" />
+ <ClInclude Include="..\..\..\lib\crypto\autogen_CipherException.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherAES.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherBlowfish.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherContext.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherDescription.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherException.h" />
+ <ClInclude Include="..\..\..\lib\crypto\MD5Digest.h" />
+ <ClInclude Include="..\..\..\lib\crypto\Random.h" />
+ <ClInclude Include="..\..\..\lib\crypto\RollingChecksum.h" />
+ <ClInclude Include="..\..\..\lib\server\Message.h" />
+ <ClInclude Include="..\..\..\lib\server\TcpNice.h" />
+ <ClInclude Include="..\..\..\lib\win32\emu.h" />
+ <ClInclude Include="..\..\..\lib\win32\getopt.h" />
+ <ClInclude Include="..\..\..\lib\server\autogen_ConnectionException.h" />
+ <ClInclude Include="..\..\..\lib\server\autogen_ServerException.h" />
+ <ClInclude Include="..\..\..\lib\server\Daemon.h" />
+ <ClInclude Include="..\..\..\lib\server\Protocol.h" />
+ <ClInclude Include="..\..\..\lib\server\ProtocolUncertainStream.h" />
+ <ClInclude Include="..\..\..\lib\server\ProtocolWire.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerException.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerStream.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerTLS.h" />
+ <ClInclude Include="..\..\..\lib\server\Socket.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketListen.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketStream.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketStreamTLS.h" />
+ <ClInclude Include="..\..\..\lib\server\SSLLib.h" />
+ <ClInclude Include="..\..\..\lib\server\TLSContext.h" />
+ <ClInclude Include="..\..\..\lib\server\WinNamedPipeStream.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="qdbm.vcxproj">
+ <Project>{72af22a7-b339-4fdf-b6ae-ca6522d4bb8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/libbackupclient.vcxproj b/infrastructure/msvc/2010/libbackupclient.vcxproj
new file mode 100644
index 00000000..a38b3cf5
--- /dev/null
+++ b/infrastructure/msvc/2010/libbackupclient.vcxproj
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientRestore.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientCryptoKeys.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientRestore.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{32604097-C934-4711-B1AD-206336640E70}</ProjectGuid>
+ <RootNamespace>libbackupstore</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\$(Configuration)\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/libbackupstore.vcxproj b/infrastructure/msvc/2010/libbackupstore.vcxproj
new file mode 100644
index 00000000..7f83d04a
--- /dev/null
+++ b/infrastructure/msvc/2010/libbackupstore.vcxproj
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{97D89AEF-2BE4-4E34-8703-03BA67BF4494}</ProjectGuid>
+ <RootNamespace>libbackupstore</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\$(Configuration)\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\backupstore\autogen_BackupProtocol.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\autogen_BackupStoreException.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupClientFileAttributes.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupCommands.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreAccountDatabase.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreAccounts.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheck.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheck2.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheckData.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreConfigVerify.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreContext.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreDirectory.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFile.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCmbDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCmbIdx.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCombine.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCryptVar.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileEncodeStream.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFilename.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFilenameClear.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileRevDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreInfo.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreRefCountDatabase.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\HousekeepStoreAccount.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\StoreStructure.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\autogen_RaidFileException.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileController.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileRead.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileUtil.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileWrite.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\backupstore\autogen_BackupProtocol.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\autogen_BackupStoreException.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupClientFileAttributes.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupConstants.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreAccountDatabase.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreAccounts.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreCheck.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreConfigVerify.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreConstants.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreContext.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreDirectory.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreException.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFile.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileCryptVar.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileEncodeStream.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFilename.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFilenameClear.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileWire.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreInfo.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreObjectMagic.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreRefCountDatabase.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\HousekeepStoreAccount.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\RunStatusProvider.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\StoreStructure.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\autogen_RaidFileException.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileController.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileException.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileRead.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileUtil.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileWrite.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\lib\backupstore\backupprotocol.txt" />
+ <None Include="..\..\..\lib\backupstore\BackupStoreException.txt" />
+ <None Include="..\..\..\lib\backupstore\Makefile.extra" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/qdbm.vcxproj b/infrastructure/msvc/2010/qdbm.vcxproj
new file mode 100644
index 00000000..77bf8205
--- /dev/null
+++ b/infrastructure/msvc/2010/qdbm.vcxproj
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}</ProjectGuid>
+ <RootNamespace>qdbm</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <CompileAsManaged>false</CompileAsManaged>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>QDBM_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\qdbm\depot.h" />
+ <ClInclude Include="..\..\..\qdbm\myconf.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\qdbm\depot.c" />
+ <ClCompile Include="..\..\..\qdbm\myconf.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2010/win32test.vcxproj b/infrastructure/msvc/2010/win32test.vcxproj
new file mode 100644
index 00000000..0c61adb3
--- /dev/null
+++ b/infrastructure/msvc/2010/win32test.vcxproj
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{28C29E72-76A2-4D0C-B35B-12D446733D2E}</ProjectGuid>
+ <RootNamespace>win32test</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)win32test.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ShowProgress>NotSet</ShowProgress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common\;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\inc32;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib;$(ProjectDir)..\..\..\Release\common.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib;$(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)win32test.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\win32\emu.cpp" />
+ <ClCompile Include="..\..\..\test\win32\testlibwin32.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/fake-config.sub.pl b/infrastructure/msvc/fake-config.sub.pl
new file mode 100644
index 00000000..fa9b6839
--- /dev/null
+++ b/infrastructure/msvc/fake-config.sub.pl
@@ -0,0 +1,18 @@
+#!perl
+
+use strict;
+use warnings;
+use Cwd;
+
+require "infrastructure\\BoxPlatform.pm.in";
+my $wd = getcwd();
+my $dummy = $BoxPlatform::product_version;
+
+while(<>)
+{
+ s|\@build_dir@|$wd|;
+ s|\@client_parcel_dir@|$wd/Debug|;
+ s|\@box_version@|$BoxPlatform::product_version|;
+ m|[^@](@[^@]+@)| and die "Unknown variable: $1";
+ print;
+} \ No newline at end of file
diff --git a/infrastructure/msvc/getversion.pl b/infrastructure/msvc/getversion.pl
index 12554d01..42ae4b63 100644
--- a/infrastructure/msvc/getversion.pl
+++ b/infrastructure/msvc/getversion.pl
@@ -11,9 +11,32 @@ chdir $basedir or die "$basedir: $!";
require "$basedir\\infrastructure\\BoxPlatform.pm.in";
+<<<<<<< HEAD
open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"
or die "BoxVersion.h: $!";
print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
close VERSIONFILE;
+=======
+my $verfile = "$basedir/lib/common/BoxVersion.h";
+my $newver = "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+my $oldver = "";
+
+if (-r $verfile)
+{
+ open VERSIONFILE, "< $verfile" or die "$verfile: $!";
+ $oldver = <VERSIONFILE>;
+ close VERSIONFILE;
+
+}
+
+if ($newver ne $oldver)
+{
+ open VERSIONFILE, "> $verfile" or die "BoxVersion.h: $!";
+ print VERSIONFILE $newver;
+ close VERSIONFILE;
+}
+
+print $BoxPlatform::product_version;
+>>>>>>> 0.12
exit 0;
diff --git a/lib/backupclient/BackupClientRestore.cpp b/lib/backupclient/BackupClientRestore.cpp
index fa61bb59..f6b42af9 100644
--- a/lib/backupclient/BackupClientRestore.cpp
+++ b/lib/backupclient/BackupClientRestore.cpp
@@ -22,7 +22,11 @@
#include <errno.h>
#include "BackupClientRestore.h"
+<<<<<<< HEAD
#include "autogen_BackupProtocolClient.h"
+=======
+#include "autogen_BackupProtocol.h"
+>>>>>>> 0.12
#include "CommonException.h"
#include "BackupClientFileAttributes.h"
#include "IOStream.h"
@@ -443,8 +447,13 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection,
// list of files which is appropriate to the restore type
rConnection.QueryListDirectory(
DirectoryID,
+<<<<<<< HEAD
Params.RestoreDeleted?(BackupProtocolClientListDirectory::Flags_Deleted):(BackupProtocolClientListDirectory::Flags_INCLUDE_EVERYTHING),
BackupProtocolClientListDirectory::Flags_OldVersion | (Params.RestoreDeleted?(0):(BackupProtocolClientListDirectory::Flags_Deleted)),
+=======
+ Params.RestoreDeleted?(BackupProtocolListDirectory::Flags_Deleted):(BackupProtocolListDirectory::Flags_INCLUDE_EVERYTHING),
+ BackupProtocolListDirectory::Flags_OldVersion | (Params.RestoreDeleted?(0):(BackupProtocolListDirectory::Flags_Deleted)),
+>>>>>>> 0.12
true /* want attributes */);
// Retrieve the directory from the stream following
@@ -569,6 +578,11 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection,
if (Params.ContinueAfterErrors)
{
Params.ContinuedAfterError = true;
+<<<<<<< HEAD
+=======
+ // ensure that protocol remains usable
+ objectStream->Flush();
+>>>>>>> 0.12
}
else
{
@@ -839,8 +853,13 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection,
//
// --------------------------------------------------------------------------
int BackupClientRestore(BackupProtocolClient &rConnection,
+<<<<<<< HEAD
int64_t DirectoryID, const char *RemoteDirectoryName,
const char *LocalDirectoryName, bool PrintDots, bool RestoreDeleted,
+=======
+ int64_t DirectoryID, const std::string& RemoteDirectoryName,
+ const std::string& LocalDirectoryName, bool PrintDots, bool RestoreDeleted,
+>>>>>>> 0.12
bool UndeleteAfterRestoreDeleted, bool Resume,
bool ContinueAfterErrors)
{
diff --git a/lib/backupclient/BackupClientRestore.h b/lib/backupclient/BackupClientRestore.h
index 311a15bd..79765f63 100644
--- a/lib/backupclient/BackupClientRestore.h
+++ b/lib/backupclient/BackupClientRestore.h
@@ -24,6 +24,7 @@ enum
int BackupClientRestore(BackupProtocolClient &rConnection,
int64_t DirectoryID,
+<<<<<<< HEAD
const char *RemoteDirectoryName,
const char *LocalDirectoryName,
bool PrintDots = false,
@@ -31,6 +32,15 @@ int BackupClientRestore(BackupProtocolClient &rConnection,
bool UndeleteAfterRestoreDeleted = false,
bool Resume = false,
bool ContinueAfterErrors = false);
+=======
+ const std::string& RemoteDirectoryName,
+ const std::string& LocalDirectoryName,
+ bool PrintDots,
+ bool RestoreDeleted,
+ bool UndeleteAfterRestoreDeleted,
+ bool Resume,
+ bool ContinueAfterErrors);
+>>>>>>> 0.12
#endif // BACKUPSCLIENTRESTORE__H
diff --git a/lib/backupclient/BackupDaemonConfigVerify.cpp b/lib/backupclient/BackupDaemonConfigVerify.cpp
index dfef5b03..3104ae8e 100644
--- a/lib/backupclient/BackupDaemonConfigVerify.cpp
+++ b/lib/backupclient/BackupDaemonConfigVerify.cpp
@@ -114,12 +114,25 @@ static const ConfigurationVerifyKey verifyrootkeys[] =
ConfigurationVerifyKey("NotifyAlways", ConfigTest_IsBool, false),
// option to disable the suppression of duplicate notifications
+<<<<<<< HEAD
+=======
+ ConfigurationVerifyKey("MaxUploadRate", ConfigTest_IsInt),
+ // optional maximum speed of uploads in kbytes per second
+
+ ConfigurationVerifyKey("TcpNice", ConfigTest_IsBool, false),
+ // optional enable of tcp nice/background mode
+
+>>>>>>> 0.12
ConfigurationVerifyKey("CertificateFile", ConfigTest_Exists),
ConfigurationVerifyKey("PrivateKeyFile", ConfigTest_Exists),
ConfigurationVerifyKey("TrustedCAsFile", ConfigTest_Exists),
ConfigurationVerifyKey("KeysFile", ConfigTest_Exists),
ConfigurationVerifyKey("DataDirectory",
ConfigTest_Exists | ConfigTest_LastEntry),
+<<<<<<< HEAD
+=======
+
+>>>>>>> 0.12
};
const ConfigurationVerify BackupDaemonConfigVerify =
diff --git a/lib/backupstore/BackupClientFileAttributes.cpp b/lib/backupstore/BackupClientFileAttributes.cpp
new file mode 100644
index 00000000..d76432ba
--- /dev/null
+++ b/lib/backupstore/BackupClientFileAttributes.cpp
@@ -0,0 +1,1223 @@
+// --------------------------------------------------------------------------
+//
+// File
+// Name: BackupClientFileAttributes.cpp
+// Purpose: Storage of file attributes
+// Created: 2003/10/07
+//
+// --------------------------------------------------------------------------
+
+#include "Box.h"
+
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <limits.h>
+
+#include <algorithm>
+#include <cstring>
+#include <new>
+#include <vector>
+
+#ifdef HAVE_SYS_XATTR_H
+#include <cerrno>
+#include <sys/xattr.h>
+#endif
+
+#include <cstring>
+
+#include "BackupClientFileAttributes.h"
+#include "CommonException.h"
+#include "FileModificationTime.h"
+#include "BoxTimeToUnix.h"
+#include "BackupStoreException.h"
+#include "CipherContext.h"
+#include "CipherBlowfish.h"
+#include "MD5Digest.h"
+
+#include "MemLeakFindOn.h"
+
+// set packing to one byte
+#ifdef STRUCTURE_PACKING_FOR_WIRE_USE_HEADERS
+#include "BeginStructPackForWire.h"
+#else
+BEGIN_STRUCTURE_PACKING_FOR_WIRE
+#endif
+
+#define ATTRIBUTETYPE_GENERIC_UNIX 1
+
+#define ATTRIBUTE_ENCODING_BLOWFISH 2
+
+typedef struct
+{
+ int32_t AttributeType;
+ u_int32_t UID;
+ u_int32_t GID;
+ u_int64_t ModificationTime;
+ u_int64_t AttrModificationTime;
+ u_int32_t UserDefinedFlags;
+ u_int32_t FileGenerationNumber;
+ u_int16_t Mode;
+ // Symbolic link filename may follow
+ // Extended attribute (xattr) information may follow, format is:
+ // u_int32_t Size of extended attribute block (excluding this word)
+ // For each of NumberOfAttributes (sorted by AttributeName):
+ // u_int16_t AttributeNameLength
+ // char AttributeName[AttributeNameLength]
+ // u_int32_t AttributeValueLength
+ // unsigned char AttributeValue[AttributeValueLength]
+ // AttributeName is 0 terminated, AttributeValue is not (and may be binary data)
+} attr_StreamFormat;
+
+// This has wire packing so it's compatible across platforms
+// Use wider than necessary sizes, just to be careful.
+typedef struct
+{
+ int32_t uid, gid, mode;
+ #ifdef WIN32
+ int64_t fileCreationTime;
+ #endif
+} attributeHashData;
+
+// Use default packing
+#ifdef STRUCTURE_PACKING_FOR_WIRE_USE_HEADERS
+#include "EndStructPackForWire.h"
+#else
+END_STRUCTURE_PACKING_FOR_WIRE
+#endif
+
+
+#define MAX_ATTRIBUTE_HASH_SECRET_LENGTH 256
+
+// Hide private static variables from the rest of the world
+// -- don't put them as static class variables to avoid openssl/evp.h being
+// included all over the project.
+namespace
+{
+ CipherContext sBlowfishEncrypt;
+ CipherContext sBlowfishDecrypt;
+ uint8_t sAttributeHashSecret[MAX_ATTRIBUTE_HASH_SECRET_LENGTH];
+ int sAttributeHashSecretLength = 0;
+}
+
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: BackupClientFileAttributes::BackupClientFileAttributes()
+// Purpose: Default constructor
+// Created: 2003/10/07
+//
+// --------------------------------------------------------------------------
+BackupClientFileAttributes::BackupClientFileAttributes()
+ : mpClearAttributes(0)
+{
+ ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: BackupClientFileAttributes::BackupClientFileAttributes()
+// Purpose: Artifical constructor
+// Created: 2011/12/06
+//
+// --------------------------------------------------------------------------
+BackupClientFileAttributes::BackupClientFileAttributes(const EMU_STRUCT_STAT &st)
+: mpClearAttributes(0)
+{
+ ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+ StreamableMemBlock *pnewAttr = new StreamableMemBlock;
+ FillAttributes(*pnewAttr, (const char *)NULL, st, true);
+
+ // Attributes ready. Encrypt into this block
+ EncryptAttr(*pnewAttr);
+
+ // Store the new attributes
+ RemoveClear();
+ mpClearAttributes = pnewAttr;
+ pnewAttr = 0;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: BackupClientFileAttributes::BackupClientFileAttributes(const BackupClientFileAttributes &)
+// Purpose: Copy constructor
+// Created: 2003/10/07
+//
+// --------------------------------------------------------------------------
+BackupClientFileAttributes::BackupClientFileAttributes(const BackupClientFileAttributes &rToCopy)
+ : StreamableMemBlock(rToCopy), // base class does the hard work
+ mpClearAttributes(0)
+{
+}
+BackupClientFileAttributes::BackupClientFileAttributes(const StreamableMemBlock &rToCopy)
+ : StreamableMemBlock(rToCopy), // base class does the hard work
+ mpClearAttributes(0)
+{
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: BackupClientFileAttributes::~BackupClientFileAttributes()
+// Purpose: Destructor
+// Created: 2003/10/07
+//
+// --------------------------------------------------------------------------
+BackupClientFileAttributes::~BackupClientFileAttributes()
+{
+ if(mpClearAttributes)
+ {
+ delete mpClearAttributes;
+ mpClearAttributes = 0;
+ }
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: BackupClientFileAttributes &operator=(const BackupClientFileAttributes &)
+// Purpose: Assignment operator
+// Created: 2003/