When restoring from a backup I get the following error:
Sounds like a corrupt or partial back up.
CommitCheckpoint is greater than WriterCheckpoint.
Basically its saying that your index (e.g. where its written) is later
than where you are currently appending to. What is your back up
process?
Greg
My backup process is (removed all noise):
$chkFiles = Join-Path ($dataFolder.Path) “*.chk”
$allFiles = Join-Path ($dataFolder.Path) “*”
xcopy $chkFiles $tmpFolderName\ /e
xcopy $allFiles $tmpFolderName\ /exclude:excludelist.txt /e // excludelist.txt contains .chk to exclude previously copied files.
$truncateFileName = “$tmpFolderName\truncate.chk”
$chaserFileName = “$tmpFolderName\chaser.chk”
copy-item $chaserFileName $truncateFileName -force
remove-item $chaserFileName -force
After that I do a zip of the file the tmpFolder where the copied data is. I think this follows the instructions here: https://github.com/EventStore/EventStore/wiki/Database-Backup
if you look in the .chk files whats in them? (They are binary but just
a long in a file)
And are you copying the index directory as well? It seems to be
complaining that files it expects to exist are not there
The index folder is there as well. I’ll give you the content of .chk soon.
EG see
EventStore.Core.Exceptions.CorruptIndexException: Corrupted index.
---> EventStore.Core.Exceptions.PTableNotFoundException: PTable
e:\eventstore\data\index\5005b400-4a02-4ef1-8997-7f464670780c not
found.
This is from the index (its not finding files that should be there)
If I restore from the same backup I do get the same error, and the index folder is there. Could it be because the backup was taken during scavenge?
No scavenge has nothing to do with it (scavenge creates new files it
does not change existing ones).
I am thinking about a few scenarios this could happen with index (in
particular an index rebuild happening in the middle).
To be clear you just got the message and then things worked is that correct?
Cheers,
Greg