C++ use librclone question

What is the problem you are having with rclone?

  1. The default cache directory of vfs cannot be set, it will only cache under appdata/local/rclone by default. I can't find it in the vfs options.
  2. if I use a temporary fs name to create the mount and will not use it again, is there any way to delete the cache corresponding to this fs.
  3. "vfsOpt":{"DirCacheTime": 30 000 000 000} doesn't seem to work, I set 30 000 000 000 but the file is still there after 30s.

Run the command 'rclone version' and share the full output of the command.

v1.63.1, compile librclone from source,i need rclone run in win7

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

other

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

only use rclone mount

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

ERROR : rc: "config/redacted": error: couldn't find method "config/redacted"

A log from the command that you were trying to run with the -vv flag

I use librlcone and i do not konw how to set log

You should be able to set it as an environment variable. Not incredibly neat, but that should work.

Not via rclone yet.

That is the directory cache time which is held in memory. You want to set the equivalent of

  --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)

Thanks for the reply.Which environment variable should be set

Convert the option name into an environment variable name, so --cache-dir becomes RCLONE_CACHE_DIR

RCLONE_CACHE_DIR not work on windows, rclone still cache on disk C

hi,

that should work, as shown below
please, post a debug log including the top thirty lines.

set RCLONE_CACHE_DIR=d:\tmp\cache && c:\data\rclone\rclone.exe mount wasabi01:zork b:\rclone\mount\zork -vv 
DEBUG : Setting --cache-dir "d:\\tmp\\cache " from environment variable RCLONE_CACHE_DIR="d:\\tmp\\cache "
DEBUG : rclone: Version "v1.67.0" starting with parameters ["c:\\data\\rclone\\rclone.exe" "mount" "wasabi01:zork" "b:\\rclone\\mount\\zork" "-vv"]

Thanks for the reply, but I don't know how librclone sets up the debug log, I am using librclone instead of rclone.exe.

You need to set logging up, eg the equivalent of this but via librclone

rclone rc options/set --json '{"main": {"LogLevel": "DEBUG"}}'

I think there is a known issue with setting logging via librclone, which may be a one-line fix:

I'd forgotten about that fix.

I changed all the config initialisation recently so optimistically might have fixed it, but more likely the fix needs to change.

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