I built this small tool that allows for continous, safe synchronization using rclone: https://github.com/rhummelmose/rclonesyncservice
It may be of interest to others so thought I’d share.
Great script thanks for sharing!
Does it just run the sync command on a schedule or something then? I wrote a daemon a while ago and posted it:
This will sync when the OS sends a filesystem change notification, as opposed to running every few minutes regardless of whether or not there is anything to sync.
Thanks for sharing, will check it out.
So far my solution was running rclone.cron every minute with checking if its already running and then checking if upload folder contains any files ( that are at least 15 minutes “old” … prevention not to upload some partial files eg while other apps are still copying )
#!/bin/bash if pidof -o %PPID -x "rclone-cron.sh"; then exit 1 fi if find /storage/media-local/* -type f -mmin +15 | read then rclone move .... fi exit
Right, it basically does the same thing as your Bash Ajki. Just with a little more advanced locking and with a different approach to verifying the existence of a mount as well as built in rescheduling to allow it to be run as a service instead of a cron.