A set of firebase functions to backup realtime db / firestore.

Usage no npm install needed!

<script type="module">
  import firebaseBackup from '';



CircleCI npm version Known Vulnerabilities

Firebase functions to backup realtime and firestore databases. Backup files are stored in firebase storage.


  • Install in your functions directory:
    cd ./functions
    npm install firebase-backup --save
  • Register a new function in functions/index.js:
    const backup = require('firebase-backup')
    exports.backup = backup.realtimeDb()

To do

  • Support firestore
  • Support other types of functions (pubsub, ...?)
  • Option: only backup a subsection of the database (selector)
  • Option: custom path for backup file
  • Option: compress backup file