Skip to content

mongoshield erasures

List the GDPR erasure ledger, or apply it to a database.

Terminal window
mongoshield erasures <action> [options]
ArgumentDescription
<action>requiredlist or apply
OptionDescription
--from <storage-url>Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config).
--since <date>Only erasures recorded at or after this date.
--uri <mongodb-uri>apply: the deployment to clean (default: config source.uri).
--include <pattern>Only these namespaces, e.g. app.* or app.users. Repeatable.
--dry-runapply: count, delete nothing.

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

Show every recorded erasure:

Terminal window
mongoshield erasures list

Re-apply the ledger to a database restored by other means:

Terminal window
mongoshield erasures apply --uri $STAGING_URI --include 'app.*'