mongoshield verify
Check that a backup is complete and intact.
mongoshield verify [backup] [options]Arguments
Section titled “Arguments”| Argument | Description | |
|---|---|---|
[backup] | optional | Backup id, or "latest" (default) |
Options
Section titled “Options”| Option | Description |
|---|---|
--deep | Also decrypt, decompress and parse every document (needs the key). |
--drill | Restore the backup into a scratch deployment and check it (see mongoshield drill). |
--target-uri <mongodb-uri> | Scratch deployment to restore into (required, or MONGOSHIELD_DRILL_URI; never the configured source). |
--sample <n> | Documents per collection to compare byte for byte with the backup (time series: field by field). Default: 0. |
--assertions <file> | A .ts/.js file whose default export checks the restored data. |
--keep | Keep the temporary databases for inspection. |
--prefix <prefix> | Prefix of the temporary database names. Default: msdrill_. |
--allow-same-deployment | Allow the target to be the backup's own source deployment. |
--include <pattern> | Only these namespaces, e.g. app.* or app.users. Repeatable. |
--exclude <pattern> | Skip these namespaces, e.g. *.audit_*. Repeatable. |
--from <storage-url> | Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config). |
--identity-file <path> | age identity file for encrypted backups (from mongoshield keygen). Repeatable. |
--passphrase-env <VAR> | Read the encryption passphrase from this environment variable. |
--chain <full|links> | Incremental backups: also check every earlier backup's files (full), or only that the chain is intact (links). Default: full. |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”Quick check of the latest backup:
mongoshield verifyFull check of an encrypted backup:
mongoshield verify latest --deep --identity-file ~/keys/backup.keyMongoShield is MIT licensed and is not affiliated with, endorsed by or sponsored by MongoDB, Inc. MongoDB is a trademark of MongoDB, Inc.Privacy policy