oddbear / mobileera-2019

Website for Mobile Era 2019 conference

Home Page:https://mobileera.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

https://mobileera.rocks

License:Other


Languages

Language:HTML 78.0%Language:JavaScript 21.2%Language:Python 0.8%Language:Dockerfile 0.0%