I am trying out the new export feature of the FireStore as shown on this link, and I keep getting error message:
gcloud alpha firestore export gs://backup --async
ERROR: (gcloud.alpha.firestore.export) PERMISSION_DENIED: Service account does not have access to Google Cloud Storage file: /backup. See https://cloud.google.com/datastore/docs/export-import-entities#permissions for a list of permissions needed. Error details: [email protected] does not have storage.buckets.get access to backup.
I've run the command to add my service account as a storage.admin, and that command succeed:
gcloud projects add-iam-policy-binding projectABC --member='serviceAccount: [email protected]' --role='roles/storage.admin'
Could someone help?
The export directory can be specified with this flag: firebase emulators:start --export-on-exit=./saved-data . If --import is used, the export path defaults to the same; for example: firebase emulators:start --import=./data-path --export-on-exit .
Use the gcloud datastore export command to export all entities in your database. where bucket-name is the name of your Cloud Storage bucket and an optional prefix, for example, bucket-name /datastore-exports/export-name . You cannot re-use the same prefix for another export operation.
You can't select an arbitrary bucket name for your backup. You're using "gs://backup". Instead, you need to use the url for an actual bucket that you've created an you fully control.
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