There were some issues causing the backups to only work on the prod project, but not dev.
One, the buckets for the backups were not created, so I created acs-upb-mobile-dev-firestore-backups and acs-upb-mobile-dev-storage-backups and gave "Storage Administrator" permissions and the "Cloud Datastore Import Export Admin" role to the default service accounts that each function uses (acs-upb-mobile-dev@appspot.gserviceaccount.com, firebase-adminsdk-mgl5c@acs-upb-mobile-dev.iam.gserviceaccount.com) as per the docs here.
Second, the (prod) project ID was hardcoded in the storage script, so now it's read from environment variables instead.
There were some issues causing the backups to only work on the prod project, but not dev.
One, the buckets for the backups were not created, so I created
acs-upb-mobile-dev-firestore-backups
andacs-upb-mobile-dev-storage-backups
and gave "Storage Administrator" permissions and the "Cloud Datastore Import Export Admin" role to the default service accounts that each function uses (acs-upb-mobile-dev@appspot.gserviceaccount.com, firebase-adminsdk-mgl5c@acs-upb-mobile-dev.iam.gserviceaccount.com) as per the docs here.Second, the (prod) project ID was hardcoded in the storage script, so now it's read from environment variables instead.
I also added some relevant documentation.