Files getting lost with rclone mount mounted as a volume of docker

What is the problem you are having with rclone?

I use docker to mount the volume from rclone mount into my instances. But I keep getting issues that my files are lost, seem to be there right when added, but after some time it's gone.

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

❯ rclone version
rclone v1.62.2

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 6.2.12-060212-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using?

Hetzner storage box

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

❯ cat /etc/systemd/system/rclone-mount.service
[Unit]
Description=Rclone mount
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount storagebox:. /mnt/box \
  --config=/home/cae/.config/rclone/rclone.conf \
  --allow-other --allow-root \
  --vfs-cache-mode writes \
  --cache-dir=/var/cache/rclone
ExecStop=/bin/fusermount -uz /mnt/box
Restart=always
RestartSec=10
User=root
Group=root

[Install]
WantedBy=default.target

The rclone config contents with secrets removed.

❯ cat /etc/fuse.conf
user_allow_other

❯ cat ~/.config/rclone/rclone.conf
[storagebox]
type = sftp
host = <host>.your-storagebox.de
user = <host>
port = 23
key_file = /home/user/.ssh/id_rsa
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum

add

--log-file /path/to/rclone.log
--log-level DEBUG

to your mount. Replicate problem and post log here. Then it can be possible to see what is going on.

Maybe this will help.

remove . after remote - unless you really have folder named . - I doubt

ExecStart=/usr/bin/rclone mount storagebox: /mnt/box \

1 Like

I changed --vfs-cache-mode to full and removed the dot. That has fixed it.

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