Help with using vfs/refresh command in windows

What is the problem you are having with rclone?

Could someone help me with the vfs/refresh command for windows? I tried to run it in my terminal but it doesn't seem to do anything. I would like to integrate this into my mount command but i couldn't find out how for windows.

What is your rclone version (output from rclone version)

rclone v1.54.1

  • os/arch: windows/amd64
  • go version: go1.15.8

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10, 64 bit

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

Google Drive

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

mount gdrive: X: --volname Drive_Lezen --read-only --config C:\Plex\Rclone\rclone.conf --cache-dir=C:\Cache --rc --rc-web-gui --rc-user=X --rc-pass=X --rc-serve --rc-addr :5572 --log-file=C:\Plex\Rclone\Logs\lezenlog.txt --size-only --dir-cache-time=96h --cache-db-purge --vfs-cache-mode full
rclone rc vfs/refresh recursive=true --rc-addr :5572 --rc-user=X --rc-pass=X -vv

The rclone config contents with secrets removed.

type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2021-04-20T23:56:48.2256529+02:00"}

A log from the command with the -vv flag

i used -vv but i don't get any output

hi, not sure what the problem is but i would try to simply the mount and the refresh command.

for the mount, remove --rc-web-gui --rc-user=X --rc-pass=X --rc-serve --rc-addr :5572
for the refresh, remove --rc-addr :5572 --rc-user=X --rc-pass=X

also, given your config, this does nothing --cache-db-purge

Can you cut and paste the transcript from the terminal, so what you typed and what the result was?

i looked at it this morning but it seems like i didn't wait a long enough time. I'll try to time how long it takes today.

C:\Plex\Rclone>rclone rc vfs/refresh recursive=true --rc-addr :5573 --rc-user=XXX --rc-pass=XXX -vv
2021/04/20 23:42:41 DEBUG : rclone: Version "v1.54.1" starting with parameters ["rclone" "rc" 
"vfs/refresh" "recursive=true" "--rc-addr" ":5573" "--rc-user=XXX" "--rc-pass=XXX" "-vv"]
    "result": {
            "": "OK"
2021/04/20 23:43:41 DEBUG : 4 go routines active

I forgot to mention that i have 2 seperate mounts, 1 for a google drive and one for a team drive so i think i have to do it this way as i need to differentiate the 2.

I thought that --cache-db-purge removes stuck files from the cache as i noticed that i can't restart a mount and let it show the drive if there are still files in there.

now i get an error that the connection failed. I verified that i can acces that link in my browser so this seems strange. The difference here is that the addres is the one from the other mount so 5572 instead of 5573. 5573 is a team drive and 5572 is a normal google one.

c:\Plex\Rclone>rclone rc vfs/refresh recursive=true --rc-addr :5572 --rc-user=XXX --rc-pass=XXX -vv
2021/04/21 11:06:43 DEBUG : rclone: Version "v1.54.1" starting with parameters ["rclone" "rc"         "vfs/refresh" "recursive=true" "--rc-addr" ":5572" "--rc-user=XXX" "--rc-pass=XXX" "-vv"]
2021/04/21 11:11:43 DEBUG : 2 go routines active
2021/04/21 11:11:43 Failed to rc: connection failed: Post "http://localhost:5572/vfs/refresh": net/http: timeout awaiting response headers

The vfs/refresh can take a long time. If it takes longer than the timeout setting then you'll get the error above. You can increate the timeout with --timeout or you can make an _async task which you don't have to wait for, but it will still execute in the background

rclone rc vfs/refresh _async=true recursive=true --rc-addr :5572 --rc-user=XXX --rc-pass=XXX -

Thank you! I have run the _async command for a while now, but i was wondering how i would know if it works or not. My terminal reports that it starts but as it runs in the background i don't know here to look to check the status? Can i check that somewhere or should i just assume that it works if it starts correctly?

Should i also only run this command when i restart my mount or should i schedule this for a certain interval?

Here is how you check for async job completion.

You can check the logs also.

For vfs/refresh that is a pretty safe assumption. If it goes wrong, nothing will break there will just be unrefreshed stuff.

That is up to you... Stuff will expire out of the cache according to --dir-cache-time=96h so you probably want to do it more often than 96h if you want to keep the cache alive.