Preventing upload of partially extracted files

I’m using Radarr/Sonarr and occasionally running into this issue. Radarr/Sonarr mainly uses hardlinks to make a copy of files to their final destination. In a few occasions my torrent client ruTorrent downloads file packed in .rar files that need to be extracted. Sometimes while being partially extracted Radarr/Sonarr would hardlink them to their final destination. I run an rclone upload script every 5 minute and sometimes rclone would upload these partially extract files. Using --min-age doesn’t help because it uses at modified time which was when the file was modifed by the uploader and does not use created time when is the file was create by the local system. Any solution?

I think you are going to need to change your workflow. Can you get Radarr/Sonarr to extract to a temporary directory and move it into the final directory after?

If you can’t change the path for some reason, you could use a unionfs to make it appear to be the same destination. It would be then written locally and you’d migrate them remotely periodically.

1 Like