8

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).

mm24
  • 9,280
  • 12
  • 75
  • 170

2 Answers2

6

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 /
Oscar Alonso
  • 103
  • 1
  • 8
  • 2
    You should add also a path to DB like "firebase database:get /data -o export.json" – protspace Mar 07 '18 at 13:26
  • 1
    If you're like me you probably want/need to specify project on the line: `firebase database:get --project myproject /the/path/whichmuststartwithslash -o export.json` – Jonny Apr 15 '18 at 21:50
  • 1
    This method is also blocked now. – Jk Jensen Dec 19 '18 at 22:07
  • While I am fire above command on terminal then I am getting "Error: An unexpected error has occurred.". Is anyone assist me here? – Saumil Shah Jan 10 '19 at 07:21
4

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:

Community
  • 1
  • 1
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807