Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

firestore-import-export

> 编程语言
Open source

An application that can help you to backup and restore from Cloud Firestore | Firebase

397 stars0 likes1 views
WebsiteGitHub

About

An application that can help you to backup and restore from Cloud Firestore | Firebase

Firestore Import Export

A script that help to export and import in Cloud Firestore

** This repo is not maintained. Please try the backup and restore from Firestore package instead!

Requirements

You need NODE or something that can run JAVASCRIPT (JS) file.

Get serviceAccount JSON file from Project Setting > SERVICE ACCOUNTS in Firebase Console

Change the databaseURL when initializeApp with your own

Setting Up

Download or clone this repository

bash
git clone https://github.com/dalenguyen/firestore-import-export.git

Install NPM packages

bash
npm install

Export database from Firestore

This will help you create a backup of your collection and subcollection from Firestore to a JSON file name firestore-export.json

bash
node export.js  

Import database to Firestore

This will import a collection to Firestore will overwrite any documents in that collection with matching id's to those in your json. If you have date type in your JSON, please add the field to the command line. The date and geo arguments is optional.

bash
node import.js import-to-firestore.json date=date geo=Location

If you have date type in your JSON, please add to your command line

Sample from import-to-firestore.json. "test" will be the collection name. The date type will have _seconds and _nanoseconds in it.

…

Thanks to @fed239, you can use YAML files instead of JSON files in order to import to firestore.

If you have any recommendation or question, please create an issue. Thanks,

Issues· 6 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptbackup-scriptfirebasefirestoreimport-and-export

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言