Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase error: Data requested exceeds the maximum size that can be accessed with a single request

I need to export my Firabase database as JSON via the Firebase console, however when I do so I get the following message in the JSON file:

Data requested exceeds the maximum size that can be accessed with a single request

How can I fix this?


Additional details:

This is the function I use in the console:

enter image description here


EDIT:

I found this question that tried to access "too big" data from a Firebase client. I presume the two are related (Firebase limit). However I would have expected the Firebase console UI to provide that error message when exporting and ask the user whether or not to split the export in multiple files. I believe that this is a UX bug in the JSON Export functionality of the Firebase console (should be greyed out if not possible to export or should allow the user to tune the file size).

like image 249
mm24 Avatar asked Aug 08 '16 09:08

mm24


2 Answers

install Firebase CLI,then open a terminal and write down this command in order to download the whole data base

firebase database:get -o OUTPUT_FILE_NAME.json /
like image 177
Oscar Alonso Avatar answered Sep 20 '22 23:09

Oscar Alonso


The Firebase Console has limits on the size of data it allows to export. The export link should indeed be disabled when you're displaying a location that is too big to export through the console.

If your database is under 256MB, you can export it with a CURL request:

curl "https://yours.firebaseio.com//.json?print=pretty&auth=CREDENTIAL"

See the documentation on the REST API.

If that also doesn't work, you'll have to download the data in chunks. A tool that might be helpful with that is: https://github.com/alexklibisz/firebak

See also:

  • Is it possible to backup Firebase DB?
  • Loading Bulk data in Firebase
  • How to migrate data & settings from one firebase to another?
like image 43
Frank van Puffelen Avatar answered Sep 20 '22 23:09

Frank van Puffelen