RavenDB备份失败

时间:2011-12-08 10:45:35

标签: ravendb

我尝试为RavenDB做备份。特别为此我有控制台应用程序

var req = WebRequest.Create("http://localhost:8081" + "/admin/backup");
req.Method = "POST";
req.UseDefaultCredentials = true;
req.PreAuthenticate = true;
req.Credentials = CredentialCache.DefaultCredentials;
string postData = "{ 'BackupLocation': 'H:\\\\projects\\\\backup\\\\test' }";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
req.ContentLength = byteArray.Length;

Stream dataStream = req.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();

WebResponse response = req.GetResponse();
response.Close();

但RavenDB在没有任何内容的情况下创建了几个空文件夹(在指定位置)。

怎么了?

修改

日志

2011-12-12 10:42:24.2343;Raven.Storage.Esent.Backup.BackupOperation;Error;Failed to complete backup;"System.IO.FileNotFoundException: Could not find file 'H:\projects\Servers\RavenDB\Data\Tempb35260cb5e394474acbb4c0d8cd3876b\Auto%2fPlaces%2fByPlaceCode.index'.
File name: 'H:\projects\Servers\RavenDB\Data\Tempb35260cb5e394474acbb4c0d8cd3876b\Auto%2fPlaces%2fByPlaceCode.index'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileInfo.get_Length()
   at Raven.Database.Backup.DirectoryBackup.Prepare()
   at Raven.Storage.Esent.Backup.BackupOperation.Execute(Object ignored)"
2011-12-12 10:42:24.2343;Raven.Storage.Esent.Backup.BackupOperation;Info;Failed to complete backup because: Could not find file 'H:\projects\Servers\RavenDB\Data\Tempb35260cb5e394474acbb4c0d8cd3876b\Auto%2fPlaces%2fByPlaceCode.index'.;
2011-12-12 10:42:24.2343;Raven.Storage.Esent.StorageActions.DocumentStorageActions;Debug;Document with key 'Raven/Backup/Status' was found;
2011-12-12 10:42:24.2343;Raven.Database.DocumentDatabase;Debug;Putting a document with key: Raven/Backup/Status and etag ;
2011-12-12 10:42:24.2343;Raven.Storage.Esent.StorageActions.DocumentStorageActions;Debug;Inserted a new document with key 'Raven/Backup/Status', update: True, ;
2011-12-12 10:42:24.2500;Raven.Storage.Esent.Backup.BackupOperation;Info;Backup completed;
2011-12-12 10:42:24.2500;Raven.Storage.Esent.StorageActions.DocumentStorageActions;Debug;Document with key 'Raven/Backup/Status' was found;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Auto/Places/ByPlaceCode;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.Index.Indexing;Debug;Indexed 0 documents for Auto/Places/ByPlaceCode;
2011-12-12 10:42:24.2500;Raven.Database.DocumentDatabase;Debug;Putting a document with key: Raven/Backup/Status and etag ;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Raven/DocumentCollections;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Raven/DocumentsByEntityName;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.Index.Indexing;Debug;Indexed 0 documents for Raven/DocumentsByEntityName;
2011-12-12 10:42:24.2500;Raven.Database.Indexing.Index.Indexing;Debug;Mapped 0 documents for Raven/DocumentCollections;
2011-12-12 10:42:24.2500;Raven.Storage.Esent.StorageActions.DocumentStorageActions;Debug;Inserted a new document with key 'Raven/Backup/Status', update: True, ;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Auto/Places/ByPlaceCode;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.Index.Indexing;Debug;Indexed 0 documents for Auto/Places/ByPlaceCode;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Raven/DocumentCollections;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.Index.Indexing;Debug;Mapped 0 documents for Raven/DocumentCollections;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.AbstractIndexingExecuter;Debug;Indexing 1 documents for index: Raven/DocumentsByEntityName;
2011-12-12 10:42:24.2656;Raven.Database.Indexing.Index.Indexing;Debug;Indexed 0 documents for Raven/DocumentsByEntityName;

0 个答案:

没有答案