Cannot restore database

243 views
Skip to first unread message

David Prothero

unread,
Apr 13, 2015, 1:59:30 PM4/13/15
to rav...@googlegroups.com
I'm trying to restore a database using the Raven.Server.exe command line tool. I've done it many times successfully. However, I ran it before remembering to delete the existing database and got the error "Operation failed: Database already exists, cannot restore to an existing database." which is, of course, to be expected.

I deleted the database and tried to restore again. I am now getting this error: " Another restore is still in progress (resource name = CRMP-EBB-Dev). Waited 15 seconds for other restore to complete." I continue to get this error. I have even restarted the RaveDB service and still no luck.

It seems stuck in this state. Help?

Thanks!  - David

Restore Command:
D:\RavenDB\Raven.Server.exe --restore-source=D:\Backup\CRMP-EBB-Dev --restore-database=http://localhost:8080/

Full error with stack trace:
A critical error occurred while starting the server. Please see the exception details bellow for more details:
A critical error occurred while starting the server. Please see the exception details bellow for more details:
Raven.Abstractions.Connection.ErrorResponseException: Another restore is still in progress (resource name = CRMP-EBB-Dev). Waited 15 seconds for other restore t
o complete. ---> System.InvalidOperationException: Could not parse json:
Another restore is still in progress (resource name = CRMP-EBB-Dev). Waited 15 seconds for other restore to complete. ---> Raven.Imports.Newtonsoft.Json.JsonRea
derException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.
   at Raven.Imports.Newtonsoft.Json.JsonTextReader.ParseValue()
   at Raven.Imports.Newtonsoft.Json.JsonTextReader.ReadInternal()
   at Raven.Imports.Newtonsoft.Json.JsonTextReader.Read()
   at Raven.Json.Linq.RavenJObject.Load(JsonReader reader)
   at Raven.Json.Linq.RavenJObject.Parse(String json)
   --- End of inner exception stack trace ---
   at Raven.Json.Linq.RavenJObject.Parse(String json)
   at Raven.Client.Connection.HttpJsonRequest.<CheckForErrorsAndReturnCachedResultIfAnyAsync>d__30.MoveNext()
   --- End of inner exception stack trace ---
   at Raven.Client.Connection.HttpJsonRequest.<CheckForErrorsAndReturnCachedResultIfAnyAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Raven.Client.Connection.HttpJsonRequest.<>c__DisplayClass13.<<SendRequestInternal>b__12>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Raven.Client.Connection.HttpJsonRequest.<RunWithAuthRetry>d__1d`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Connection.HttpJsonRequest.<SendRequestInternal>d__1a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Connection.HttpJsonRequest.<WriteAsync>d__5d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Connection.Async.AsyncAdminServerClient.<StartRestoreAsync>d__2a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Raven.Client.Extensions.TaskExtensions2.ResultUnwrap[T](Task`1 task)
   at Raven.Client.Connection.AdminServerClient.StartRestore(DatabaseRestoreRequest restoreRequest)
   at Raven.Server.Program.RunRemoteDatabaseRestoreOperation(String backupLocation, String restoreLocation, String restoreDatabaseName, Boolean defrag, Uri uri,
 Boolean waitForRestore, Nullable`1 timeout)
   at Raven.Server.Program.<>c__DisplayClass46.<>c__DisplayClass52.<InteractiveRun>b__22()
   at Raven.Server.Program.InteractiveRun(String[] args)
   at Raven.Server.Program.Main(String[] args)
Press any key to continue...

Oren Eini (Ayende Rahien)

unread,
Apr 13, 2015, 2:19:41 PM4/13/15
to ravendb

try restart the server

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Prothero

unread,
Apr 13, 2015, 2:48:26 PM4/13/15
to rav...@googlegroups.com
I have tried rebooting the machine but am still getting the error.

Oren Eini (Ayende Rahien)

unread,
Apr 14, 2015, 12:43:03 AM4/14/15
to ravendb
In the system database, there is a Raven/Restore/Status document, can you delete it?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 

David Prothero

unread,
Apr 24, 2015, 11:51:13 AM4/24/15
to rav...@googlegroups.com
Sorry for the delay in answering. Yes, there was a Raven/Restore/Status document. Deleting it did not resolve the problem, however. There was also a Raven/Restore/InProgress and Raven/BackupStatus/CRMP-EBB-Dev documents. I deleted those and now the error I receive is that the database already exists, even though it does not show up in Studio. There was a CRMP-EBB-Dev folder in the RavenDB\Data folder, so I stopped Raven and deleted that folder as well. That finally did the trick!



--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/Nuuajs86my4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
David
Reply all
Reply to author
Forward
0 new messages