Does rclone mount flush writes on exit?

What is the problem you are having with rclone?

I am considering using rclone mount on an on-demand VPS with no persistent storage to create a persistent storage mount.

When the machine shuts down gracefully and rclone mount exits, I am wondering if rclone mount will flush its write cache or if there is a way to send a signal to force it to do that.

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

rclone v1.68.1

  • os/version: ubuntu 24.04 (64 bit)
  • os/kernel: 6.8.0-36-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.23.1
  • go/linking: static
  • go/tags: none

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

Tigris

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

rclone mount

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

; empty config

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

N/A

welcome to the forum,

rclone cannot do that.
one workaround, use systemd to run a script at shutdown.


check out my summary of the rclone's two vfs caches.
https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34

Thanks. What would the script do, though?

  • add --rc to the mount command to enable rclone remote control interface
  • check the docs about uploadsQueued from vfs-stats

so, in psudeo code

while True:
   stats=read_vfsstats()
   if stats[uploadsQueued] == 0: break
   sleep(60)

there are a bunch of ways to read the vfs-stats as a json object
from the command line, can run rclone rc vfs/stats