At the moment Firestore admin panel doesn't allow to export/import data from their DB. These scripts allow you to load data on your machine, edit and bring it back. See examples to learn how it works.
- Go to Project settings / Service accounts / Firebase admin SDK
- Select Node.js and click “Generate new private key“
- Download file
- Rename file to “serviceAccount.json” and put this file to project root
npm run firestore:copy sourcePath fileToSave.json
Save a collection
npm run firestore:copy config/scheme/pages pages-scheme.json
Save a document
npm run firestore:copy config/backup backup.json
npm run firestore:copy fileToLoad.json destinationPath
Load to collection
npm run firestore:copy pages-scheme.json config/scheme/pages
Load a document
npm run firestore:copy backup.json config/backup
npm run firestore:copy sourcePath destinationPath
Copy a collection
npm run firestore:copy pages config/scheme/pages
Copy a document
npm run firestore:copy pages/about postponed/draft/pages/about