Command "cache/expire" is not deleting files in cache dir

What is the problem you are having with rclone?

I am expecting that rclone rc cache/expire remote={subdir-path} withData=true is clearing up my cache.

What is your rclone version (output from rclone version)

rclone v1.47.0

  • os/arch: linux/amd64
  • go version: go1.12.

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

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

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)

rclone rc cache/expire remote=tv_shows withData=true

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2019/07/18 07:28:45 DEBUG : rclone: Version "v1.47.0" starting with parameters ["rclone" "--drive-impersonate" "" "copy" "/tmp/rclone-test-file.txt" "gdrive:/" "-vv"]
2019/07/18 07:28:45 DEBUG : Using config file from "/home/
2019/07/18 07:28:46 DEBUG : rclone-test-file.txt: Couldn't find file - need to transfer
2019/07/18 07:28:47 INFO : rclone-test-file.txt: Copied (new)
2019/07/18 07:28:47 INFO :
Transferred: 13 / 13 Bytes, 100%, 6 Bytes/s, ETA 0s
Errors: 0
Checks: 0 / 0, -
Transferred: 1 / 1, 100%
Elapsed time: 2s

2019/07/18 07:28:47 DEBUG : 6 go routines active
2019/07/18 07:28:47 DEBUG : rclone: Version "v1.47.0" finishing with parameters ["rclone" "--drive-impersonate" "**********" "copy" "/tmp/rclone-test-file.txt" "gdrive:/" "-vv"]

The cache expire command relates to the structure and such in that is stored in the cache. It won't delete the file from the cache as once you copy something, it has to be uploaded. It will delete the chunks that are stored for that file:

Purge a remote from the cache backend. Supports either a directory or a file. Params: - remote = path to remote (required) - withData = true/false to delete cached data (chunks) as well (optional)

What's your mount command you are using? It should upload the file based on the cache-tmp-wait time that is setup.

I'm not using the Offline uploading feature.

Here the mount command:

/usr/bin/rclone mount \
--drive-impersonate ***** \
--config /home/*******/.config/rclone/rclone.conf \
--allow-non-empty \
--allow-other \
--copy-links \
--buffer-size 16M \
--dir-cache-time 4m \
--cache-info-age 5m \
--cache-workers 10 \
--cache-read-retries 20 \
--cache-plex-token ************ \
--cache-plex-url "" \
--cache-chunk-size 16M \
--cache-chunk-total-size 20G \
--cache-db-path /dev/shm2/.cache/rclone/cache-backend \
--cache-db-purge \
--umask 002 \
--fast-list \
--rc \
--user-agent "Mozilla/5.0" \
--verbose \
--verbose \
gdrive: /path/to/mount

The gdrive remote is a combined rclone union and rclone cache.

What are you expecting to happen as the rc command is doing exactly what it's supposed to be doing?

The problem is, after some days plex is getting slower and sluggish. So i was expecting, that the rc command will purge the cache folder.

Maybe in my case I do not need that caching part?

I use plex and do not use the cache at all.

You really want to remove

as that allows for over mounting and hiding things and

doesn't do anything on a mount.

You have your dir-cache-time and info age at really low values so you lose all the value of the caching there.

In general, the cache backend adds value if you require some local storage of chunks but no need for plex.

I will try it without the cache backend. Let's see. Thanks for your inputs.

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