Home > database >  How to see which owner/contributor has deleted the Firestore data?
How to see which owner/contributor has deleted the Firestore data?

Time:11-05

We are a team of developers working on an app for one and a half years, with the backend using Firebase and Firestore as cloud database. We have several owners and contributors to this project. Now our Firestore data and user authentication data have been deleted and we've lost almost everything. Is there a way to see which owner/contributor has deleted our data? And most importantly is there a way to retrieve this deleted data? Thanks in advance.

Note: We are on the Blaze (paid) plan of Firebase.

CodePudding user response:

You can enable audit logs for Firestore to log all operations on the database to Cloud Logging and Cloud Monitoring. That way you can see exactly what happened. You have to opt-in to this though, so this will only help you see who did what after you enable it.

CodePudding user response:

Currently there is no way to find out which collaborator on the project or which Authentication user deleted the data from Firestore.

If the data got deleted accidentally from your database,as Renaud Tarnec mentioned above in comment, you can reach out to Firebase support and ask for the data to be restored.

You can also check out Announcing Automated Daily Backups for the Firebase Database.

  • Related