I read the Backup and Restore document on the RavenDB website and tried it in my code.
In the doc document we have:
Initiate backup
When working in native mode, all you need is a call to the DocumentDatabase.StartBackup () method.
The above line of code just does not compile with an error:
An object reference is required for the non-static field, method, or property 'Raven.Database.DocumentDatabase.StartBackup(string, bool)'
So, I tried this just to check:
new DocumentDatabase(_documentStore.Configuration). StartBackup(@"~\App_Data\Backup", true);
The code compiles, but when the application starts, I get this error:
Could not open transactional storage: C:\Project\trunk\MyApp\App_Data\Database\Data
Can someone please share some working code on how to make a full backup of the built-in document storage on the Internet? Is this even possible without using the RavenDB server?
Is my only option doing a manual backup of the database folder?
source share