Firebase Database import

6. How to import data from Cloud File to Firestore?

  • 6.1. Generate a private key file for your service account. In the Firebase console, open Settings > Service Accounts.
  • 6.2. Click Generate New Private Key, then confirm by clicking Generate Key.
  • 6.3. Rename the JSON file to credentials.json.
  • 6.4. Go to the “database” folder in the given source code.
  • 6.5. Past credentials.json in database folder and replace with our existing credentials.json file.

6.6. You could also use this to import data to Firestore using below command:

npx -p node-firestore-import-export firestore-import -a credentials.json -b backup.json