Question

I'm trying to restore a backup of RavenDb.

RavenDb Version: RavenDB-Build-2380
Operating System: Win8

From Documentation. I have tried the following,

Raven.Server.exe -src [backup location] -dest [restore location] -restore

This is working in Offline mode and I got the success message, But I'm unable to view this in Raven Studio.

When I checked the restored folder, having a strange look.

Test - Database I created via Raven studio
Test2 - Database I restored via command

enter image description here

The icons looks different. When I checked the Raven Studio, the Test2 database is not shown.

Update: Forget to mention it.

Also tried de-fragmentation of the data in my restored database.

esentutl /d Data

This is really driving crazy my mind.

Please share your suggestions.

Thanks in advance.

No correct solution

OTHER TIPS

The documentation is quite clear about this. Excerpt taken from http://ravendb.net/docs/server/administration/backup-restore :

Restoring a database is an offline operation, it cannot operate on a running instance of RavenDB.

Raven.Server.exe -src [backup location] -dest [restore location] -restore

If the restore location doesn't exists, RavenDB will create it.

You cannot restore to an existing database data directory, the restore operation will fail if it detects that the restore operation will overwrite existing data. If you need to restore to an existing database data directory, shutdown the database instance and delete the data directory.

So if you have a database "Test" that you have a backup from, and you want to restore a backup for that database, then you will have to delete (or rename) the data directory of that database ("Test" in this case). RavenDb may not be running (= offline) for the restore.

Are you restoring the backup image to the same machine that created the backup image in the first place?

Please keep in mind that backups are not backward compatible.

Backward compatibility

RavenDB relies on OS services to manage data storage and backup. Those services are forward compatible (if you backup on Windows XP you can restore on Windows 7) but not backward compatible (if you backup on Windows 2008 you cannot restore on Windows 2003).

In the future, if you need to restore an image to a machine with an older OS version, use the import/export function.

If you are looking to move a database content between different Operating System versions, you should use the Import / Export function, done using Raven.Smuggler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top