mongoshield schedule
Run backups on the configured cron schedule (long-running).
mongoshield schedule [options]Runs the scheduled job (lock, backup, verify, prune, notify) at every slot of schedule.cron, until stopped with SIGTERM or Ctrl-C. Several replicas may run it: the lock makes sure only one backs up per slot.
Options
Section titled “Options”| Option | Description |
|---|---|
--uri <mongodb-uri> | Connection string (default: config source.uri, MONGOSHIELD_URI or MONGODB_URI). |
--to <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. |
--cron <expression> | Override schedule.cron, e.g. "15 3 * * *". |
--timezone <iana-zone> | Override schedule.timezone (default: UTC). |
--grace-seconds <n> | On shutdown, how long a running backup may take to finish before it is aborted. Default: 60. |
The global options (--config, --json, --quiet,
--verbose, --no-color, --yes) work here too.
Examples
Section titled “Examples”Use the schedule from mongoshield.config.ts:
mongoshield scheduleEvery night at 03:15 Berlin time:
mongoshield schedule --cron "15 3 * * *" --timezone Europe/BerlinMongoShield is MIT licensed and is not affiliated with, endorsed by or sponsored by MongoDB, Inc. MongoDB is a trademark of MongoDB, Inc.Privacy policy