Keep files only in remote for Raspi + Plex

What is the problem you are having with rclone?

I want to download files directly to the mounted folder so they upload to remote, but once they get uploaded I don't want them to use local storage (I only got a Rasperry Pi...). Is this done automatically? Is it necessary that I change any settings (like cache)? Also I use it for Plex, so I still need to have the files listed.

What is your rclone version (output from rclone version)

rclone v1.56.2

  • os/version: raspbian 10.11
  • os/kernel: 5.10.63-v7l+ (armv7l)
  • os/type: linux
  • os/arch: arm
  • go/version: go1.16.8
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using?


I have been searching for my question in case it has been already made, but didn't find anything
Hope I did this right! :slight_smile:

hello and welcome to the forum,

assuming that you are using --vfs-cache-mode=full.

if you copy a file direct to mount then once the entire file has finished downloading, rclone will

  • copy the file to the vfs cache
  • upload the file from the vfs cache to the remote
  • remove the file from the vfs cache

the file, if not being accessed, will stay in the cache for a period of time controlled by this setting
--vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s)

1 Like

not sure what i wrote is 100% correct.
to be clear, the file will be downloaded direct to the vfs cache and then uploaded.

Thanks!!! I'll try it now :slight_smile:
Btw, what happens when the cache gets full? I suppose it works as a FIFO

when the cache is full, rclone will removed unused items.
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects. (default 1m0s)

using the default values is usually best but if you want a deeper understanding:

  • shorten the time duration that rclone keeps an object in the cache
    --vfs-cache-max-age=10s --vfs-cache-poll-interval=10s
  • use a log, add -v to the rclone mount command for console output or --log-level=INFO --log-file=/path/to/folder/log.txt to output to a log file.
2021/10/12 14:24:58 INFO  : file.txt: vfs cache: queuing for upload in 5s
2021/10/12 14:25:00 INFO  : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 1, uploading 0, total size 48.672Ki (was 48.672Ki)
2021/10/12 14:25:04 INFO  : file.txt: Copied (new)
2021/10/12 14:25:04 INFO  : file.txt: vfs cache: upload succeeded try #1
2021/10/12 14:25:10 INFO  : file.txt: vfs cache: removed cache file as Removing old cache file not in use
2021/10/12 14:25:10 INFO  : vfs cache RemoveNotInUse (maxAge=10000000000, emptyOnly=false): item file.txt was removed, freed 49840 bytes
2021/10/12 14:25:10 INFO  : vfs cache: cleaned: objects 0 (was 1) in use 0, to upload 0, uploading 0, total size 0 (was 48.672Ki)
2021/10/12 14:25:20 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
  • just curious what is the pi model?
    with rclone, i use a pi4 running ubuntu and and a pizero running raspbian
  • is the vfs cache stored on sdcard or external usb drive?

Mmm okey, thanks again!

I use a pi4 with raspbian buster, because I don't want to overload it and I don't really need any desktop UI
I don't have any external storage attached to the pi, so I only have a 64GB sdcard

64GB not much to work with.

might want to use
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache. (default off)
"If using --vfs-cache-max-size note that the cache may exceed this size for two reasons.
Firstly because it is only checked every --vfs-cache-poll-interval.
Secondly because open files cannot be evicted from the cache."

Since I don't expect to have much traffic I'm not that worried about limiting the cache, but I'll use it just in case. I plan to get some cheap storage to increase the cache and don't relay on 64Gb, but I started with this just two days ago and want to go slowly :slight_smile:

good plan,

for what it is worth
i run ubuntu server 21.04 64 bit, booting from external ssd drive over usb, no sdcard used.
i did install xubuntu desktop, sometimes i remote into the desktop.
runs great

1 Like

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