1

I use Firebase. If you want to backup a Firebase bucket, they recommend doing this: https://firebase.google.com/docs/firestore/manage-data/export-import

What is the problem? You are backing up a bucket inside other bucket. I want to backup my bucket in an external device. I just want to download all my bucket content (or a folder inside that bucket) as a zip file, and save it in my awesome pendrive.

Is there a way to do it? I could not find a way to: 1. Download a bucket as a file in my computer 2. Or, download a folder that is inside a bucket.

How I'm currently doing the backup? Running this in the Google Cloud console

gcloud beta firestore export gs://my-product-name-backup/12-31-2018 --collection-ids=users,problems,seeds,feeback

So, my bucket is called my-product-name-backup. I'm OK with downloading the whole bucket, or just a folder (for example: my-product-name-backup/03-03-2019)

1 Answer 1

2

You seem to be confused a bit about how Firestore stores data and what Google is suggesting you do.

What is the problem? You are backing up a bucket inside other bucket.

This is not correct. Firestore stores its data inside some sort of mostly opaque database format. If you are copying this out to a GCS bucket, that really is an export into a different storage medium and a different format.

That being said, it's still reasonable that you might want to keep your data backups outside of Google (although GCS has a good SLA). To do that, after you've exported your Firestore data to a GCS bucket, use the gsutil utility to copy that bucket down:

gsutil cp -r gs://your-bucket-name .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.