Skip to content

mongoshield hold

Protect a backup from pruning.

Terminal window
mongoshield hold <backup> [options]
ArgumentDescription
<backup>requiredBackup id, or "latest"
OptionDescription
--reason <text>Why the backup must be kept (required).
--by <name>Who placed the hold (default: user@host).
--from <storage-url>Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config).

The global options (--config, --json, --quiet, --verbose, --no-color, --yes) work here too.

Keep the backup taken before a migration:

Terminal window
mongoshield hold latest --reason "before the v2 schema migration"