Hi
I'm running RavenDb.Embedded v2.0.2370 inside an Azure Web site.
All of this is working as expected except for the backup. The backup routine initiated with EmbeddableDocumentStore.DocumentDatabase.StartBackup(...) used to work perfectly until I noticed that the last successful backup dates from around the 30th of January (don't ask :-)) around 6 PM UTC0 and that the next backup initiated on the 11th of February around 8 AM UTC0 failed, as do all the other ones initiated afterwards up until now. There have been no changes or deployments since May 2013.
Further investigation points the issue into the direction of the Raven.Database.Backup.DirectoryBackup.Prepare method that makes a call to CreateHardLink inside kernel32.dll
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool CreateHardLink(string lpFileName, string lpExistingFileName, IntPtr lpSecurityAttributes);
Which then results in the Win32Exception “Cannot create a file when that file already exists” even though it used to work
I have more details in the original Stack Overflow question which I did not post in here due to formatting
So basically this seems to be an Azure specific issue with the CreateHardLink, but on the other hand it is being triggered by the RavenDb backup routine.
So the question is, why has this stopped working and more importantly what can I do to make the backups work again on my Azure Web site?
Thanks for any feedback
Christophe