How to update cache?

Hi there,

if i want to build up the cache-backend from scratch, how can i do that?

I saw there is vfs/refresh command via rc, but i guess this is for the vfs-cache only? Also i got timeout errors when using vfs/refresh with recursive=true, even when i just have 500 movies in gdrive atm.


What version are you running?
What OS are you running?
What command did you run?
Can you share a log of that command with -vv on it?
What's your mount command you are using?

It should work with the cache backend also.

If you could show a log of what happens that would be very useful.

I am running v1.51 on Ubuntu 20.04.

My config:

type = drive
client_id =
client_secret =
scope = drive.file
token =
root_folder_id = root

type = cache
remote = sdrive:
chunk_size = 10M
info_age = 2d
chunk_total_size = 10G

type = crypt
remote = scache:crypt
filename_encryption = standard
directory_name_encryption = true
password = pw
password2 = pw2

Mount command:
rclone mount scrypt: /mnt/sdrive --fast-list --allow-other --vfs-cache-max-age 1000h --vfs-cache-mode writes --vfs-cache-poll-interval 60s --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 0 --dir-cache-time 96h --rc --rc-addr localhost:5572 --user-agent something --buffer-size 32M --use-mmap --rc-no-auth --vfs-cache-max-size 100G &

Command used to update cache:
rclone -vvv rc vfs/refresh dir=/MOVIES recursive=true --rc-addr=localhost:5572

After about 5min:

rclone -vvv rc vfs/refresh dir=/MOVIES recursive=true --rc-addr=localhost:5572
2020/05/31 08:15:38 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "-vvv" "rc" "vfs/refresh" "dir=/MOVIES" "recursive=true" "--rc-addr=localhost:5572"]
2020/05/31 08:20:38 Failed to rc: connection failed: Post http://localhost:5572/vfs/refresh: net/http: timeout awaiting response headers

When just updating small subfolders, all is ok, but 'Y' just has 5 subfolders:

2020/05/31 08:10:12 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "-vvv" "rc" "vfs/refresh" "dir=/MOVIES/Y" "recursive=true" "--rc-addr=localhost:5572"]
"result": {
2020/05/31 08:10:34 DEBUG : 5 go routines active
2020/05/31 08:10:34 DEBUG : rclone: Version "v1.51.0" finishing with parameters ["rclone" "-vvv" "rc" "vfs/refresh" "dir=/MOVIES/Y" "recursive=true" "--rc-addr=localhost:5572"]

ls -R in /MOVIES is pretty fast

I am still playing around, so thats what i want to change in next step:

Planned changes for config:

type = cache
remote = drive-cache:
chunk_size = 32M
info_age = 720h
chunk_total_size = 100G
plex_url =
plex_username = ...
plex_password = ...
plex_token = ...
(maybe higher total chunk_size ~ 1TB to have more cached chunks on lokal disk? I have a large library, around 4000 movies and 30.000 tv-episodes)

Planned new mount command:
rclone mount scrypt: /mnt/sdrive --allow-other --cache-workers=5 --dir-cache-time 360h --cache-info-age 368h --poll-interval 60m0s --buffer-size 32M --log-level INFO --log-file /mnt/somewhere/rclone.log &

Do you think this might help to get better caching? I want fast playback and maybe good seeking in files aswell.

It is taking too long so the rc times out.


rclone -vvv rc vfs/refresh _async=true dir=/MOVIES recursive=true --rc-addr=localhost:5572

This will return immediately but the refresh will carry on in the background.

That seems to work, thank you. So there will be no notice when update is done?

Any thoughts about my planned changes?

You can also increase the timeout for vfs/refresh via the --timeout parameter if don't want it done in the background.

As default is 1h and it occured after ~5min without _async=true, i dont see why this could help?

It's 5 minutes:

You can query the status of the job with the RC using the job ID - check the docs

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