From ff02636fe40fff8890e0ed1cd2f58341dff876aa Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 22 Sep 2026 15:10:29 +0100 Subject: [PATCH] onedrive: update docs for versions, links and time precision on personal accounts Testing against OneDrive personal (free) and OneDrive for Business shows - personal accounts now create versions on setting the modification time and can delete them, so --onedrive-no-versions and rclone cleanup work there - --onedrive-link-password works on OneDrive for Business - personal free accounts can't set a link password or --expire - --onedrive-link-type embed only works on OneDrive personal - personal accounts store times with 1s precision, not mS See #9917 --- backend/onedrive/metadata.go | 10 +++++----- backend/onedrive/onedrive.go | 13 +++++++------ docs/content/onedrive.md | 7 ------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/backend/onedrive/metadata.go b/backend/onedrive/metadata.go index 7ff874ef5..2546a9099 100644 --- a/backend/onedrive/metadata.go +++ b/backend/onedrive/metadata.go @@ -20,7 +20,7 @@ import ( const ( dirMimeType = "inode/directory" timeFormatIn = time.RFC3339 - timeFormatOut = "2006-01-02T15:04:05.999Z" // mS for OneDrive Personal, otherwise only S + timeFormatOut = "2006-01-02T15:04:05.999Z" // keeps mS if present, though OneDrive only stores S ) // system metadata keys which this backend owns @@ -32,17 +32,17 @@ var systemMetadataInfo = map[string]fs.MetadataHelp{ ReadOnly: true, }, "mtime": { - Help: "Time of last modification with S accuracy (mS for OneDrive Personal).", + Help: "Time of last modification with S accuracy.", Type: "RFC 3339", Example: "2006-01-02T15:04:05Z", }, "btime": { - Help: "Time of file birth (creation) with S accuracy (mS for OneDrive Personal).", + Help: "Time of file birth (creation) with S accuracy.", Type: "RFC 3339", Example: "2006-01-02T15:04:05Z", }, "utime": { - Help: "Time of upload with S accuracy (mS for OneDrive Personal).", + Help: "Time of upload with S accuracy.", Type: "RFC 3339", Example: "2006-01-02T15:04:05Z", ReadOnly: true, @@ -113,7 +113,7 @@ var systemMetadataInfo = map[string]fs.MetadataHelp{ ReadOnly: true, }, "shared-time": { - Help: "Time when the item was shared, with S accuracy (mS for OneDrive Personal).", + Help: "Time when the item was shared, with S accuracy.", Type: "RFC 3339", Example: "2006-01-02T15:04:05Z", ReadOnly: true, diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index 888435818..4673947e7 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -294,16 +294,13 @@ cases, rclone will fall back to normal copy (which will be slightly slower).`, Default: false, Help: `Remove all versions on modifying operations. -Onedrive for business creates versions when rclone uploads new files +Onedrive creates versions when rclone uploads new files overwriting an existing one and when it sets the modification time. These versions take up space out of the quota. This flag checks for versions after file upload and setting modification time and removes all but the last version. - -**NB** Onedrive personal can't currently delete versions so don't use -this flag there. `, Advanced: true, }, { @@ -342,14 +339,18 @@ This works with OneDrive for Business, SharePoint document libraries, and OneDri Help: "Creates a read-write link to the item.", }, { Value: "embed", - Help: "Creates an embeddable link to the item.", + Help: "Creates an embeddable link to the item.\nOnly available in OneDrive personal.", }}, }, { Name: "link_password", Default: "", Help: `Set the password for links created by the link command. -At the time of writing this only works with OneDrive personal paid accounts. +At the time of writing this works with OneDrive for Business and +OneDrive personal paid accounts. + +OneDrive personal free accounts can't set a password or an expiry time +(with --expire) on links. `, Advanced: true, Sensitive: true, diff --git a/docs/content/onedrive.md b/docs/content/onedrive.md index 0d3f68e93..9aa45d735 100644 --- a/docs/content/onedrive.md +++ b/docs/content/onedrive.md @@ -1169,11 +1169,6 @@ Or you can set the `no_versions` parameter to `true` and rclone will remove versions after operations which create new versions. This takes extra transactions so only enable it if you need it. -**Note** At the time of writing Onedrive Personal creates versions -(but not for setting the modification time) but the API for removing -them returns "API not found" so cleanup and `no_versions` should not -be used on Onedrive Personal. - ### Disabling versioning Starting October 2018, users will no longer be able to @@ -1228,8 +1223,6 @@ rclone cleanup --interactive remote:path/subdir # interactively remove all old v rclone cleanup remote:path/subdir # unconditionally remove all old version for path/subdir ``` -**NB** Onedrive personal can't currently delete versions - ## Troubleshooting ### Excessive throttling or blocked on SharePoint