Back up a collection or a database
- In the sidebar, right-click a collection and choose Back up collection…. To back up every collection in a database, right-click the database (or the project, for its default database) and choose Back up every collection….
- A save dialog opens first. Choose the folder; the file name is suggested for you, for example
my-project_default_orders_backup_2026-10-01-09-30.json.gz(project, database, collection, then the date and time in UTC). The file is compressed (gzip), usually to a fraction of the size; end the name with.jsoninstead to save it uncompressed. - The backup runs in the background, in Tasks, with the number of documents and the file's size so far; you can keep working meanwhile. Pause, Resume and Cancel are there; Cancel leaves no file.
- When it's done, choose Show in folder in the message to find the file.
Documents are written to the file as they're read, so a backup is limited by your disk, not by memory, and the window stays free however large the database is. Each top-level collection is read with one query for everything under it, a thousand documents a page and three collections at a time, so even large databases back up quickly.
If it stops (the network drops, the computer sleeps, Firetool closes), Resume in Tasks carries on from the last page written, with nothing doubled; when Firetool opens again it offers to resume. The computer is kept awake while a backup runs.
One moment in time. Every read is pinned to the minute the backup started, so the file is one consistent picture of the database even while people keep changing it. Firestore keeps earlier versions for an hour (or seven days with point-in-time recovery turned on): if a backup runs longer than that, it carries on with the current data and the file says it isn't one moment.
The backup is also recorded in the audit log, with the number of documents and where the file went. Because a backup is a kind of export, it follows your policy's export switch: if exports are turned off for a project, its backups are too. The file is in the same format as before: earlier versions of Firetool restore it too.
Very large databases: Google's managed export
For a database too big to download, right-click it and choose Back up with Google…. Google copies the database to a Cloud Storage folder you choose, on Google's side: nothing is downloaded, it's one moment in time, and Tasks follows it with Firestore's own counts. Restore a Google export… puts such a copy back into a database (production asks for the project ID, like other bulk writes). Your Google account needs the role that allows Firestore exports and imports, and the Cloud Storage bucket must be in a suitable location. These aren't available on the emulator. Google bills a managed export as document reads and the Storage it uses.
Add users, rules and indexes to a database backup
When you choose Back up every collection…, Firetool asks what to add to the documents, so one file can rebuild a complete copy, such as a staging project:
- Authentication users, optionally with password hashes, so passwords keep working after a restore.
- Security rules: the Firestore rules for this database and the Storage rules for the default bucket.
- Composite indexes.
- Firetool settings for it: saved queries, expected schemas, and where to look for user data.
A part the account can't read is noted in the file and skipped; the rest is backed up. Storage files aren't included.
A backup with password hashes is as sensitive as the passwords: anyone with the file could try to crack them. Keep it somewhere safe, and leave that box unticked if you don't need it.
What's in the file
A backup is one plain JSON file:
{
"format": "firetool-backup",
"version": 1,
"project": "my-project",
"database": "(default)",
"root": "orders",
"createdAt": "2026-10-01T09:30:12.345Z",
"count": 2,
"documents": [
{ "path": "orders/A1", "fields": { "total": { "integerValue": "5400" } } },
{ "path": "orders/A1/items/1", "fields": { "sku": { "stringValue": "K-7" } } }
]
}
- root is the collection you backed up, or empty for a whole-database backup.
- count is the number of documents.
- Each document has its full path and its fields exactly as Firestore stores them, so every type comes back unchanged: 64-bit integers, timestamps to the microsecond, NaN, bytes, references, geopoints, maps and arrays.
- Subcollections are included at any depth, each document with its own path. That includes subcollections under a parent document that doesn't exist itself (the ones the Firebase console shows in italics). The empty parent isn't saved, as there's nothing in it.
A backup with users, rules, indexes or settings has "version": 2 and keeps them beside the documents. A backup of one collection, or of documents only, is the same version 1 file as before. Backups made by earlier versions, when the app was called Firestore Studio, still restore.
What isn't in a backup
A backup doesn't contain:
- Authentication users, security rules, composite indexes and Firetool settings, unless you added them to a database backup (above).
- Cloud Storage files.
- When each document was created or last changed. Restored documents get a new update time.
Restore a backup
- Right-click the database you want to restore into (or its project) and choose Restore a backup…. This can be the database you backed up, or another database or project. You can also open a collection and choose Actions ▾ → Import… with a backup file: Firetool recognises it and opens the same restore dialog for that tab's database.
- Choose the backup file. The dialog shows how many documents it holds, where they came from, which collection, and when it was made.
- Under If a document already exists, choose Replace it with the backed-up version or Keep it, skip that document.
- Choose Restore. With Replace, Firetool asks you to confirm first, because the current versions can't be put back afterwards unless your policy keeps copies of every change. If you might need them, cancel and back up the target first.
Documents go back to the same paths they had, with their subcollections. You choose the project and database; the paths inside come from the file. If the target is another project or database, references that pointed into the backed-up database are pointed at the same paths in the target.
A backup made by Firetool 4.1 or later is read as it's restored, a line at a time, so its size doesn't matter. Firetool writes in batches of 500, four at a time, and shows how many are restored and skipped. Cancel stops after the current batch. If it stops or some documents fail, the button reads Resume, which continues with only the documents that didn't make it.
Restore only some documents
When only part of the data needs to go back, choose Choose documents… in the restore dialog instead of Restore:
- Firetool reads the file once and lists its collections with how many documents each holds. Subcollections are listed under their collection, by name. Tick a collection to restore it with everything under it, or paste paths, one a line: a collection path brings everything under it, a document path only that document.
- Choose Preview…, then Preview. Firetool reads each chosen document as it is now (one read each) and sorts them into documents that aren't there now, documents that differ, and documents that are the same. Nothing is written yet. Untick either kind to leave it out.
- Choose Put back. Only the new and different documents are written, every field as in the backup. A document that someone created or changed after the preview is skipped and named, never overwritten.
- Afterwards Firetool reads the written documents again and says whether they all read back as written. The result is in the dialog and in Tasks.
It's one job in Tasks, so Undo… there (or Undo this operation in the audit log) takes it back. A project marked production asks for its project ID when the job writes more documents than the project's limit (1 unless its rules set more). If the backup comes from an environment whose copies are masked (Tools → Policy → Environment rules), emails and phone numbers are masked here too.
The same works for data from an earlier time without a backup file: open the collection, choose Now in the query bar (Show as of…) and pick the time, tick the rows and choose Put these back… (also in Actions ▾ and the command palette). They're compared with now and put back the same way.
From the terminal: firetool restore <project> --file <backup> --only users,orders/1001 --preview compares and writes nothing; without --preview it writes the new and different ones, reads them back, and exits 1 if one failed or reads back different. --skip-existing writes only the ones that aren't there.
Restore a whole project, such as a staging copy
When the file holds more than documents, Restore a backup… lists its parts. Tick the ones to restore into the project you chose:
- Users are created. Users that already exist are kept as they are, never overwritten. Without password hashes in the file, those users set a new password with a reset link.
- Security rules are deployed.
- Composite indexes: only the missing ones are created.
- Firetool settings are added where the project has none.
Each part reports what it did. Every part goes through the same checks and audit log as doing it by hand, and a project marked production asks for its project ID.
Check a backup before you need it
- Open the file in any text editor: count should match the number of documents you expect.
- Choose Restore a backup… and pick the file, then read the summary and choose Cancel. Nothing is written until you choose Restore. A damaged file is refused with the number of the first bad document; a file from a newer Firetool asks you to update.
- For a full test, restore it into a separate database or test project and compare.
Production, read-only and Pro
- Backups and restores need Firetool Pro.
- Restoring into a database marked read-only is refused before anything is written.
- If the target is marked production, you type its project ID before the restore writes.
- Every restore write passes the same checks as any change and is recorded in the audit log.
Restore a single change from the audit log
For a mistake rather than a disaster, you may not need a backup file. Firetool keeps copies of documents before some changes:
- Choose Tools → Audit log (Ctrl+Shift+L) and click the entry for the change.
- If Firetool saved the documents as they were, the entry says so and offers Restore N documents. Choose it and confirm.
Limits:
- By default copies are kept for deleted documents, single-document edits, bulk field changes and restores, and on a project marked production for every change. Imports, copies and script updates elsewhere are only covered if your policy keeps copies of Everything that changes; a policy can also turn copies off.
- Restoring writes the old versions back over any later changes. Documents that didn't exist before the change aren't removed by Restore; Undo this operation removes them and takes a whole job back, Authentication users included.
- The account that made the change must still be connected.
- Authentication users can't be restored this way.
Questions
Can I restore a backup into a different collection path?
No. Restore puts each document back at the path in the file. You choose the project and database. To end up under another path, restore into a spare database and then copy the collection to the path you want.
Is a Firetool backup the same as a Firestore managed export?
No. It's a JSON file on your computer, made by reading the documents through the Firestore API, so it costs one read per document. It doesn't use Cloud Storage.
Related
- Firestore backup: what a Firetool backup keeps and how restore works.
- Copy collections: copy or move collections between projects directly.
- Scheduled exports: CSV or JSON exports on a schedule.
- Roles and production safety: read-only and production marks, and the audit log.