mongoshield delete
Delete one backup by id (refuses held, locked or depended-on backups).
mongoshield delete <backup> [options]Deletes the backup's manifest first, then its files, annotations and checkpoint. Refuses backups on hold, backups still write-once (retainDays / object lock) and backups an incremental backup depends on. Asks for confirmation (--yes in scripts).
Arguments
Section titled “Arguments”| Argument | Description | |
|---|---|---|
<backup> | required | The exact backup id (not "latest") |
Options
Section titled “Options”| Option | Description |
|---|---|
--from <storage-url> | Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config). |
--by <name> | Who asked for the deletion, for the audit line (default: user@host). |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”Delete a backup taken by mistake:
mongoshield delete 2026-10-20T03-00-04Z_7f3a9cIn a script, with a JSON result:
mongoshield delete 2026-10-20T03-00-04Z_7f3a9c --yes --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