Can someone please advise how to setup a backup for Files in Firebase storage. I am able to make a backup of Database but not sure how to setup a regular backup for files (I have images) in firebase storage.
There is no built-in method via Firebase. However, since Firebase uses Google Cloud Storage behind the scenes for Firebase Storage it's possible to use the gutils Tool.
python -V
gcloud init
. This will ask you to select your project and authenticate you. Since Firebase uses Google Cloud Platform behind the scenes your Firebase project should be available as a choice.cloud init
with. In the list of available permissions you need to select Firebase Rules System
from the Other
category.gs://<bucket_name>
gsutil -m cp -R gs://<bucket_name> .
-m
enables multithreading for faster downloads if you have many files.cp
is the copy command-R
is recursive. If enabled it will download all files and folders in the specified tree.This can be used to also make a copy(backup) to another Google Cloud Storage Bucket or AWS etc.
Use Google Cloud Transfer Service.
If you follow the wizard in the link it will guide you through pretty easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With