firebase billing - kill switch consequences

Viewed 384

The firebase documentation includes a warning that if you use a kill switch to stop using firebase when a budget cap is exceeded, as follows:

Warning: This example removes Cloud Billing from your project, shutting down all resources. Resources might not shut down gracefully, and might be irretrievably deleted. There is no graceful recovery if you disable Cloud Billing. You can re-enable Cloud Billing, but there is no guarantee of service recovery and manual configuration is required.

I'm trying to investigate what gets irretrievably deleted. Does the datastore get deleted when the kill switch is activated? Is there any opportunity to save data previously stored in cloud firestore, before the deletion takes place? Is there a way to download the database so that I can keep a back up in this scenario?

2 Answers

Please review the following reply from Firebase Team member(samstern) to gain more clarity on this:

these things are handled on a per-product basis and each product has different thresholds for quota overages and different procedures for what happens to inactive resources in a bad state.

For instance I know in Realtime Database if your DB is too big for the free plan after you downgrade from a paid plan we will not delete your data automatically. Instead you'll just be stopped from using the database until you restore your billing.

However that statement clearly says that some products may delete data if you pull Cloud Billing. It could be for technical reasons, it could be for policy reasons.

If you want to turn off a product without risking this pulling your billing account is NOT the best way to do this. It's the nuclear option if you get into a bad situation and want to get out at all costs. Instead you should use per-product APIs to shut down the individual product or service and prevent future usage. This could include doing things like flipping off APIs in the APIs console, changing security rules to prevent all further writes, deleting Cloud Functions, etc

The best source of information I've been able to uncover in answer to this particular question is a discussion on reddit which indicates that you can't recover access to your data, until you pay the bill (including blow out charges) - so maybe that buys some time, but if you don't pay, the project gets deleted. There may also be lost data for things happening at the time the kill switch activates.

Related