mongoshield history
Show how one document changed across backups and the journal.
mongoshield history <namespace> <id> [options]Looks a document up by _id in every backup (newest first) and, when a change journal exists, lists every change to it in between. Each version is shown with the fields that changed since the version before it. The _id is Extended JSON: '"ada"', 42, '{"$oid":"…"}'.
Arguments
Section titled “Arguments”| Argument | Description | |
|---|---|---|
<namespace> | required | The collection, e.g. app.users |
<id> | required | The document's _id as Extended JSON |
Options
Section titled “Options”| Option | Description |
|---|---|
--from <storage-url> | Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config). |
--backups <n|all> | How many backups that hold the collection to search. Default: 10. |
--skip-journal | Do not read the change journal. |
--identity-file <path> | age identity file for encrypted backups (from mongoshield keygen). Repeatable. |
--passphrase-env <VAR> | Read the encryption passphrase from this environment variable. |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”The history of one user:
mongoshield history app.users '{"$oid":"6523f1c2a1b2c3d4e5f60718"}'Every backup, no journal, as JSON:
mongoshield history app.orders 42 --backups all --skip-journal --jsonMongoShield is MIT licensed and is not affiliated with, endorsed by or sponsored by MongoDB, Inc. MongoDB is a trademark of MongoDB, Inc.Privacy policy