mongoshield replicate
Copy backups to another storage location (3-2-1).
mongoshield replicate [backups] [options]Streams every file of each backup from the backup storage to --to, checks each copy against its recorded SHA-256, and writes the manifest last. Backups already there are skipped; the erasure ledger and annotations are copied too.
Arguments
Section titled “Arguments”| Argument | Description | |
|---|---|---|
[backups] | optional | Which: "all" (default), "latest", or a backup id |
Options
Section titled “Options”| Option | Description |
|---|---|
--to <storage-url> | Destination: ./dir, s3://bucket/prefix, gs://…, az://…, sftp://…. |
--from <storage-url> | Where backups are stored: ./dir, file:///abs, s3://bucket/prefix (default: config). |
--id <backup-id> | Copy these backups (repeatable), instead of the positional. Repeatable. |
--retain-days <days> | Make the copies write-once at the destination for this many days. |
--no-verify | Do not read copies back to check them (faster, less safe). |
--dry-run | Show what would be copied; copy nothing. |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”Keep an off-site, write-once copy of the newest backup:
mongoshield replicate latest --to s3://offsite-backups/prod --retain-days 30Bring a second copy fully up to date:
mongoshield replicate all --to /mnt/nas/mongoMongoShield is MIT licensed and is not affiliated with, endorsed by or sponsored by MongoDB, Inc. MongoDB is a trademark of MongoDB, Inc.Privacy policy