I was using a combo of scripts, mostly form @Animosity022 's github - and It was working great. I had mergerfs with google drive, and a local folder. With a script that moved the local folder every so many minutes, and it worked great!
But I was working on upgrading to sonarr v3, and it worked great except one part.... The new sonarr does not have .partial files, so my exclude file is not valid anymore, so rclone started moving files that were not fully transfered to the /local folder...
Anyone have some ideas on how to prevent rclone from moving files that are currently being edited? (maybe a check on file size and if it changes?) or has anyone have success with rclone move scripts and sonarr v3?
Aren't you using hard links with mergerfs all on the same spot? You shouldn't see any partials at all in the final spot as it copies pretty much instant.
I'm not seeing partials, but the episodes or movies can take abit to move from my download client to /local (in FTP I can watch the size go up, and its a regular .mkv file). But since its an .mkv file and if my script runs while its still moving it would cause errors eventually right?
Here's my script for moving
#!/bin/bash #Check is Lock File exists, if not create it and set trap on exit
if { set -C; 2>/dev/null >~/scripts/rclonemove.lock; }; then
trap "rm -f ~/scripts/rclonemove.lock" EXIT
else
echo "Lock file exists… exiting"
exit
fi #after check
/home/matt/bin/rclone move /home/matt/local/ gdrive:Videos/ --config=/home/matt/.config/rclone/rclone.conf --exclude-from /home/matt/scripts/exclude --delete-empty-src-dirs --fast-list --transfers=20 --checkers=20 --drive-chunk-size=128M --log-file ~/scripts/move.log
So I have google drive mounted @ ~/rdrive - which is merged with ~/local/ in ~/gmedia
I have sonarr read ~/gmedia so it picks up all the episodes I've downloaded.
Then new episodes will ofc show in the ~/local folder, which is automatically uploaded every 10ish minutes to my google drive.
But for some reason when an episode is done downloading via NZBGet, for example, the linking is not instant and I can slowly watch the filesize go up. I can send a vid too if needed
Do they need to be in the same directory for hard linking? All the stuff is on the same hard drive.
~/usenet/downloads are on the same HDD as ~/gmedia. sorry for all the dumb questions
Hard linking works when it's on the same physical disk underneath. Mergerfs allows for using hard links when it's the same disk.
The reason I use megerfs is I can use hard links and keep all my media / programs / everything pointed to /gmedia.
The directory doesn't matter as it's just needs to be on the same physical disk.
So in my case, something might go to /gmedia/torrents/TV/blah.mkv and that links to /gmedia/TV/Show/Blah.mkv
I only exclude anything I don't want to upload as I shared above and that's how I use hard links so when something finishes, it becomes available instantly rather than duplicating disk space.
hmmm maybe I'm trying to do the wrong thing then?
I just want for sonarr to view my google drive for what shows I have downloaded, then have a script move my local stuff to my gdrive. I used mergerfs so it would read my google drive, but not write to my rclone mount (as that causes issues and slowness) - and I just had a script auto upload the local files after.
But the issue I've been having is when a download is complete on say NZBGet, I can see the MKV moving to /local/ via the files size
Episode1.mkv - 500mb
episode1.mkv - 800mb
and rclone will move the file (in theory) even if its being transferred/unzipping to the /local folder, causing incomplete files. Sonarr V2 when it was moving a file named the file .partial till it was completely moved/ changing size
So I was wondering if rclone had a feature to not move/copy files that are being moved.