Replies: 1 comment 1 reply
-
|
Unfortunately, Firebase Storage doesn't have a built-in version history / rollback feature like Firestore does, so there's no "Previous Versions" panel to restore from directly through the console.
If you're using the Firebase CLI, your Storage rules are almost certainly saved in a local file called storage.rules in your project directory (defined in firebase.json under "storage": { "rules": "storage.rules" }). If you have version control (Git) on this project, you can recover your old rules instantly: bashgit log -- storage.rules
If you don't use Git, check your code editor's local history feature (VS Code has "Timeline" / Local History under the file's right-click menu) — it often keeps snapshots of saved files even without Git.
You'll need to manually rewrite your Storage rules from scratch. If you remember your access logic (e.g. user-only uploads, admin-only deletes), I'd recommend rebuilding it carefully and testing thoroughly in the Rules Playground before deploying again. Always scope your deploys explicitly: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I mistakenly deployed using
firebase deployinstead offirebase deploy --only hostingand this overwrote my Storage security rules with the default version. There is no 'Previous Versions' in Storage as in it in Firestore Database. The 'Rules Playground' tab can't be collapsed as it in in Database. Please help! How can I revert to my previous security rules in Storage?Beta Was this translation helpful? Give feedback.
All reactions