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

Update to include streaming support for larger JSON files #29

Open
mm-gmbd opened this issue Aug 30, 2017 · 10 comments
Open

Update to include streaming support for larger JSON files #29

mm-gmbd opened this issue Aug 30, 2017 · 10 comments

Comments

@mm-gmbd
Copy link

mm-gmbd commented Aug 30, 2017

The README suggests using firebase-streaming-import for files larger than 250MB. My database that I'd like to import is well over that threshold (6GB+), and with the speed of ~30seconds/MB, that ends up being somewhere around 50+ hours (and has to be run twice). Also, firebase-streaming-import hasn't been updated in almost 3 years.

I'm sure this could be improved, and should be included as a part of this package using node streams (I'd be surprised if I was the only 250MB+ user...).

@rosslavery
Copy link

rosslavery commented Mar 9, 2018

This is sorely needed. There needs to be an officially-sanctioned backup restoration solution that's maintained. Our database just went past the 250mb threshold, and the ~30 seconds/mb speed of the streaming import tool is extremely painful. I can't imagine the pain of the OP dealing with a 6GB db size.

@mikelehen Is there any action happening inside Firebase to update these tools?

Edit: It appers the current master branch has streaming support implemented. Just needs a version published to npm and an update to the README.

@mikelehen
Copy link
Collaborator

Yeah, sorry neither of these tools is great for handling large amounts of data. If you need a full backup restore or similar, your best bet may be to reach out to Firebase Support.

That said, PRs to this project to improve its performance / usefulness are welcome.

@rosslavery
Copy link

rosslavery commented Mar 9, 2018 via email

@mikelehen
Copy link
Collaborator

Done. Sorry for the delay on that!

@philshem
Copy link
Contributor

@mm-gmbd the python firebase-streaming-import package that the readme here points to seems actually to be abandoned, including memory leaks. I'll open an issue to ask to remove it from the docs here.

I've solved my problem by splitting one BIG json into multiple smaller files, and then looping over each smaller one with bash. The challenge then is to design a json structure and import process that doesn't overwrite itself after each import step.

See my question/answer on stackoverflow, related to how to load multiple files without overwriting the previous

@yeldarby
Copy link

@mikelehen - support is still directing people to the broken firebase-streaming-import package.

What's the point of having backups if you can't restore from them?

@siege-nnn
Copy link
Contributor

Happy to look at introducing parallel / multi thread approach to tackle this. How many users this solves a problem for? (doesn't look like many face the issue or at least report this)

@yeldarby
Copy link

yeldarby commented Aug 11, 2018

Parallelism doesn’t really help. You hit artificial rate limits pretty quickly.

@siege-nnn
Copy link
Contributor

If its a problem, we can try to find a proper/working solution. Whats the alternative?

@yeldarby
Copy link

yeldarby commented Aug 13, 2018

@siege-nnn Firebase support followed up with me after I posted in their Google Group:

We know that importing over 250MB is difficult and our recommended way is indeed to do it via Support Channel. Internally we use our system backups that bypasses the front-end and doesn't have all the limits imposed to our customers.

I'll make sure that all our support playbooks are updated.

We take daily snapshots of all customer's Firebases through our backend systems, and we can restore your Database to one of these snapshots. You just need to provide a date/time, and we will restore your database's data to the most recent snapshot before this given date/time. I'll need you to fill in the following information, which will serve as written verification of the restore. This must be sent from the email address that owns the firebase instance.

Please note that the database needs to be wiped before we can do the restore. During the restore, your database will be paused and unavailable.

And they attached a form I needed to fill out for them to do the restore.

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

6 participants