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
Sid
Sid17mo ago
Can you give me your account ID and bucket name? Can’t promise unfortunately, but I’ll see what I can do
Danny
DannyOP17mo ago
2e01a9b3adad6513d50176031863565b buckets are leaguefmbestanden leaguefmmijn & leaguefmshowfiles thanks in advance :happi:
Oscar
Oscar17mo ago
(and also the leaguefmwebsite bucket)
Danny
DannyOP17mo ago
Oh yeah some data from the leaguefmwebsite bucket The rest are completely empty
Sid
Sid17mo ago
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
Danny
DannyOP17mo ago
I'll work on a list!
Oscar
Oscar17mo ago
Thank you so much!
Oscar
Oscar17mo ago
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.
Oscar
Oscar17mo ago
@Sid | R2, are you able to work on it today?
Sid
Sid17mo ago
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.
Oscar
Oscar17mo ago
Thank you
Sid
Sid17mo ago
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.
Oscar
Oscar17mo ago
Thank you for letting us know Hi @Sid | R2, is there any progress?
Sid
Sid17mo ago
Yep, just getting a couple of reviews, I think I should be able to restore your objects today
Oscar
Oscar17mo ago
Great, lmk if anything happens
Sid
Sid17mo ago
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 😦
Oscar
Oscar17mo ago
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?
Sid
Sid17mo ago
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)
Oscar
Oscar17mo ago
Okay, thanks for all your help

Did you find this page helpful?