Hi Firebase Users,
our project uses firestore and I want to set up a firebase function to backup data to a GCP bucket.
I set up a function that uses the firestoreAdminClient exportDocuments function, basically the same as described here
https://levelup.gitconnected.com/how-to-back-up-firestore-easily-and-automatically-eab6bf0d7e1fbut get a PERMISSION_DENIED error ("The caller does not have permission").
According to this
https://firebase.google.com/docs/firestore/manage-data/export-import#default_service_account_permissions guide, I was assuming that the service account in our project would already have the required permissions (it says "
If your Cloud Storage bucket is in the same project as your Cloud Firestore database, then the default service account has access to the bucket by default."What do I have to do to be able to backup my firestore data? I already tried explicitly giving the service account the "Storage Admin" role Do I have to set up an admin SDK private key? Or is there a better way to backup my data?
Thank you and best regards,
Florian