Server Side Copies with Onedrive Business / Sharepoint

What is the problem you are having with rclone?

I have read that server-side copy / move is possible via Onedrive Business

The thread didn't quite come to an end...

I would like to move files from Sharepoint Sites
From one crypt ("team7_privat") to another ("team6_privat") on the same Account. (sharepoint sites)
I'm running all crypt remotes in one combine: ("together") via systemd
Drives as shown below.

As I move files between those crypts it says
Error
"Can't server-side copy - cross drive but not OneDrive personal"

shure it isn't Personal, but the thread above did make it happen anyways.

as I am not the professional in self-compiling:
is it possible to make the code-snippet for checking Onedrive types optional?

Combine Remote ("together") mounted via systemd

# User service for Rclone mounting
#
# Place in ~/.config/systemd/user/
# File must include the '@' (ex rclone@.service)
# As your normal user, run 
#   systemctl --user daemon-reload
# You can now start/enable each remote by using rclone@<remote>..
#   systemctl --user enable rclone@dropbox
#   systemctl --user start rclone@dropbox

[Unit]
Description=rclone: Remote FUSE filesystem for cloud storage config %i
Documentation=man:rclone(1)
After=network-online.target
Wants=network-online.target 
AssertPathIsDirectory=%h/mnt/%i
StartLimitInterval=200
StartLimitBurst=5

[Service]
Type=notify
Environment="RCLONE_CONFIG_PASS=hidden"
ExecStart= \
  /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
    --log-level DEBUG \
    --log-file /root/logs/rclone/%i.log \
    --umask 022 \
--vfs-cache-mode full \
--allow-other \
--bind 0.0.0.0 \
--no-modtime \
--buffer-size 32M \
--cache-dir /root/rclone/cache \
--server-side-across-configs \
--no-checksum \
--disable-http2 \
--vfs-fast-fingerprint \
--ignore-checksum \
--no-check-certificate \
--checkers 1 \
--tpslimit 10 \
--transfers 1 \
--bwlimit 50M:50M \
--low-level-retries 1 \
--onedrive-no-versions \
--onedrive-hash-type none \
--onedrive-chunk-size 250M \
--onedrive-delta \
--dir-cache-time 9999h \
--vfs-refresh \
--vfs-cache-max-age 9999h \
--vfs-read-chunk-size 100M \
--poll-interval 1m \
--ignore-size \
--user-agent "ISV|hidden|hidden" \
--vfs-cache-min-free-space 90G \
    %i: %h/mnt/%i
ExecStop=/bin/fusermount -u %h/mnt/%i
Restart=always
RestartSec=30

[Install]
WantedBy=default.target

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

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

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

rclone copy -vv --server-side-across-configs testteam2_privat:catvideos_jt/cutecats/YivKmFRQnZ.mp4 team7_privat:catvideos_jt7/cutecats

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

1 Onedrive Business / Sharepoint Account (Tenant)
Tree as follows:

[team7]
type = onedrive
token = hidden
drive_id = hidden
drive_type = documentLibrary
client_id = hidden
client_secret = hidden
auth_url = https://login.microsoftonline.com/hidden/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/hidden/oauth2/v2.0/token
no_versions = true
delta = true
chunk_size = 50Mi
server_side_across_configs = true

[team7_privat]
type = crypt
remote = team7:privat
password = hidden
password2 = hidden
filename_encoding = base32768
suffix = none
server_side_across_configs = true

[team6]
type = onedrive
token = hidden
drive_id = hidden
drive_type = documentLibrary
client_id = hidden
client_secret = hidden
auth_url = https://login.microsoftonline.com/hidden/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/hidden/oauth2/v2.0/token
no_versions = true
delta = true
chunk_size = 50Mi

[team6_privat]
type = crypt
remote = team6:privat
password = hidden
filename_encoding = base32768
suffix = none
filename_encryption = standard

All crypts combine via

[together]
type = combine
upstreams = hidden

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

user:~# rclone copy -vv --server-side-across-configs testteam2_privat:catvideos_jt/cutecats/YivKmFRQnZ.mp4 team7_privat:catvideos_jt7/cutecats
2024/03/22 08:34:10 DEBUG : rclone: Version "v1.67.0-beta.7778.7803b4ed6" starting with parameters ["rclone" "copy" "-vv" "--server-side-across-configs" "testteam2_privat:catvideos_jt/cutecats/YivKmFRQnZ.mp4" "team7_privat:catvideos_jt7/cutecats"]
2024/03/22 08:34:10 DEBUG : Creating backend with remote "testteam2_privat:catvideos_jt/cutecats/YivKmFRQnZ.mp4"
Enter configuration password:
password:
2024/03/22 08:34:13 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/03/22 08:34:13 DEBUG : Creating backend with remote "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0/8omknmvg1d5sdghslbffruap48"
2024/03/22 08:34:15 DEBUG : fs cache: adding new entry for parent of "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0/8omknmvg1d5sdghslbffruap48", "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0"
2024/03/22 08:34:15 DEBUG : fs cache: adding new entry for parent of "testteam2_privat:catvideos_jt/cutecats/YivKmFRQnZ.mp4", "testteam2_privat:catvideos_jt/cutecats"
2024/03/22 08:34:15 DEBUG : Creating backend with remote "team7_privat:catvideos_jt7/cutecats"
2024/03/22 08:34:15 DEBUG : Creating backend with remote "team7:privat/蘇黨薠嗭罁栝㇀齎江/苷蚖鋟痘斜隰觗炘達繢肷訝棓眝ꝁ獒镥ɟ"
2024/03/22 08:34:16 DEBUG : YivKmFRQnZ.mp4: Need to transfer - File not found at Destination
2024/03/22 08:34:16 DEBUG : 8omknmvg1d5sdghslbffruap48: Can't server-side copy - cross-drive but not OneDrive Personal
2024/03/22 08:34:16 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Starting multipart upload
2024/03/22 08:34:16 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 0/1117950779 size 52428800
2024/03/22 08:34:18 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 52428800/1117950779 size 52428800
2024/03/22 08:34:20 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 104857600/1117950779 size 52428800
2024/03/22 08:34:21 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 157286400/1117950779 size 52428800
2024/03/22 08:34:23 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 209715200/1117950779 size 52428800
2024/03/22 08:34:25 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 262144000/1117950779 size 52428800
2024/03/22 08:34:27 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 314572800/1117950779 size 52428800
2024/03/22 08:34:29 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 367001600/1117950779 size 52428800
2024/03/22 08:34:30 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 419430400/1117950779 size 52428800
2024/03/22 08:34:32 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 471859200/1117950779 size 52428800
2024/03/22 08:34:34 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 524288000/1117950779 size 52428800
2024/03/22 08:34:35 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 576716800/1117950779 size 52428800
2024/03/22 08:34:37 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 629145600/1117950779 size 52428800
2024/03/22 08:34:39 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 681574400/1117950779 size 52428800
2024/03/22 08:34:40 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 734003200/1117950779 size 52428800
2024/03/22 08:34:42 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 786432000/1117950779 size 52428800
2024/03/22 08:34:44 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 838860800/1117950779 size 52428800
2024/03/22 08:34:45 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 891289600/1117950779 size 52428800
2024/03/22 08:34:47 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 943718400/1117950779 size 52428800
2024/03/22 08:34:48 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 996147200/1117950779 size 52428800
2024/03/22 08:34:50 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 1048576000/1117950779 size 52428800
2024/03/22 08:34:52 DEBUG : 㑋簣㢫䇃停旑㔻濜祟: Uploading segment 1101004800/1117950779 size 16945979
2024/03/22 08:34:53 DEBUG : YivKmFRQnZ.mp4: quickxor = c541fbfb9b5388f10abd2297eea146a9b6ad4c89 OK
2024/03/22 08:34:53 INFO  : YivKmFRQnZ.mp4: Copied (new)
2024/03/22 08:34:53 INFO  : 
Transferred:        1.041 GiB / 1.041 GiB, 100%, 27.990 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:        42.6s

One thing I noticed is that move would actually work instead of copy.

By using move the log says that drive-id didn't match

2024/03/22 09:06:46 DEBUG : OneDrive 'privat/蘇黨薠嗭罁栝㇀齎江/苷蚖鋟痘斜隰觗炘達繢肷訝棓眝ꝁ獒镥ɟ': Can't move files between drives ("dsdsdkHh4HIDDEN8m8pX" != "sdsdPwkHIDDENVraW")

What is drive-id used for?
is it critical to rename those drive-ids as one shared name for all drives?

update:
by renaming the drive_id same on both sides the move is made server-side!

but it is safe replacing this permanently in config?

2024/03/22 09:27:13 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/03/22 09:27:13 DEBUG : Creating backend with remote "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0/eb4lvhu0aabl58nuid8cgr3tf8"
2024/03/22 09:27:15 DEBUG : fs cache: adding new entry for parent of "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0/eb4lvhu0aabl58nuid8cgr3tf8", "testteam2:privat/29tosm48er23400la9sedod680/tqcp3vv9f8o5v6n96jun2ocicba39nc8tei1r947uh4v810bpte0"
2024/03/22 09:27:15 DEBUG : fs cache: adding new entry for parent of "testteam2_privat:catvideos/cutecats/jKzaMVLpgZ.mp4", "testteam2_privat:catvideos/cutecats"
2024/03/22 09:27:15 DEBUG : Creating backend with remote "team7_privat:catvideos/cutecats"
2024/03/22 09:27:15 DEBUG : Creating backend with remote "team7:privat/蘇黨薠嗭罁栝㇀齎江/苷蚖鋟痘斜隰觗炘達繢肷訝棓眝ꝁ獒镥ɟ"
2024/03/22 09:27:16 DEBUG : jKzaMVLpgZ.mp4: Need to transfer - File not found at Destination
2024/03/22 09:27:17 INFO  : jKzaMVLpgZ.mp4: Moved (server-side)
2024/03/22 09:27:17 INFO  : 
Transferred:      970.766 MiB / 970.766 MiB, 100%, 0 B/s, ETA -
Renamed:                1
Transferred:            1 / 1, 100%
Server Side Moves:      1 @ 970.766 MiB
Elapsed time:         7.1s

If you change the drive-id it will point to the same SharePoint, so basically you are making both remotes the same. If your free space is different you can easily check this doing an about with each different drive-id or a simple lsd if folder structure is different.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.