corso restore onedrive
Restore M365 OneDrive service data
corso restore onedrive --backup <backupId> [flags]
Examples
# Restore file with ID 98765abcdef in Bob's last backup (1234abcd...)
corso restore onedrive --backup 1234abcd-12ab-cd34-56de-1234abcd --file 98765abcdef
# Restore the file with ID 98765abcdef without its associated permissions
corso restore onedrive --backup 1234abcd-12ab-cd34-56de-1234abcd --file 98765abcdef --no-permissions
# Restore files named "FY2021 Planning.xlsx" in "Documents/Finance Reports"
corso restore onedrive --backup 1234abcd-12ab-cd34-56de-1234abcd \
--file "FY2021 Planning.xlsx" --folder "Documents/Finance Reports"
# Restore all files and folders in folder "Documents/Finance Reports" that were created before 2020
corso restore onedrive --backup 1234abcd-12ab-cd34-56de-1234abcd \
--folder "Documents/Finance Reports" --file-created-before 2020-01-01T00:00:00
Flags
Flag | Short | Default | Help |
---|---|---|---|
--backup | ID of the backup to retrieve. | ||
--folder | `` | Select files by OneDrive folder; defaults to root. | |
--file | `` | Select files by name. | |
--file-created-after | Select files created after this datetime. | ||
--file-created-before | Select files created before this datetime. | ||
--file-modified-after | Select files modified after this datetime. | ||
--file-modified-before | Select files modified before this datetime. | ||
--no-permissions | false | don't restore file and folder permissions | |
--collisions | skip | Sets the behavior for existing item collisions: skip, copy, or replace | |
--destination | Overrides the folder where items get restored; '/' places items into their original location | ||
--to-resource | Overrides the protected resource (mailbox, site, user, etc) where data gets restored | ||
--azure-tenant-id | Azure tenant ID | ||
--azure-client-id | Azure app client ID | ||
--azure-client-secret | Azure app client secret | ||
--passphrase | Passphrase to protect encrypted repository contents | ||
--aws-access-key | S3 access key | ||
--aws-secret-access-key | S3 access secret | ||
--aws-session-token | S3 session token | ||
--help | -h | false | help for onedrive |
Global and inherited flags
Flag | Short | Default | Help |
---|---|---|---|
--config-file | $HOME/.corso.toml | config file location | |
--debug-api-calls | false | add non-2xx request/response errors to logging | |
--hide-progress | false | turn off the progress bar displays | |
--json | false | output data in JSON format | |
--log-file | corso-<timestamp>.log | location for writing logs, use '-' for stdout | |
--log-format | text | set the log format to text | |
--log-level | info | set the log level to debug | |
--mask-sensitive-data | false | anonymize personal data in log output | |
--no-stats | false | disable anonymous usage statistics gathering | |
--retain-progress | false | retain the progress bar displays after completion | |
--verbose | false | don't hide additional information |