0.1.0 • Published 3 years ago

firebase-replace v0.1.0

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

firebase-replace

NPM package for backup, restore, delete and replace Firebase

Installation

Install the firebase-replace CLI as a global CLI.

npm install -g firebase-replace

Get Firebase Service Account File

  1. Visit the Firebase Console
  2. Select your project
  3. Navigate to Project Settings (at the time of writing the gear icon button at the top left of the page).
  4. Navigate to Service Accounts
  5. Click Generate New Private Key

Set environment variables

# Your Firebase Project ID
export FIREBASE_PROJECT_ID=XXXX-XXXXX

# Your Firebase Service Account File Path
export GOOGLE_APPLICATION_CREDENTIALS=./XXXX-XXXXX-firebase-adminsdk-XXXXX-XXXXXXXXXX.json

Usage

# Backup Firestore, Authentication, Storage
firebase-replace backup
tree ./data
# data
# ├── auth
# │   └── users.json
# ├── firestore
# │   └── collections.json
# └── storage

# Restore Firestore, Authentication, Storage
firebase-replace restore

# Delete Firestore, Authentication, Storage
firebase-replace delete

# Delete and restore
firebase-replace replace
0.1.0

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago