Skip to content

mobileera/mobileera-2019

Repository files navigation

Export/import data

Retrieving Google Cloud Account Credentials

  • Visit the Firebase Console
  • Select your project
  • Navigate to Project Settings (at the time of writing the gear icon button at the top left of the page).
  • Navigate to Service Accounts
  • Click Generate New Private Key
  • This downloaded json file contains the proper credentials needed for node-firestore-import-export to authenticate. Rename to ./serviceAccount.json
  • Create ./backups folder
  • You can safely store backups folder and serviceAccount.json file locally - they are in .gitignore

https://www.npmjs.com/package/node-firestore-import-export

npm install node-firestore-import-export

Export data

IMPORTANT! Always do a fresh export before editing/importing data, someone else could do some changes, so you might destroy these.

npx firestore-export --accountCredentials ./serviceAccount.json --backupFile ./backups/firestore.json

Import data

IMPORTANT! All existing data with IDs will be overwritten. Non-existing in import file IDs will NOT be removed from database.

npx firestore-import --accountCredentials ./serviceAccount.json --backupFile ./backups/firestore.json

About

Website for Mobile Era 2019 conference

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages