Problem:
I have been trying to use rclone mount with a Backup folder in order to work with a programming project and have my work available over multiple devices. I have been using the text editor neovim to edit my files, but I have been running into a problem where there is a conflict between rclone and neovim that has resulted in losing my work.
I will try and explain what happens:
Sometimes when I am working and try to save, neovim will inform me that the file I am editing has been changed since I saved previously. If I save over the original file name, the file disappears, and there is a file remaining with the same contents but ending in a ~.
I was able to partially reproduce the problem with the -vv option set - I have included the log output below. Neovim detected the file had been changed, and gave the following message:
W12: Warning: File "test.py" has changed and the buffer was changed in Vim as well
See ":help W12" for more info.
[O]K, (L)oad File, Load File (a)nd Options:
The most relevant lines of the log file seem to be these:
2025/12/19 18:45:39 DEBUG : Test: Removed virtual directory entry vAddFile: "test.py"
2025/12/19 18:45:39 DEBUG : Test: Removed virtual directory entry vDel: "test.py~"
My guess is that if I try to write the file during the process described in those lines, this causes the issue. (I have not quite been able to reproduce that with the -vv option - sorry!)
Is the problem my use of the --vfs-cache-mode full flag? If removing this will fix my issue that is good - if that is the problem here I would appreciate someone saying that so that I could avoid losing more work.
Rclone version
rclone v1.72.1
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.14.0-37-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.5
- go/linking: static
- go/tags: none
I am using OpenDrive.
I have been using the following command:
rclone mount Backup: ~/OpenDrive/ --vfs-cache-mode full
Output of rclone config redacted:
[Backup]
type = opendrive
username = XXX
password = XXX
Log output:
Here is a (very abridged) log of the mount command log output with the -vv option. I have included only the lines referencing the file in question, and removed duplicate entries of the RemoveNotInUse messages, as they occur with differences only in the time stamp.
2025/12/19 18:37:34 DEBUG : Test/test.py: >Attr: a=valid=1s ino=0 size=30703 mode=-rw-rw-r--, err=<nil>
2025/12/19 18:37:53 DEBUG : OpenDrive root '': vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test/test.py not removed, freed 0 bytes
2025/12/19 18:45:39 DEBUG : Test: Removed virtual directory entry vAddFile: "test.py"
2025/12/19 18:45:39 DEBUG : Test: Removed virtual directory entry vDel: "test.py~"
2025/12/19 18:45:53 DEBUG : OpenDrive root '': vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test/test.py not removed, freed 0 bytes
2025/12/19 19:03:45 DEBUG : Test/: Lookup: name="test.py"
2025/12/19 19:03:45 DEBUG : Test/: >Lookup: node=Test/test.py, err=<nil>
2025/12/19 19:03:45 DEBUG : Test/test.py: Attr:
2025/12/19 19:03:45 DEBUG : Test/test.py: >Attr: a=valid=1s ino=0 size=29110 mode=-rw-rw-r--, err=<nil>
2025/12/19 19:03:45 DEBUG : Test/: Lookup: name="test.py"
2025/12/19 19:03:46 DEBUG : Test/: >Lookup: node=Test/test.py, err=<nil>
2025/12/19 19:03:46 DEBUG : Test/test.py: Attr:
2025/12/19 19:03:46 DEBUG : Test/test.py: >Attr: a=valid=1s ino=0 size=29110 mode=-rw-rw-r--, err=<nil>
2025/12/19 19:03:46 DEBUG : Test/: Lookup: name="test.py"
2025/12/19 19:03:46 DEBUG : Test/: >Lookup: node=Test/test.py, err=<nil>
2025/12/19 19:03:46 DEBUG : Test/test.py: Attr:
2025/12/19 19:03:46 DEBUG : Test/test.py: >Attr: a=valid=1s ino=0 size=29110 mode=-rw-rw-r--, err=<nil>
2025/12/19 19:03:53 DEBUG : OpenDrive root '': vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item Test/test.py not removed, freed 0 bytes