Skip to main content

corso export onedrive

Export M365 OneDrive service data

corso export onedrive <destination> --backup <backupId> [flags]

Examples

# Export file with ID 98765abcdef in Bob's last backup (1234abcd...) to /my-exports
corso export onedrive my-exports --backup 1234abcd-12ab-cd34-56de-1234abcd --file 98765abcdef

# Export files named "FY2021 Planning.xlsx" in "Documents/Finance Reports" to he current directory
corso export onedrive . --backup 1234abcd-12ab-cd34-56de-1234abcd \
--file "FY2021 Planning.xlsx" --folder "Documents/Finance Reports"

# Export all files and folders in folder "Documents/Finance Reports" that were created before 2020 to /my-exports
corso export onedrive my-exports --backup 1234abcd-12ab-cd34-56de-1234abcd \
--folder "Documents/Finance Reports" --file-created-before 2020-01-01T00:00:00

Flags

FlagShortDefaultHelp
--backupID of the backup to retrieve.
--folder``Select files by OneDrive folder; defaults to root.
--file``Select files by name.
--file-created-afterSelect files created after this datetime.
--file-created-beforeSelect files created before this datetime.
--file-modified-afterSelect files modified after this datetime.
--file-modified-beforeSelect files modified before this datetime.
--archivefalseExport data as an archive instead of individual files
--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 onedrive

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