Mount rclone on startup: systemd simple vs. systemd (auto)mount vs. fstab - performance implications

What is the problem you are having with rclone?

It's not a problem, just a question. At the moment I have my rclone automatically mounted on startup with a systemd service like this:

[Unit]
Description=Mounts a cloud directory for Server backups.
AssertPathIsDirectory=/mnt/cloud/ServerBackups/borg
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
        --config=/root/.config/rclone/rclone.conf \
        --vfs-cache-mode writes \
        --allow-other \
        cloud:/ServerBackups/borg /mnt/cloud/ServerBackups/borg
ExecStop=/bin/fusermount -u /mnt/cloud/ServerBackups/borg
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

This works fine. However, here I read that systemd mount / automount units are recommended. Would it have any performance improvement if I switch from my simple systemd service to a systemd mount / automount unit? Speed is crucial in my scenario. That's why I'm asking. I also read that it's possible to add a line in /etc/fstab. Would this be even faster? Thank you.

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

rclone v1.67.0

  • os/version: debian 11.11 (64 bit)
  • os/kernel: 5.10.0-31-cloud-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: none

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

webdav

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

rclone mount --config=/root/.config/rclone/rclone.conf --vfs-cache-mode writes --allow-other cloud:/ServerBackups/borg /mnt/cloud/ServerBackups/borg

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

[cloud]
type = webdav
url = https://XXX.com
vendor = other
user = XXX
pass = XXX

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

Irrelevant.

Does it say that it is recommended? I would say all depends what you prefer really. Use what is the easiest for you.

What performance you are talking about? Time how long it take to mount? Then maybe yes, depends on your OS. Or mounted remote performance? In that case no difference. Regardless how you get there at the end it is the same mount.

Are you trying to use mount as borg backup destination? This is no very wise I am afraid. You will never know if you cloud backup is consistent or not. Borg will finish giving you OK but some things will be in the cloud and some still in VFS cache.

Much better to borg to local location and sync it to cloud. Or use backup software which directly operates on cloud storage - restic/rustic/kopia etc.

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