Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jzlai committed Dec 2, 2019
1 parent 8c93bc6 commit 38ce73e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ As of version 1.2, the default is to save files with each field converted to a `
Example backup:

```sh
firestore-backup-restore --accountCredentials path/to/account/credentials/file.json --backupPath /backups/myDatabase --excludePattern '.*/collection1.*'
firestore-backup-restore --accountCredentials path/to/account/credentials/file.json --backupPath /backups/myDatabase
```

### Clone:
Expand Down Expand Up @@ -204,6 +204,25 @@ Document saved with type information (Default)
identifier: { value: 'provider', type: 'string' }
```

### Exclude collections

The optional parameter allows `--excludeCollections` skipping of provided collections. This parameter accepts a comma seperated list of collections.

Example:

```sh
firestore-backup-restore --accountCredentials path/to/account/credentials/file.json --backupPath /backups/myDatabase --excludeCollections /collection1/document/subcollectionToIgnore,/collectionToIgnore
```

### Exclude paths by regex
Skips documents or collections by pattern matching. All subpaths of matched paths will also be excluded. This parameter accepts a comma seperated list of regular expressions.

Example:

```sh
firestore-backup-restore --accountCredentials path/to/account/credentials/file.json --backupPath /backups/myDatabase --excludePattern '^/collectionToIgnore,^/[^/]*/[^/]*/subcollectionToIgnore'
```

## Contributions

Feel free to report bugs in the [Issue Tracker](https://github.com/willhlaw/node-firestore-backup-restore/issues), fork and create pull requests!

0 comments on commit 38ce73e

Please sign in to comment.