1.0.7 • Published 3 years ago

firestore-db-manager v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Firestore Database Manager

npm.io npm.io

Firestore Database Manager (firestore-db) is a CLI tool that enables generating backups, restoring backups and deleting any database created with Cloud Firestore.

Installation

Install with npm.

npm i -g firestore-db-manager

Install with yarn.

yarn global add firestore-db-manager

This will install firestore-db globally so that it may be run from the command line anywhere.

Usage

Before executing this command, you must download the Firestore database key file from your project service account configurations: https://console.firebase.google.com/u/0/project/your_database_id/settings/serviceaccounts/adminsdk

After downloading the corresponding JSON file, you can proceed to execute the command in the same path where you locally saved the project key.

firestore-db [options]

Configurations

An additional JSON file can be created to specify general configurations to the Firestore Database Manager.

This file must be located in the same path where the key file aws stored. It should also be named backup-config.json and have the following structure:

{
    "backupFile": "...",
    "keyFile": "...",
    "databaseURL": "..."
}
ParametersDescription
backupFileSource/Destination JSON backup file (defaults to backup.json)
keyFileFirestore service account JSON key file (defaults to key.json)
databaseURLProject database URL (defaults to https://<your_database_id>.firebaseio.com)

Note: All these parameters are optional and are automatically generated if some of them are missing, or when a configuration file was not found at the current path.

Available options

FlagsDescription
-i, --init-configCreate a default backup configuration file ('backup-config.json')
-g, --generate-backupGenerate a backup of a Firestore database
-r, --restore-backupRestore a backup of a Firestore database
-d, --restore-backupDelete a Firestore database
-h, --helpShow available options
-v, --restore-backupShow current version number

Note: Only one option can be specified per execution.

License

MIT License © Jorge Andrés Padilla

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago