OneDrive Business: Union policy/config not respected with move operation

What is the problem you are having with rclone?

Setup
OneDrive > Crypt > Union > Mount

  • Union remote with 2 backends
  • backend no. 2 has a folder "start" /w files
    -- this backend is almost empty
  • backend no. 1 has a folder "end"
    -- this backend is half full
  • union upstream /w "start" folder is flagged :nc

Issue
move command of files in "start" to "end" will create a new folder "end" on the nc-flagged upstream instead of moving it to the other upstream, that already has this folder and in addition should be preferred by "lfs" policy.

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

rclone v1.64.0

  • os/version: debian 12.1 (64 bit)
  • os/kernel: 6.1.0-12-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.1
  • go/linking: static
  • go/tags: none

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

OneDrive Business

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

$ rclone mount od-test-union: test/ --server-side-across-configs -vv --log-file mount.log
$ mv test/start/100MB.bin test/end/

Before:

$ rclone tree od-test1-crypt:
/
└── end
0 directories, 0 files

$ rclone tree od-test2-crypt:
/
└── start
    ├── 100MB.bin
    └── 1GB.bin
1 directories, 2 files

After:

$ rclone tree od-test1-crypt:
/
└── end
0 directories, 0 files

$ rclone tree od-test2-crypt:
/
├── end
│   └── 100MB.bin
└── start
    └── 1GB.bin
2 directories, 2 files

The rclone config contents with secrets removed.

[od-test1]
type = onedrive
client_id = <REDACTED>
client_secret = <REDACTED>
auth_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/token
drive_type = business
server_side_across_configs = true
no_versions = true
link_scope = organization
av_override = true
token = {"access_token":<REDACTED>}
drive_id = <REDACTED>

[od-test2]
type = onedrive
client_id = <REDACTED> -> same as "od-test1"
client_secret = <REDACTED> -> same as "od-test1"
auth_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/token
drive_type = business
server_side_across_configs = true
no_versions = true
link_scope = organization
av_override = true
token = {"access_token":<REDACTED>}
drive_id = <REDACTED> -> same as "od-test1"
root_folder_id = <REDACTED>  -> folder shared to user /w client_id

[od-test1-crypt]
type = crypt
remote = od-test1:crypt
password = <REDACTED>
password2 = <REDACTED>
server_side_across_configs = true
filename_encoding = base32768
suffix = none

[od-test2-crypt]
type = crypt
remote = od-test2:crypt
password = <REDACTED>  -> same as "od-test1-crypt"
password2 = <REDACTED>  -> same as "od-test1-crypt"
server_side_across_configs = true
filename_encoding = base32768
suffix = none

[od-test-union]
type = union
upstreams = od-test1-crypt: od-test2-crypt::nc
action_policy = eplfs
create_policy = eplfs

A log from the command with the -vv flag

2023/09/29 11:35:11 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "mount" "od-test-union:" "test/" "--server-side-across-configs" "-vv" "--log-file" "mount.log"]
2023/09/29 11:35:11 DEBUG : Creating backend with remote "od-test-union:"

2023/09/29 11:35:18 DEBUG : Using config file from "/.config/rclone/rclone.conf"
2023/09/29 11:35:18 DEBUG : Creating backend with remote "od-test2-crypt:"
2023/09/29 11:35:18 DEBUG : Creating backend with remote "od-test1-crypt:"
2023/09/29 11:35:18 DEBUG : Creating backend with remote "od-test2:crypt"
2023/09/29 11:35:18 DEBUG : Creating backend with remote "od-test1:crypt"
2023/09/29 11:35:19 DEBUG : union root '': actionPolicy = *policy.EpLfs, createPolicy = *policy.EpLfs, searchPolicy = *policy.FF
2023/09/29 11:35:19 NOTICE: union root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2023/09/29 11:35:19 DEBUG : union root '': Mounting on "test/"
2023/09/29 11:35:19 DEBUG : : Root: 
2023/09/29 11:35:19 DEBUG : : >Root: node=/, err=<nil>
2023/09/29 11:35:19 DEBUG : OneDrive root 'crypt': Next delta token is: <REDACTED>
2023/09/29 11:35:19 DEBUG : OneDrive root 'crypt': Next delta token is: <REDACTED>
2023/09/29 11:35:24 DEBUG : /: Lookup: name="start"
2023/09/29 11:35:24 DEBUG : /: >Lookup: node=start/, err=<nil>
2023/09/29 11:35:24 DEBUG : start/: Attr: 
2023/09/29 11:35:24 DEBUG : start/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/09/29 11:35:24 DEBUG : start/: Lookup: name="100MB.bin"
2023/09/29 11:35:24 DEBUG : start/: >Lookup: node=start/100MB.bin, err=<nil>
2023/09/29 11:35:24 DEBUG : start/100MB.bin: Attr: 
2023/09/29 11:35:24 DEBUG : start/100MB.bin: >Attr: a=valid=1s ino=0 size=104857600 mode=-rw-r--r--, err=<nil>
2023/09/29 11:35:24 DEBUG : /: Lookup: name="end"
2023/09/29 11:35:24 DEBUG : /: >Lookup: node=end/, err=<nil>
2023/09/29 11:35:24 DEBUG : end/: Attr: 
2023/09/29 11:35:24 DEBUG : end/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/09/29 11:35:24 DEBUG : end/: Lookup: name="100MB.bin"
2023/09/29 11:35:24 DEBUG : end/: >Lookup: node=<nil>, err=no such file or directory
2023/09/29 11:35:24 DEBUG : end/: Lookup: name="100MB.bin"
2023/09/29 11:35:24 DEBUG : end/: >Lookup: node=<nil>, err=no such file or directory
2023/09/29 11:35:24 DEBUG : end/: Lookup: name="100MB.bin"
2023/09/29 11:35:24 DEBUG : end/: >Lookup: node=<nil>, err=no such file or directory
2023/09/29 11:35:24 DEBUG : start/: Rename: oldName="100MB.bin", newName="100MB.bin", newDir=end/
2023/09/29 11:35:25 INFO  : start/100MB.bin: Moved (server-side) to: end/100MB.bin
2023/09/29 11:35:25 DEBUG : end/100MB.bin: Updating file with end/100MB.bin 0xc002cf3ec0
2023/09/29 11:35:25 DEBUG : start: Added virtual directory entry vDel: "100MB.bin"
2023/09/29 11:35:25 DEBUG : end: Added virtual directory entry vAddFile: "100MB.bin"
2023/09/29 11:35:25 DEBUG : start/: >Rename: err=<nil>
2023/09/29 11:35:25 DEBUG : end/: Invalidating "100MB.bin"
2023/09/29 11:35:29 DEBUG : /: Attr: 
2023/09/29 11:35:29 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>

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