Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

sync like feature? #26

Open
Prathik-Jain opened this issue Oct 6, 2019 · 3 comments
Open

sync like feature? #26

Prathik-Jain opened this issue Oct 6, 2019 · 3 comments
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed

Comments

@Prathik-Jain
Copy link

Is it possible to add a feature where I run firestore-import-export as a cronjob, So that it reads only what is changed since the last update and update the file with the same documents? Instead of reading the thousands of documents each time I run it.

@dalenguyen dalenguyen added enhancement New feature or request Hacktoberfest help wanted Extra attention is needed labels Oct 8, 2019
@dimoreira
Copy link

@Prathik-Jain I think the best solution for this is to run your firestore-import-export as a Firebase Cloud Function to listen for changes in the collections and export a new file with changes (or update an already created file).

@Prathik-Jain
Copy link
Author

@dimoreira It might be a solution for smaller data stores, which do not update frequently. It might get pretty expensive quickly, otherwise.

@dimoreira
Copy link

@Prathik-Jain The free-tier for the Firebase Cloud Functions is pretty big. If you listen for insertions / changes at each document that get added / updated, you can update some kind of batch file on Cloud Storage that can be read from time to time by a cron **cloud function** to generate the new file based on the saved / batched.

Makes sense?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants