Media sync - delete source data after sync (dietpi-sync vs. rsync)

To set the scene:
On my dietpi installation, I have radarr, sonarr and transmission, and the Pi has a 500GB external hard drive installed. This will be on 24/7.
I have a main PC where my Plex server is currently installed. It’s my gaming PC so I only turn it on when I want to watch something.

What i want to do is for the files to be downloaded by the Pi and stored on the external hard drive (got this bit working :smiley:), and then when my Plex server comes online (i.e. my main PC), I want the media files to be transferred over to my main PC, and delete them from the RPi.

I did some research and saw that with rsync it’s possible to do this with “rsync --remove-source-files folder/ folder1/” type of command.

I tried to see if this was possible in the dietpi-sync but I don’t think it can do that. It seems to use rsync protocol so maybe it’s a possibility?

Can anyone confirm? is there a custom option that i can add to enable the removal?

Followup: can I install and use rsync alongside a dietpi installation?


many thanks for your request. Currently there is no option inside dietpi-sync to remove files that have been successfully duplicated on the receiving side. Anyway you can use rsync on your own. Because there is just one rsync executable existing. dietpi-sync is using the standard rsync and did not implement anything special. There will be no conflict using it yourself.

Thanks. Will set up some rsync scripts then :slight_smile:

P.s. DietPi rocks