What is the problem you are having with rclone?
When copying files to a directory mounted by rclone mount, if the file already exists, it cannot be overwritten.
I have a local folder /mnt/clouddrive/root/123pan/rclone-crypt, which is mounted by clouddrive2 (https://www.clouddrive2.com/). Clouddrive2 is a cloud drive management tool that can mount network storage as local folders.
I use rclone to crypt folder /mnt/clouddrive/root/123pan/rclone-crypt, and mount it to /mnt/rclone-clouddrive-123pan-crypt, I can upload new file to /mnt/rclone-clouddrive-123pan-crypt, can delete file, but unable to overwrite file.
Run the command 'rclone version' and share the full output of the command.
rclone v1.67.0
- os/version: debian 11.10 (64 bit)
- os/kernel: 5.10.0-31-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
local storage, but it's mount by CloudDrive2 (https://www.clouddrive2.com/)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone --config=/root/.config/rclone/rclone.conf mount 123pan-clouddrive-crypt:/ /mnt/rclone-clouddrive-123pan-crypt --allow-other --vfs-cache-mode=writes --cache-dir=/mnt/tmp/rclone-clouddrive --dir-cache-time=5m --vfs-cache-max-age=5m --no-modtime --transfers=3 --exclude=Thumbs.db -vv
echo 'aaaaaa' > test.txt
cp test.txt /mnt/rclone-clouddrive-123pan-crypt/home/test/
cp test.txt /mnt/rclone-clouddrive-123pan-crypt/home/test/
Please note that the same cp command was executed twice to test overwriting an existing file.
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[123pan-clouddrive-crypt]
type = crypt
remote = local:/mnt/clouddrive/root/123pan/rclone-crypt
filename_encryption = standard
directory_name_encryption = true
password = XXX
password2 = XXX
[local]
type = local
A log from the command that you were trying to run with the -vv
flag
root@debian:~# rclone --config=/root/.config/rclone/rclone.conf mount 123pan-clouddrive-crypt:/ /mnt/rclone-clouddrive-123pan-crypt --allow-other --vfs-cache-mode=writes --cache-dir=/mnt/tmp/rclone-clouddrive --dir-cache-time=5m --vfs-cache-max-age=5m --no-modtime --transfers=3 --exclude=Thumbs.db -vv
2024/08/01 21:56:11 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "--config=/root/.config/rclone/rclone.conf" "mount" "123pan-clouddrive-crypt:/" "/mnt/rclone-clouddrive-123pan-crypt" "--allow-other" "--vfs-cache-mode=writes" "--cache-dir=/mnt/tmp/rclone-clouddrive" "--dir-cache-time=5m" "--vfs-cache-max-age=5m" "--no-modtime" "--transfers=3" "--exclude=Thumbs.db" "-vv"]
2024/08/01 21:56:11 DEBUG : Creating backend with remote "123pan-clouddrive-crypt:/"
2024/08/01 21:56:11 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/08/01 21:56:12 DEBUG : Creating backend with remote "local:/mnt/clouddrive/root/123pan/rclone-crypt"
2024/08/01 21:56:12 DEBUG : fs cache: renaming cache item "local:/mnt/clouddrive/root/123pan/rclone-crypt" to be canonical "/mnt/clouddrive/root/123pan/rclone-crypt"
2024/08/01 21:56:12 DEBUG : fs cache: switching user supplied name "local:/mnt/clouddrive/root/123pan/rclone-crypt" for canonical name "/mnt/clouddrive/root/123pan/rclone-crypt"
2024/08/01 21:56:12 INFO : Encrypted drive '123pan-clouddrive-crypt:/': poll-interval is not supported by this remote
2024/08/01 21:56:12 DEBUG : vfs cache: root is "/mnt/tmp/rclone-clouddrive"
2024/08/01 21:56:12 DEBUG : vfs cache: data root is "/mnt/tmp/rclone-clouddrive/vfs/123pan-clouddrive-crypt"
2024/08/01 21:56:12 DEBUG : vfs cache: metadata root is "/mnt/tmp/rclone-clouddrive/vfsMeta/123pan-clouddrive-crypt"
2024/08/01 21:56:12 DEBUG : Creating backend with remote "/mnt/tmp/rclone-clouddrive/vfs/123pan-clouddrive-crypt//"
2024/08/01 21:56:12 DEBUG : fs cache: renaming cache item "/mnt/tmp/rclone-clouddrive/vfs/123pan-clouddrive-crypt//" to be canonical "/mnt/tmp/rclone-clouddrive/vfs/123pan-clouddrive-crypt"
2024/08/01 21:56:12 DEBUG : Creating backend with remote "/mnt/tmp/rclone-clouddrive/vfsMeta/123pan-clouddrive-crypt//"
2024/08/01 21:56:12 DEBUG : fs cache: renaming cache item "/mnt/tmp/rclone-clouddrive/vfsMeta/123pan-clouddrive-crypt//" to be canonical "/mnt/tmp/rclone-clouddrive/vfsMeta/123pan-clouddrive-crypt"
2024/08/01 21:56:12 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/08/01 21:56:12 DEBUG : Encrypted drive '123pan-clouddrive-crypt:/': Mounting on "/mnt/rclone-clouddrive-123pan-crypt"
2024/08/01 21:56:12 DEBUG : : Root:
2024/08/01 21:56:12 DEBUG : : >Root: node=/, err=<nil>
2024/08/01 21:56:27 DEBUG : /: Lookup: name="home"
2024/08/01 21:56:27 DEBUG : /: >Lookup: node=home/, err=<nil>
2024/08/01 21:56:27 DEBUG : home/: Attr:
2024/08/01 21:56:27 DEBUG : home/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:56:27 DEBUG : home/: Lookup: name="test"
2024/08/01 21:56:28 DEBUG : home/: >Lookup: node=home/test/, err=<nil>
2024/08/01 21:56:28 DEBUG : home/test/: Attr:
2024/08/01 21:56:28 DEBUG : home/test/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:56:28 DEBUG : /: Lookup: name="home"
2024/08/01 21:56:28 DEBUG : /: >Lookup: node=home/, err=<nil>
2024/08/01 21:56:28 DEBUG : home/: Attr:
2024/08/01 21:56:28 DEBUG : home/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:56:28 DEBUG : home/test/: Lookup: name="test.txt"
2024/08/01 21:56:29 DEBUG : home/test/: >Lookup: node=<nil>, err=no such file or directory
2024/08/01 21:56:29 DEBUG : /: Lookup: name="home"
2024/08/01 21:56:29 DEBUG : /: >Lookup: node=home/, err=<nil>
2024/08/01 21:56:29 DEBUG : home/: Attr:
2024/08/01 21:56:29 DEBUG : home/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:56:29 DEBUG : home/: Lookup: name="test"
2024/08/01 21:56:29 DEBUG : home/: >Lookup: node=home/test/, err=<nil>
2024/08/01 21:56:29 DEBUG : home/test/: Attr:
2024/08/01 21:56:29 DEBUG : home/test/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:56:29 DEBUG : home/test/: Lookup: name="test.txt"
2024/08/01 21:56:29 DEBUG : home/test/: >Lookup: node=<nil>, err=no such file or directory
2024/08/01 21:56:29 DEBUG : home/test/: Create: name="test.txt"
2024/08/01 21:56:29 DEBUG : home/test/test.txt: Open: flags=O_WRONLY|O_CREATE|O_EXCL
2024/08/01 21:56:29 DEBUG : home/test/test.txt: newRWFileHandle:
2024/08/01 21:56:29 DEBUG : home/test/test.txt(0xc0009344c0): openPending:
2024/08/01 21:56:29 DEBUG : home/test/test.txt: vfs cache: truncate to size=0 (not needed as size correct)
2024/08/01 21:56:30 DEBUG : home/test: Added virtual directory entry vAddFile: "test.txt"
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): >openPending: err=<nil>
2024/08/01 21:56:30 DEBUG : home/test/test.txt: >newRWFileHandle: err=<nil>
2024/08/01 21:56:30 DEBUG : home/test: Added virtual directory entry vAddFile: "test.txt"
2024/08/01 21:56:30 DEBUG : home/test/test.txt: >Open: fd=home/test/test.txt (rw), err=<nil>
2024/08/01 21:56:30 DEBUG : home/test/: >Create: node=home/test/test.txt, handle=&{home/test/test.txt (rw)}, err=<nil>
2024/08/01 21:56:30 DEBUG : home/test/test.txt: Attr:
2024/08/01 21:56:30 DEBUG : home/test/test.txt: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: Write: len=7, offset=0
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): _writeAt: size=7, off=0
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): >_writeAt: n=7, err=<nil>
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: >Write: written=7, err=<nil>
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: Flush:
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): RWFileHandle.Flush
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: >Flush: err=<nil>
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: Release:
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): RWFileHandle.Release
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): close:
2024/08/01 21:56:30 DEBUG : home/test/test.txt: vfs cache: setting modification time to 2024-08-01 21:56:30.00288 +0800 CST m=+18.096123901
2024/08/01 21:56:30 INFO : home/test/test.txt: vfs cache: queuing for upload in 5s
2024/08/01 21:56:30 DEBUG : home/test/test.txt(0xc0009344c0): >close: err=<nil>
2024/08/01 21:56:30 DEBUG : &{home/test/test.txt (rw)}: >Release: err=<nil>
2024/08/01 21:56:35 DEBUG : home/test/test.txt: vfs cache: starting upload
2024/08/01 21:56:35 DEBUG : preAllocate: got error on fallocate, trying combination 1/2: operation not supported
2024/08/01 21:56:35 DEBUG : preAllocate: got error on fallocate, trying combination 2/2: operation not supported
2024/08/01 21:56:35 DEBUG : home/test/test.txt.nujojuz7.partial: md5 = dcd8f0981865611d25bb64aca3207972 OK
2024/08/01 21:56:35 DEBUG : home/test/test.txt.nujojuz7.partial: renamed to: home/test/test.txt
2024/08/01 21:56:35 INFO : home/test/test.txt: Copied (new)
2024/08/01 21:56:35 DEBUG : home/test/test.txt: vfs cache: fingerprint now "7,2024-08-01 13:56:35.0109185 +0000 UTC"
2024/08/01 21:56:35 DEBUG : home/test/test.txt: vfs cache: writeback object to VFS layer
2024/08/01 21:56:35 DEBUG : home/test: Added virtual directory entry vAddFile: "test.txt"
2024/08/01 21:56:35 INFO : home/test/test.txt: vfs cache: upload succeeded try #1
2024/08/01 21:57:04 DEBUG : /: Lookup: name="home"
2024/08/01 21:57:04 DEBUG : /: >Lookup: node=home/, err=<nil>
2024/08/01 21:57:04 DEBUG : home/: Attr:
2024/08/01 21:57:04 DEBUG : home/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:57:04 DEBUG : home/: Lookup: name="test"
2024/08/01 21:57:04 DEBUG : home/: >Lookup: node=home/test/, err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/: Attr:
2024/08/01 21:57:04 DEBUG : home/test/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Attr:
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >Attr: a=valid=1s ino=0 size=7 mode=-rw-r--r--, err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Open: flags=OpenWriteOnly
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Open: flags=O_WRONLY
2024/08/01 21:57:04 DEBUG : home/test/test.txt: newRWFileHandle:
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >newRWFileHandle: err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >Open: fd=home/test/test.txt (rw), err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >Open: fh=&{home/test/test.txt (rw)}, err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Setattr: a=Setattr [ID=0x24 Node=0x4 Uid=0 Gid=0 Pid=1705] size=0 handle=INVALID-0x0 lockowner
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Truncating 1 file handles
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): openPending:
2024/08/01 21:57:04 DEBUG : home/test/test.txt: vfs cache: checking remote fingerprint "7,2024-08-01 13:56:35.0109185 +0000 UTC" against cached fingerprint "7,2024-08-01 13:56:35.0109185 +0000 UTC"
2024/08/01 21:57:04 DEBUG : home/test/test.txt: vfs cache: truncate to size=7 (not needed as size correct)
2024/08/01 21:57:04 DEBUG : home/test: Added virtual directory entry vAddFile: "test.txt"
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): >openPending: err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: vfs cache: truncate to size=0
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >Setattr: err=<nil>
2024/08/01 21:57:04 DEBUG : home/test/test.txt: Attr:
2024/08/01 21:57:04 DEBUG : home/test/test.txt: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: Write: len=7, offset=0
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): _writeAt: size=7, off=0
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): >_writeAt: n=7, err=<nil>
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: >Write: written=7, err=<nil>
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: Flush:
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): RWFileHandle.Flush
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: >Flush: err=<nil>
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: Release:
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): RWFileHandle.Release
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): close:
2024/08/01 21:57:04 DEBUG : vfs cache: looking for range={Pos:0 Size:7} in [{Pos:0 Size:7}] - present true
2024/08/01 21:57:04 DEBUG : home/test/test.txt: vfs cache: setting modification time to 2024-08-01 21:57:04.19704 +0800 CST m=+52.290283801
2024/08/01 21:57:04 INFO : home/test/test.txt: vfs cache: queuing for upload in 5s
2024/08/01 21:57:04 DEBUG : home/test/test.txt(0xc0009346c0): >close: err=<nil>
2024/08/01 21:57:04 DEBUG : &{home/test/test.txt (rw)}: >Release: err=<nil>
2024/08/01 21:57:09 DEBUG : home/test/test.txt: vfs cache: starting upload
2024/08/01 21:57:12 DEBUG : vfs cache RemoveNotInUse (maxAge=300000000000, emptyOnly=false): item home/test/test.txt not removed, freed 0 bytes
2024/08/01 21:57:12 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 0, uploading 1, total size 7 (was 7)
2024/08/01 21:57:13 DEBUG : home/test/test.txt.fahatew8.partial: md5 = 5343cf6aa0a56b352a3abe9a1f718a6d OK
2024/08/01 21:57:13 DEBUG : msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/fm2g8ejr81ml5d53uva03uqiqtjv8fdatd56pfsqic45t69g4oa0: Can't move: rename /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/fm2g8ejr81ml5d53uva03uqiqtjv8fdatd56pfsqic45t69g4oa0 /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/00uptbicmald8inthga4k2ln6o: state not recoverable: trying copy
2024/08/01 21:57:13 ERROR : home/test/test.txt.fahatew8.partial: partial file rename failed: can't move object - incompatible remotes
2024/08/01 21:57:13 INFO : home/test/test.txt.fahatew8.partial: Removing failed copy
2024/08/01 21:57:13 ERROR : home/test/test.txt: vfs cache: failed to upload try #1, will retry in 10s: vfs cache: failed to transfer file from cache to remote: can't move object - incompatible remotes
2024/08/01 21:57:23 DEBUG : home/test/test.txt: vfs cache: starting upload
2024/08/01 21:57:23 DEBUG : home/test/test.txt.xihotur5.partial: md5 = 0ee152ca120ba3863c4b2cbb2e008a36 OK
2024/08/01 21:57:23 DEBUG : msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/94uo5kd4tja594k64lak56biuf99iveslftj679j107j2nv1ov7g: Can't move: rename /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/94uo5kd4tja594k64lak56biuf99iveslftj679j107j2nv1ov7g /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/00uptbicmald8inthga4k2ln6o: state not recoverable: trying copy
2024/08/01 21:57:23 ERROR : home/test/test.txt.xihotur5.partial: partial file rename failed: can't move object - incompatible remotes
2024/08/01 21:57:23 INFO : home/test/test.txt.xihotur5.partial: Removing failed copy
2024/08/01 21:57:23 ERROR : home/test/test.txt: vfs cache: failed to upload try #2, will retry in 20s: vfs cache: failed to transfer file from cache to remote: can't move object - incompatible remotes
2024/08/01 21:57:43 DEBUG : home/test/test.txt: vfs cache: starting upload
2024/08/01 21:57:43 DEBUG : home/test/test.txt.saredej0.partial: md5 = 162d4920a545324265c461b5c0948587 OK
2024/08/01 21:57:43 DEBUG : msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/ep8lrk0qoboethrqeq24peq2sb9r6ndmvvb09r6d2mi7t4v7q8a0: Can't move: rename /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/ep8lrk0qoboethrqeq24peq2sb9r6ndmvvb09r6d2mi7t4v7q8a0 /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/00uptbicmald8inthga4k2ln6o: state not recoverable: trying copy
2024/08/01 21:57:43 ERROR : home/test/test.txt.saredej0.partial: partial file rename failed: can't move object - incompatible remotes
2024/08/01 21:57:43 INFO : home/test/test.txt.saredej0.partial: Removing failed copy
2024/08/01 21:57:43 ERROR : home/test/test.txt: vfs cache: failed to upload try #3, will retry in 40s: vfs cache: failed to transfer file from cache to remote: can't move object - incompatible remotes
2024/08/01 21:58:12 DEBUG : vfs cache RemoveNotInUse (maxAge=300000000000, emptyOnly=false): item home/test/test.txt not removed, freed 0 bytes
2024/08/01 21:58:12 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 1, uploading 0, total size 7 (was 7)
2024/08/01 21:58:23 DEBUG : home/test/test.txt: vfs cache: starting upload
2024/08/01 21:58:27 DEBUG : home/test/test.txt.dizomix4.partial: md5 = 50d185e8c47951136c21fb0b06867470 OK
2024/08/01 21:58:27 DEBUG : msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/fro1pl3unmvh6tic1d7ncdm5uvh2oh2borovugsgvot41gi1cilg: Can't move: rename /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/fro1pl3unmvh6tic1d7ncdm5uvh2oh2borovugsgvot41gi1cilg /mnt/clouddrive/root/123pan/rclone-crypt/msfjapbhoqi8k6907drknjgfsk/ah7odra6sfs42mti807384edg0/00uptbicmald8inthga4k2ln6o: state not recoverable: trying copy
2024/08/01 21:58:27 ERROR : home/test/test.txt.dizomix4.partial: partial file rename failed: can't move object - incompatible remotes
2024/08/01 21:58:27 INFO : home/test/test.txt.dizomix4.partial: Removing failed copy
2024/08/01 21:58:27 ERROR : home/test/test.txt: vfs cache: failed to upload try #4, will retry in 1m20s: vfs cache: failed to transfer file from cache to remote: can't move object - incompatible remotes