Reputation: 113
I'm trying to create a low cost-effective automated backup process utilising pub subs.
The plan is to run the function bellow in a pubsub and store the data into a cloud storage bucket.
Does anyone know if the following function exportDocuments() would count as multiple reads/writes from my Firestore base?
const firestoreClient = google.firestore({
version: "v1beta2",
auth: authClient
});
firestoreClient.projects.databases.exportDocuments({
name: `projects/${projectId}/databases/(default)`,
requestBody: {
outputUriPrefix: `gs://${projectId}-firestore-backups/backups/${timestamp}`
}
})
Thank you,
Any suggestions would be highly appreciated.
Upvotes: 0
Views: 508
Reputation: 600061
When you're exporting data from Firestore you're charged for each document that is read as part of that export.
From the documentation on importing and exporting data:
Exporting data from Cloud Firestore will incur one read operation per document exported. However, these reads will not appear in the usage section of the console. Make sure you understand this before setting up recurring exports to avoid an unexpected bill.
Upvotes: 2