One way sync from Seedbox to local NAS

(Lynton Haggett) #1

Hi all,

I’ve just gotten Syncthing up and running, and I love it. The GUI is great, and it was much easier to set up than alternatives. I have a (maybe niche?) application I’d like to use it for, and I was wondering if it’s possible.

I have a seedbox with torrents on it that’s running Syncthing. After the torrent is finished, it makes a hardlink to a directory and this is then synced to my NAS at home. The seedbox instance of Syncthing is “send only”.

My NAS at home is “receive only”. This works well and I get the remote files locally, but I’d like to fancy it up.

Once I have the file locally, I have a script that moves the file to another directory. I was wondering if it was possible for Syncthing to notice the local file change, then delete the remote hardlink file on my Seedbox?

I’m using hardlinks on the seedbox as I want the torrents to continue seeding and not be deleted.

Is this possible? Am I making this way harder than it needs to be?

Any advice would be great.

Thanks!

(uok) #2

Maybe the REST API or Event API can help you

(ellnic) #3

This may not be perfect but you could also run a cron to automatically remove links of a certain age. Ie, exec a small script that uses find and mtime then rm.

If you knew that all files definitely synced within a week you could use +7 for mtime, for example.

This approach is VERY crude however, and has no ability to check if the file has actually synced. It is very simple though.

#5

If you already move the finished files out of the sync folder on your NAS, why not just set bot ends to send receive, as that folder seems to be only there to transfer files from your box to your NAS?

(Lynton Haggett) #6

I’ll take a look, thanks.

(Lynton Haggett) #7

You’re right. I was overcomplicating things in my head! I didn’t realize “send” was needed to propagate deletion.

(Lynton Haggett) #8

Thanks! I think I’ve worked it out - but this may help if not. Cheers.