Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the backup operation calling restoreDocument? #41

Open
Venryx opened this issue Jul 27, 2018 · 1 comment
Open

Why is the backup operation calling restoreDocument? #41

Venryx opened this issue Jul 27, 2018 · 1 comment

Comments

@Venryx
Copy link

Venryx commented Jul 27, 2018

I am running the backup command firestore-backup-restore --accountCredentials [...] --backupPath Backup1, yet while the backup is running, I keep seeing lines like this one:
Restoring to collection /versions/v6-prod/tasks document FcJgIhpH6JgDoXMlepQUVLPfXmT2...

Looking at the source, it seems the restoreDocument function is called from here: https://github.com/willhlaw/node-firestore-backup-restore/blob/master/index.js#L242

Why is it "restoring" a document when it's just supposed to be doing a backup?

Are these interim "restores" actually setting data on the live database? If so, I'm concerned that a future bug in the library could cause backup operations to actually mess up data on the live database, when I would want it to only read from the database.

@Saturnyn
Copy link

I noticed the same problem.
From the source, it looks like restoreDocument() will not do anything more than logging to the console if restoreAccountCredentialsPath is not set, but it is strange that the function is called at all.
Anyone has more information on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants