recovering from Hard delete

Hard deleted event stream, then realized that I needed a soft delete instead.

System gets an exception when writing to that stream.(410 as supposed)

What’s the easiest way to recover from hard deletion of a stream on eventstore level?

Right now we don't distribute tools for undoing hard deleted streams
(they are tombstoned). It can be done and we have ways of doing it.

Is this a production db?

It’s in demo-server, but it still contains some interesting data.

2016 m. kovas 10 d., ketvirtadienis 16:20:01 UTC+2, Greg Young rašė:

OK I will send you a script that can remove tombstones. I am guessing
you are offer tomorrow? Would sending over the weekend be alright by
you?

Could you send it now?

2016 m. kovas 10 d., ketvirtadienis 18:20:34 UTC+2, Greg Young rašė:

Karolis I did one better for you and added flags to the node that can
now do this. It works in scavenge so be careful that it will only
happen for chunks that get scavenged (your last chunk doesn't get
scavenged). You can find the code (and some tests) here:
https://github.com/EventStore/EventStore/pull/853.

The basic operation would be (and I would recommend trying this on a
back up first as its brand new). Bring up node with
--unsafe-ignore-hard-deletes then scavenge. During scavenge you will
get messages about the hard deletes its removing. Once scavenge is
done. Shutdown node. Delete db/index. Restart node. Index will rebuild
and your hard deletes will be gone.

Hope this helps,

Greg

If you could let us know how things go we would appreciate it.

Cheers,

Greg

Sorry for late response…

Everything went exactly as expected. Hard delete removed!

Huge thanks!

2016 m. kovas 18 d., penktadienis 17:11:46 UTC+2, Greg Young rašė:

Great!

Functionality will be available to all in the next major release (3.6.0)

Is it available now? Can’t find any documentation…

it is, see

   --unsafe-ignore-hard-delete Disables Hard Deletes (UNSAFE:
use to remove hard deletes)
     -UnsafeIgnoreHardDelete

If you run a scavenge it will remove your hard deletes with this option.