I would like help on how to set my rclone so that whenever I restart my server it automatically mounts. I tried several tutorials without success.
Run the command 'rclone version' and share the full output of the command.
rclone v1.69.1
os/version: almalinux 8.10 (64 bit)
os/kernel: 4.18.0-553.33.1.el8_10.x86_64 (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.24.0
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Mega
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount mega:/BKP-Sites/educative-sites /bkp --cache-db-purge --vfs-cache-mode writes -P -v -l
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[mega]
type = mega
user = XXX
pass = XXX
[root@vmi2492323 ~]# mount -a
mount: /etc/fstab: parse error at line 14 -- ignored
[root@vmi2492323 ~]#
Why, what's the difference?
(honest question, I don't know, I only know the bare minima to run the services I want to run and when they run successfully I tend not to touch them )
Notify let's systemd know when the mount has actually started up rather than simple, which reports 'ready' once the process is started. Just a little cleaner.
I used systemd and cleanly shut down all my services and built depdencies with systemd to ensure things started in the proper order and shutdown if rclone had an issue.
If you already have something that works properly for your specific setup and meets your needs, use that. If you want to use systemd, you'd want to use notify over simple since that helps latter services start not when the process is started, but when the mount reports that it's ready.
I tended to use the easiest approach for things that worked for me. Rather than writing a script, I used system and how it works.
Thank you, this is very helpful. I had some issues where an rclone mount didn't come on fast enough and the docker service relying on it went nuts (Immich), but I solved it with 'requires' etc in systemd unit files. However, I will not look into these types as well, sounds like 'notify' can make it even more robust.
Could you help me create a service based on the information I have? I'm using AlmaLinux 8 for my servers, but I don't have much knowledge about systemd. I'm just starting to learn and am a beginner at this.
I suggest you hit Google. There is plenty of information there including examples. Both about systemd itself and about using it to mount rclone remotes. Educate yourself, experiment and enjoy learning new things.
[root@srvbr system]# systemctl status rclone.service
● rclone.service - Mega
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2025-03-11 08:25:46 -03; 4s ago
Process: 186518 ExecStart=/usr/bin/rclone mount mega:/BKP-Sites/rockmedia /bkp (code=exited, status=1/FAILURE)
Main PID: 186518 (code=exited, status=1/FAILURE)
Mar 11 08:25:46 srvbr.rockmedia.com.br systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
Mar 11 08:25:46 srvbr.rockmedia.com.br systemd[1]: rclone.service: Failed with result 'exit-code'.
[root@srvbr system]#
Hello, yes now it is working correctly starting services
I have this error below, how can I solve it? Backups are not going to the remote, correct?
Mar 11 10:12:04 srvbr rclone[280119]: ERROR : IO error: failed to copy to temporary spool file: write /tmp/rclone-spool2581463334: no space left on device
Mar 11 10:13:35 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesendeski.tar.gz: WriteFileHandle.New Rcat failed: failed to copy to temporary spool file: write /tmp/rclone-spool1048567161: no space left on device
Mar 11 10:13:35 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Write error: io: read/write on closed pipe
Mar 11 10:13:35 srvbr rclone[280119]: ERROR : IO error: io: read/write on closed pipe
Mar 11 10:13:36 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes
Mar 11 10:13:36 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Flush error: failed to copy to temporary spool file: write /tmp/rclone-spool1048567161: no space left on device
Mar 11 10:13:36 srvbr rclone[280119]: ERROR : IO error: failed to copy to temporary spool file: write /tmp/rclone-spool1048567161: no space left on device
Mar 11 10:15:09 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.New Rcat failed: failed to copy to temporary spool file: write /tmp/rclone-spool3646905151: no space left on device
Mar 11 10:15:09 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Write error: io: read/write on closed pipe
Mar 11 10:15:09 srvbr rclone[280119]: ERROR : IO error: io: read/write on closed pipe
Mar 11 10:15:10 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Write: can't seek in file without --vfs-cache-mode >= writes
Mar 11 10:15:10 srvbr rclone[280119]: ERROR : 2025-03-11/accounts/cafesnn.tar.gz: WriteFileHandle.Flush error: failed to copy to temporary spool file: write /tmp/rclone-spool3646905151: no space left on device
Mar 11 10:15:10 srvbr rclone[280119]: ERROR : IO error: failed to copy to temporary spool file: write /tmp/rclone-spool3646905151: no space left on device
It is also possible to use ~. Might be easier with some foreign keyboard layouts.
~~~
test test
~~~
becomes:
test
Not formatted logs and commands' outputs are very difficult to read. I simply ignore them:) If somebody needs help then should show some effort to make others life easier.
I am absolutely with you on this one, but beginners may not know about all the tools that are available to make others' life easier or the norms around asking for help. Imagine if we have e.g. 13-year-olds here learning by themselves and taking their first steps. Something like the accents or ~ and its functionality in Discourse forums may be something they've never seen or heard before