Firebase Database Rules Lost on Deployment

44 views
Skip to first unread message

Ananthu V A

unread,
Mar 1, 2018, 9:58:18 AM3/1/18
to Firebase Google Group
Is there any way to restore the Database Rules from the previous day(s)? I have lost my Rules on a Deployment and unfortunately there was no backup of the Rules. It seems there is a rollback option in Deployment History under Hosting menu. Will that revert my file to previous deployment(second last deployment which doesn't contain the modified rules which are added maually) or previous status just before the latest deployment?

Alex Memering

unread,
Mar 1, 2018, 1:03:18 PM3/1/18
to fireba...@googlegroups.com
Unfortunately the rollback button in the Hosting console page doesn't have anything to do with Rules, it will only rollback your Hosting content.  When your rules get complicated enough I generally recommend that you check them in to whatever source control that you're using and deploy them via the CLI instead of editing them in the console (which you already be doing, I wanted to include this in case others stumble upon this thread).

Are you using the Realtime Database or Firestore?  

On Thu, Mar 1, 2018 at 6:58 AM Ananthu V A <ana...@confianzit.biz> wrote:
Is there any way to restore the Database Rules from the previous day(s)? I have lost my Rules on a Deployment and unfortunately there was no backup of the Rules. It seems there is a rollback option in Deployment History under Hosting menu. Will that revert my file to previous deployment(second last deployment which doesn't contain the modified rules which are added maually) or previous status just before the latest deployment?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/b3983e0e-cc73-43a9-b4e4-12baf77085d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Alex Memering | Software Engineer | meme...@google.com

Ananthu V A

unread,
Mar 3, 2018, 12:51:04 AM3/3/18
to Firebase Google Group
Thanks for the reply Alex.
I have fixed restoring the rules with the support of firebase team using this link: https://firebase.google.com/support/contact/troubleshooting/
The team asked me to fill up a form and email them and by that way they have sent me a json file with all my database plus rules data. I will make sure it will get added to the version control and deploy using CLI instead of manual editing console as you said.
Reply all
Reply to author
Forward
0 new messages