{"id":13623435,"url":"https://github.com/steadyequipment/node-firestore-backup","last_synced_at":"2025-04-15T14:33:02.361Z","repository":{"id":57236798,"uuid":"109298774","full_name":"steadyequipment/node-firestore-backup","owner":"steadyequipment","description":"Google Firebase Firestore backup tool","archived":false,"fork":false,"pushed_at":"2019-03-18T18:25:33.000Z","size":295,"stargazers_count":190,"open_issues_count":23,"forks_count":51,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-02T07:28:42.371Z","etag":null,"topics":["backup","cli","firebase","firestore"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steadyequipment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-02T17:42:36.000Z","updated_at":"2024-08-16T11:40:29.000Z","dependencies_parsed_at":"2022-08-26T15:10:11.642Z","dependency_job_id":null,"html_url":"https://github.com/steadyequipment/node-firestore-backup","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadyequipment%2Fnode-firestore-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadyequipment%2Fnode-firestore-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadyequipment%2Fnode-firestore-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadyequipment%2Fnode-firestore-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadyequipment","download_url":"https://codeload.github.com/steadyequipment/node-firestore-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223672990,"owners_count":17183618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","cli","firebase","firestore"],"created_at":"2024-08-01T21:01:31.779Z","updated_at":"2024-11-08T11:30:49.311Z","avatar_url":"https://github.com/steadyequipment.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# firestore-backup\nA Google Firebase Firestore backup tool.\n\n[![codebeat badge](https://codebeat.co/badges/febdaccc-2648-4a74-9596-57b00c3f7af8)](https://codebeat.co/projects/github-com-steadyequipment-node-firestore-backup-master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b7e94350eba84ec198f83c05c3a10bd0)](https://www.codacy.com/app/Steadyequipment/node-firestore-backup?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=steadyequipment/node-firestore-backup\u0026amp;utm_campaign=Badge_Grade)\n[![David badge](https://david-dm.org/steadyequipment/node-firestore-backup.svg)](https://david-dm.org/steadyequipment/node-firestore-backup)\n\n# Note: Firebase now has an official backup and restore tool\nRead more about how to use it here: https://firebase.google.com/docs/firestore/manage-data/export-import\n\n\n## Installation\nInstall using [__npm__](https://www.npmjs.com/).\n\n```sh\nnpm install -g firestore-backup\n```\n\n or [__yarn__](https://yarnpkg.com/en/)\n\n```sh\nyarn global add firestore-backup\n```\n\nAlternatively download the source.\n\n```sh\ngit clone https://github.com/steadyequipment/node-firestore-backup.git\n```\n\n### Retrieving Google Cloud Account Credentials\n\n1. Visit the [Firebase Console](https://console.firebase.google.com)\n1. Select your project\n1. Navigate to __Project Settings__ (at the time of writing the __gear__ icon button at the top left of the page).\n1. Navigate to __Service Accounts__\n1. Click _Generate New Private Key_\n\nThis downloaded json file contains the proper credentials needed for __firestore-backup__ to authenticate.\n\n\n## Usage\n\n### Backup:\n* `-a`, `--accountCredentials` `\u003cpath\u003e` - Google Cloud account credentials JSON file.\n* `-B`, `--backupPath` `\u003cpath\u003e`- Path to store the backup.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase\n```\n\n### Backup with pretty printing:\n* `-P`, `--prettyPrint` - JSON backups done with pretty-printing.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --prettyPrint\n```\n\n### Backup from a starting path:\n* `-S`, `--databaseStartPath` `\u003cpath\u003e` - The database collection or document path to begin backup.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --databaseStartPath /myCollection/document_3\n```\n\n### Limit number of requests:\n* `-L`, `--requestCountLimit` `\u003cnumber\u003e` - The maximum number of requests to be made in parallel.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --requestCountLimit 2\n```\n\n### Exclude top level collections from backup:\n* `-E`, `--excludeCollections` `\u003cid\u003e` - Top level collection id(s) to exclude from backing up.\n\n_Note_: because of how the command line parsing library works multiple collection ids must be specified as separate parameters.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --excludeCollections myFirstAnnoyingCollection --excludeCollections mySecondAnnoyingCollection\n```\n\n### Exclude paths by regex:\n* `--excludePattern` `\u003cregex\u003e` - Patterns to match against paths to exclude from the backup. All subpaths of matched paths will also be excluded.\n\nThese patterns can support excluding several different sections of trees, e.g.:\n- Exclude top level collection: ^/collectionToIgnore\n- Exclude sub collections of all documents in a collection: ^/organizations/[^/]*/subcollectionToIgnore\n- Exclude sub collections at a given level: ^/[^/]*/[^/]*/subcollectionToIgnore\n- Exclude a particular document: ^/organizations/organizationToIgnore\n\n_Note_: when combining excludePattern with databaseStartPath, the patterns are tested against the full path of the document off the root of database (with a leading slash).\n\n_Note_: because of how the command line parsing library works multiple exclude patterns must be specified as separate parameters.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --excludePattern '^/collectionToIgnore' --excludePattern '^/[^/]*/[^/]*/subcollectionToIgnore'\n```\n\n### Fetch documents in batches:\n* `--batchSize` `\u003cnumber` - The maximum number of documents to fetch in a single request.\n\nExample:\n```sh\nfirestore-backup --accountCredentials path/to/credentials/file.json --backupPath /backups/myDatabase --batchSize 25\n```\n\n### Relax:\nThat's it! ✨🌈\n\n## Contributions\nThis project has been made much better by it's [contributors](https://github.com/steadyequipment/node-firestore-backup/graphs/contributors), feel free to report bugs and make feature requests in the [Issue Tracker](https://github.com/steadyequipment/node-firestore-backup/issues), fork and create pull requests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadyequipment%2Fnode-firestore-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadyequipment%2Fnode-firestore-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadyequipment%2Fnode-firestore-backup/lists"}