recovering from Hard delete

309 views
Skip to first unread message

Karolis Kleiba

unread,
Mar 10, 2016, 9:17:13 AM3/10/16
to Event Store
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?

Greg Young

unread,
Mar 10, 2016, 9:20:01 AM3/10/16
to event...@googlegroups.com
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?
> --
> You received this message because you are subscribed to the Google Groups
> "Event Store" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to event-store...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Studying for the Turing test

Karolis Kleiba

unread,
Mar 10, 2016, 9:49:43 AM3/10/16
to Event Store
It's in demo-server, but it still contains some interesting data.

Greg Young

unread,
Mar 10, 2016, 11:20:34 AM3/10/16
to event...@googlegroups.com
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?

Karolis Kleiba

unread,
Mar 16, 2016, 2:34:05 AM3/16/16
to Event Store
Could you send it now? 

Greg Young

unread,
Mar 17, 2016, 11:45:37 AM3/17/16
to event...@googlegroups.com
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

Greg Young

unread,
Mar 18, 2016, 11:11:46 AM3/18/16
to event...@googlegroups.com
If you could let us know how things go we would appreciate it.

Cheers,

Greg

Karolis Kleiba

unread,
Mar 21, 2016, 9:10:20 AM3/21/16
to Event Store
Sorry for late response..

Everything went exactly as expected. Hard delete removed!

Huge thanks!

Greg Young

unread,
Mar 21, 2016, 9:35:07 AM3/21/16
to event...@googlegroups.com
Great!

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

Alexey Zimarev

unread,
Dec 1, 2016, 6:34:33 AM12/1/16
to Event Store
Is it available now? Can't find any documentation...

Greg Young

unread,
Dec 1, 2016, 6:39:31 AM12/1/16
to event...@googlegroups.com
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.

On Thu, Dec 1, 2016 at 11:34 AM, Alexey Zimarev <azim...@gmail.com> wrote:
> Is it available now? Can't find any documentation...
>
Reply all
Reply to author
Forward
0 new messages