Skip to main content

corso restore sharepoint

Restore M365 SharePoint service data

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

Examples

# Restore file with ID 98765abcdef in Bob's latest backup (1234abcd...)
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd --file 98765abcdef

# Restore the file with ID 98765abcdef without its associated permissions
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--file 98765abcdef --no-permissions

# Restore files named "ServerRenderTemplate.xsl" in the folder "Display Templates/Style Sheets".
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--file "ServerRenderTemplate.xsl" --folder "Display Templates/Style Sheets"

# Restore all files in the folder "Display Templates/Style Sheets" that were created before 2020.
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--file-created-before 2020-01-01T00:00:00 --folder "Display Templates/Style Sheets"

# Restore all files in the "Documents" library.
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--library Documents --folder "Display Templates/Style Sheets"

# Restore lists by their name(s)
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--list "list-name-1,list-name-2"

# Restore lists created after a given time
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--list-created-after 2024-01-01T12:23:34

# Restore lists created before a given time
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--list-created-before 2024-01-01T12:23:34

# Restore lists modified before a given time
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--list-modified-before 2024-01-01T12:23:34

# Restore lists modified after a given time
corso restore sharepoint --backup 1234abcd-12ab-cd34-56de-1234abcd \
--list-modified-after 2024-01-01T12:23:34

Flags

FlagShortDefaultHelp
--backupID of the backup to retrieve.
--librarySelect only this library; defaults to all libraries.
--folder``Select by folder; defaults to root.
--file``Select by file 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.
--list``Select lists by name.
--list-modified-afterSelect lists modified after this datetime.
--list-modified-beforeSelect lists modified before this datetime.
--list-created-afterSelect lists created after this datetime.
--list-created-beforeSelect lists created before this datetime.
--no-permissionsfalsedon't restore file and folder permissions
--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 sharepoint

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