Deleted objects
Hey everyone, urgent situation. One of our team members accidentally nuked 3 of our R2 buckets content. Is there any way to request a backup or something similar from Cloudflare?
20 Replies
Can you give me your account ID and bucket name? Can’t promise unfortunately, but I’ll see what I can do
2e01a9b3adad6513d50176031863565b
buckets are leaguefmbestanden leaguefmmijn & leaguefmshowfiles
thanks in advance :happi:
(and also the leaguefmwebsite bucket)
Oh yeah some data from the leaguefmwebsite bucket
The rest are completely empty
Okay I was able to stop garbage collection for your entire account, so whatever wasn't already deleted should be stopped. I can work on restoring your obejcts on Monday if you can tell me what the keys were
I'll work on a list!
Thank you so much!
I've sent you the deleted keys for each bucket. Because the files were also being renamed while (/before/after) they were being deleted, I don't know which key is the correct one (before renaming or after renaming). Because of this, I've included both key names (before and after being renamed). Each bucket corresponds with one text file.
We'd like to thank you again. Words can't describe how happy we are for your work.
@Sid | R2, are you able to work on it today?
Hey, yep I will. I'll get you a list of objects that haven't been cleaned up yet. Some may have been, in the time between them being deleted, and me stopping garbage collection.
Thank you
Hey just FYI, I'm working on some code to let us restore an object that was deleted. I don't expect it to take too long.
Thank you for letting us know
Hi @Sid | R2, is there any progress?
Yep, just getting a couple of reviews, I think I should be able to restore your objects today
Great, lmk if anything happens
Okay so I started doing some restores, and discovered that your objects are a lot more "shredded" than I initially thought (basically, we delete stuff in stages for efficiency, and things get harder to piece together after every stage)
That does mean though that unfortunately, I don't think my plan is going to work anymore, and I'm going to have to give you some bad news. Sorry for building this up 😦
That's a shame, still thank you for all your hard work. Just for clarification, there are no objects from any bucket that can be restored?
And @Sid | R2, do you have any recommendations on how to backup multiple R2 buckets for the future?
Yeah I checked all buckets. I found a lot of your objects in this second state.
The way these stages work pretty much confirms that all objects deleted around the same time move through stages together, if htat makes sense
So there's
rclone
that you can use to back up from one R2 bucket to another on a regular basis. You'd have to run it in a VM or something, but that could work.
R2's migrator is a one-off migration, but perhaps you could run it regularly (it suports R2 sources and destinations)Okay, thanks for all your help