A Google Firebase Firestore backup tool.
Install using npm.
npm install -g firestore-backup
or yarn
yarn global add firestore-backup
Alternatively download the source.
git clone https://github.com/steadyequipment/node-firestore-backup.git
- 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 firestore-backup to authenticate.
-a
,--accountCredentials
<path>
- Google Cloud account credentials JSON file.-B
,--backupPath
<path>
- Path to store the backup.
Example:
firestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase
-P
,--prettyPrint
- JSON backups done with pretty-printing.
Example:
firestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --prettyPrint
That's it! ✨🌈
Feel free to report bugs and make feature requests in the Issue Tracker, fork and create pull requests!