Move serverside between sharepoints doesnt work (Onedrive business)

What is the problem you are having with rclone?

Moving (server-side) across sharepoints is not possible. Rclone is switching to copy (server-side)

What i have checked so far:

  • Every sharepoint remote has its own client id and key
  • both Sites on the same tenant
  • API Permissions on both apps are
    Files.Read,
    Files.Read.All,
    Files.ReadWrite.AppFolder
    Files.ReadWrite.All
    Files.ReadWrite
    Files.Read.Selected
    Files.ReadWrite.Selected
    Sites.FullControl.All
    Sites.Manage.All
    Sites.Selected
    Sites.ReadWrite.All
    Sites.Read.All

Run the command 'rclone version' and share the full output of the command.

rclone v1.69.0-beta.8475.a389a2979

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-130-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.23.4
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Onedrive Business - Sharepoint

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone moveto testteam3:test3 team11:test3 --log-level DEBUG --onedrive-hard-delete --server-side-across-configs --tpslimit 2 --checkers 10 --transfers 8 --bind 0.0.0.0 --onedrive-delta --fast-list

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[testteam3]
type = onedrive
token = XXX
drive_id = XXX
drive_type = documentLibrary
client_id = XXX
client_secret = XXX
auth_url = https://login.microsoftonline.com/207005cc-d970-2323-a1cd-375a104ba63b/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/207005cc-d970-2323-a1cd-375a104ba63b/oauth2/v2.0/token
no_versions = true
delta = true
chunk_size = 50Mi
server_side_across_configs = true
hard_delete = true

[team11]
type = onedrive
client_id = XXX
client_secret = XXX
auth_url = https://login.microsoftonline.com/207005cc-d970-2323-a1cd-375a104ba63b/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/207005cc-d970-2323-a1cd-375a104ba63b/oauth2/v2.0/token
server_side_across_configs = true
no_versions = true
hard_delete = true
delta = true
token = XXX
drive_id = XXX
drive_type = documentLibrary

A log from the command that you were trying to run with the -vv flag

2025/01/06 08:53:48 INFO  : Starting transaction limiter: max 2 transactions/s with burst 1
2025/01/06 08:53:48 DEBUG : rclone: Version "v1.69.0-beta.8475.a389a2979" starting with parameters ["rclone" "moveto" "testteam3:test3" "team11:test3" "--log-level" "DEBUG" "--onedrive-hard-delete" "--server-side-across-configs" "--tpslimit" "2" "--checkers" "10" "--transfers" "8" "--bind" "0.0.0.0" "--onedrive-delta" "--fast-list"]
2025/01/06 08:53:48 DEBUG : Creating backend with remote "testteam3:test3"
Enter configuration password:
password:
2025/01/06 08:53:51 DEBUG : Using config file from "C:\\Users\\dd\\Desktop\\rclone\\rclone.conf"
2025/01/06 08:53:51 DEBUG : testteam3: detected overridden config - adding "{fVMpT}" suffix to name
2025/01/06 08:53:51 DEBUG : fs cache: renaming cache item "testteam3:test3" to be canonical "testteam3{fVMpT}:test3"
2025/01/06 08:53:51 DEBUG : Creating backend with remote "team11:test3"
2025/01/06 08:53:51 DEBUG : team11: detected overridden config - adding "{fVMpT}" suffix to name
2025/01/06 08:53:53 DEBUG : fs cache: renaming cache item "team11:test3" to be canonical "team11{fVMpT}:test3"
2025/01/06 08:54:07 DEBUG : 2024-04-16_10-28-09.mkv: Need to transfer - File not found at Destination
2025/01/06 08:54:07 DEBUG : OneDrive root 'test3': Waiting for checks to finish
2025/01/06 08:54:07 DEBUG : OneDrive root 'test3': Waiting for transfers to finish
2025/01/06 08:54:08 DEBUG : OneDrive root 'test3': Can't move files between drives ("b!UMvqVn0YbkW8FxX8m6KxOrQpTkJVjyBNpCRlfdgxz-nmEwWO-ZVOS5gB6h6ClkQX" != "b!ZS6UfHlUh0WQuMkvXIOIcs8Hq5rFtM9FuHDdfdgl9fEsMd906M_PTIzkH8RBVraW")
2025/01/06 08:54:08 DEBUG : 2024-04-16_10-28-09.mkv: Can't move, switching to copy
2025/01/06 08:54:14 DEBUG : 2024-04-16_10-28-09.mkv: quickxor = 95cf5b4f67995bbd09fa9a584eec96ca33a5042a OK
2025/01/06 08:54:14 INFO  : 2024-04-16_10-28-09.mkv: Copied (server-side copy)
2025/01/06 08:54:15 INFO  : 2024-04-16_10-28-09.mkv: Deleted
2025/01/06 08:54:15 INFO  :
Transferred:       15.336 MiB / 15.336 MiB, 100%, 0 B/s, ETA -
Checks:                 1 / 1, 100%
Deleted:                1 (files), 0 (dirs), 15.336 MiB (freed)
Renamed:                1
Transferred:            1 / 1, 100%
Server Side Copies:     1 @ 15.336 MiB
Elapsed time:        21.7s

2025/01/06 08:54:15 DEBUG : 7 go routines active

as I noticed: moving between sharepoints is not offered by microsoft at all.

Anyhow:
Copy files is working, but files between to crypt mounts end in corrupted files at destination...

2025/01/06 16:41:19 NOTICE: Failed to copy: multi-thread copy: failed to open source: failed to authenticate decrypted block - bad password?

Do you use the same keys for both crypt locations? Otherwise there is no way to do this.

sadly they don't match

As described on the Crypt page, I can "convert" my existing crypt to a new one with a user-defined password on the same SharePoint. After that, I can repeat this process for all locations, so that in the end, all crypts will share the same password. This will make it easier to copy data across different SharePoint sites. Although the setup is a bit time-consuming, it's worth it for me actually....

If you have enough space on the storage system you can create a new crypt remote pointing to a separate directory on the same backend, and then use rclone to copy everything from the original crypt remote to the new, effectively decrypting everything on the fly using the old password and re-encrypting using the new password. When done, delete the original crypt remote directory and finally the rclone crypt configuration with the old password. All data will be streamed from the storage system and back, so you will get half the bandwidth and be charged twice if you have upload and download quota on the storage system.
Crypt

1 Like