What is the problem you are having with rclone?
Rclone is fast on creating files but extremly slow creating and removing directories on OneDrive. It takes up to 15s to create or delete an empty directory.
Run the command 'rclone version' and share the full output of the command.
- os/version: debian 11.6 (64 bit)
- os/kernel: 6.0.0-0.deb11.6-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.4
- go/linking: static
- go/tags: none
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> yes
Which cloud storage system are you using?
OneDrive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
backupper@nuc1:~/restic$ time touch test ; time rm test
real 0m0,006s
user 0m0,002s
sys 0m0,001s
real 0m0,001s
user 0m0,001s
sys 0m0,000s
backupper@nuc1:~/restic$ time mkdir test ; time rm -r test
real 0m13,102s
user 0m0,003s
sys 0m0,001s
real 0m22,045s
user 0m0,000s
sys 0m0,004s
The rclone config contents with secrets removed.
[OneDrive]
type = onedrive
token = {"access_token":"1234">
drive_id = "mydrive"
drive_type = personal
rclone mount \
--daemon \
--umask=022 \
--allow-other \
--timeout=1h \
--poll-interval=15s \
--dir-cache-time=120m \
--cache-dir=$HOME/rclone/cache/restic \
--vfs-cache-mode=full \
--vfs-cache-max-size=200G \
--vfs-cache-max-age=12h \
--vfs-cache-poll-interval 5m \
--vfs-read-ahead 1M \
--log-file=$HOME/rclone_mounts/rclone.log \
--log-level DEBUG \
OneDrive:restic $HOME/rclone_mounts/restic
A log from the command with the -vv
flag
2023/02/26 23:52:24 DEBUG : /: Remove: name="test"
2023/02/26 23:52:24 DEBUG : test: Remove:
2023/02/26 23:52:24 DEBUG : test: vfs cache: cancelling writeback (uploading false) 0xc0003e6a80 item 1
2023/02/26 23:52:24 INFO : test: vfs cache: removed cache file as file deleted
2023/02/26 23:52:24 DEBUG : test: vfs cache: removed metadata from cache as file deleted
2023/02/26 23:52:24 DEBUG : : Added virtual directory entry vDel: "test"
2023/02/26 23:52:24 DEBUG : test: >Remove: err=<nil>
2023/02/26 23:52:24 DEBUG : /: >Remove: err=<nil>
2023/02/26 23:52:26 DEBUG : OneDrive root 'restic': Checking for changes on remote
2023/02/26 23:52:40 DEBUG : /: Lookup: name="test"
2023/02/26 23:52:40 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/26 23:52:40 DEBUG : /: Create: name="test"
2023/02/26 23:52:40 DEBUG : test: Open: flags=O_WRONLY|O_CREATE|0x800
2023/02/26 23:52:40 DEBUG : test: newRWFileHandle:
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): openPending:
2023/02/26 23:52:40 DEBUG : test: vfs cache: truncate to size=0 (not needed as size correct)
2023/02/26 23:52:40 DEBUG : : Added virtual directory entry vAddFile: "test"
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): >openPending: err=<nil>
2023/02/26 23:52:40 DEBUG : test: >newRWFileHandle: err=<nil>
2023/02/26 23:52:40 DEBUG : : Added virtual directory entry vAddFile: "test"
2023/02/26 23:52:40 DEBUG : test: >Open: fd=test (rw), err=<nil>
2023/02/26 23:52:40 DEBUG : /: >Create: node=test, handle=&{test (rw)}, err=<nil>
2023/02/26 23:52:40 DEBUG : test: Attr:
2023/02/26 23:52:40 DEBUG : test: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2023/02/26 23:52:40 DEBUG : &{test (rw)}: Flush:
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): RWFileHandle.Flush
2023/02/26 23:52:40 DEBUG : &{test (rw)}: >Flush: err=<nil>
2023/02/26 23:52:40 DEBUG : test: Setattr: a=Setattr [ID=0x20 Node=0x2 Uid=1001 Gid=100 Pid=9208] atime=2023-02-26 23:52:40.82474395 +0100 CET atime=now mtime=2023-02->
2023/02/26 23:52:40 DEBUG : test: vfs cache: setting modification time to 2023-02-26 23:52:40.82474395 +0100 CET
2023/02/26 23:52:40 DEBUG : test: >Setattr: err=<nil>
2023/02/26 23:52:40 DEBUG : test: Attr:
2023/02/26 23:52:40 DEBUG : test: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=<nil>
2023/02/26 23:52:40 DEBUG : &{test (rw)}: Flush:
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): RWFileHandle.Flush
2023/02/26 23:52:40 DEBUG : &{test (rw)}: >Flush: err=<nil>
2023/02/26 23:52:40 DEBUG : &{test (rw)}: Release:
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): RWFileHandle.Release
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): close:
2023/02/26 23:52:40 DEBUG : test: vfs cache: setting modification time to 2023-02-26 23:52:40.82474395 +0100 CET
2023/02/26 23:52:40 INFO : test: vfs cache: queuing for upload in 5s
2023/02/26 23:52:40 DEBUG : test(0xc000bfb900): >close: err=<nil>
2023/02/26 23:52:40 DEBUG : &{test (rw)}: >Release: err=<nil>
2023/02/26 23:52:40 DEBUG : /: Remove: name="test"
2023/02/26 23:52:40 DEBUG : test: Remove:
2023/02/26 23:52:40 DEBUG : test: vfs cache: cancelling writeback (uploading false) 0xc00061d810 item 2
2023/02/26 23:52:40 INFO : test: vfs cache: removed cache file as file deleted
2023/02/26 23:52:40 DEBUG : test: vfs cache: removed metadata from cache as file deleted
2023/02/26 23:52:40 DEBUG : : Added virtual directory entry vDel: "test"
2023/02/26 23:52:40 DEBUG : test: >Remove: err=<nil>
2023/02/26 23:52:40 DEBUG : /: >Remove: err=<nil>
2023/02/26 23:52:41 DEBUG : OneDrive root 'restic': Checking for changes on remote
2023/02/26 23:52:43 DEBUG : /: Lookup: name="test"
2023/02/26 23:52:43 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/26 23:52:43 DEBUG : /: Mkdir: name="test"
2023/02/26 23:52:56 DEBUG : OneDrive root 'restic': Checking for changes on remote
2023/02/26 23:52:57 DEBUG : : Added virtual directory entry vAddDir: "test"
2023/02/26 23:52:57 DEBUG : /: >Mkdir: node=test/, err=<nil>
2023/02/26 23:52:57 DEBUG : test/: Attr:
2023/02/26 23:52:57 DEBUG : test/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/02/26 23:52:57 DEBUG : test/: ReadDirAll:
2023/02/26 23:53:04 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2023/02/26 23:53:04 DEBUG : test/: Attr:
2023/02/26 23:53:04 DEBUG : test/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/02/26 23:53:04 DEBUG : /: Remove: name="test"
2023/02/26 23:53:04 DEBUG : : changeNotify: relativePath="test", type=0
2023/02/26 23:53:04 DEBUG : : invalidating directory cache
2023/02/26 23:53:04 DEBUG : test: invalidating directory cache
2023/02/26 23:53:04 DEBUG : : >changeNotify:
2023/02/26 23:53:11 DEBUG : OneDrive root 'restic': Checking for changes on remote
2023/02/26 23:53:19 DEBUG : : Added virtual directory entry vDel: "test"
2023/02/26 23:53:19 DEBUG : /: >Remove: err=<nil>