Skip to main content

corso restore exchange

Restore M365 Exchange service data

corso restore exchange --backup <backupId> [flags]

Examples

# Restore emails with ID 98765abcdef and 12345abcdef from Alice's last backup (1234abcd...)
corso restore exchange --backup 1234abcd-12ab-cd34-56de-1234abcd --email 98765abcdef,12345abcdef

# Restore emails with subject containing "Hello world" in the "Inbox"
corso restore exchange --backup 1234abcd-12ab-cd34-56de-1234abcd \
--email-subject "Hello world" --email-folder Inbox

# Restore an entire calendar
corso restore exchange --backup 1234abcd-12ab-cd34-56de-1234abcd \
--event-calendar Calendar

# Restore the contact with ID abdef0101
corso restore exchange --backup 1234abcd-12ab-cd34-56de-1234abcd --contact abdef0101

Flags

FlagShortDefaultHelp
--backupID of the backup to retrieve.
--email``Select email messages by ID; accepts '*' to select all emails.
--email-folder``Select emails within a folder; accepts '*' to select all email folders.
--email-subjectSelect emails with a subject containing this value.
--email-senderSelect emails from a specific sender.
--email-received-afterSelect emails received after this datetime.
--email-received-beforeSelect emails received before this datetime.
--event``Select events by event ID; accepts '*' to select all events.
--event-calendar``Select events under a calendar; accepts '*' to select all events.
--event-subjectSelect events with a subject containing this value.
--event-organizerSelect events from a specific organizer.
--event-recursSelect recurring events. Use --event-recurs false to select non-recurring events.
--event-starts-afterSelect events starting after this datetime.
--event-starts-beforeSelect events starting before this datetime.
--contact``Select contacts by contact ID; accepts '*' to select all contacts.
--contact-folder``Select contacts within a folder; accepts '*' to select all contact folders.
--contact-nameSelect contacts whose contact name contains this value.
--collisionsskipSets the behavior for existing item collisions: skip, copy, or replace
--destinationOverrides the folder where items get restored; '/' places items into their original location
--to-resourceOverrides the protected resource (mailbox, site, user, etc) where data gets restored
--azure-tenant-idAzure tenant ID
--azure-client-idAzure app client ID
--azure-client-secretAzure app client secret
--passphrasePassphrase to protect encrypted repository contents
--aws-access-keyS3 access key
--aws-secret-access-keyS3 access secret
--aws-session-tokenS3 session token
--help-hfalsehelp for exchange

Global and inherited flags

FlagShortDefaultHelp
--config-file$HOME/.corso.tomlconfig file location
--debug-api-callsfalseadd non-2xx request/response errors to logging
--hide-progressfalseturn off the progress bar displays
--jsonfalseoutput data in JSON format
--log-filecorso-<timestamp>.loglocation for writing logs, use '-' for stdout
--log-formattextset the log format to text
--log-levelinfoset the log level to debug
--mask-sensitive-datafalseanonymize personal data in log output
--no-statsfalsedisable anonymous usage statistics gathering
--retain-progressfalseretain the progress bar displays after completion
--verbosefalsedon't hide additional information