Rsync, why nested folders?

Hey gents

I have a puzzling situation

I’m syncing data from a Synology NAS to TrueNAS Core.

  • On TrueNAS Core, I enabled an rsync module and called it media.
  • On Synology I am using hyperbackup which uses rsync which should sync to TrueNAS

The issue I am finding is the on TrueNAS I can see /mnt/pool/media/media/ when all I want is for the files from my media folder on the Synology to rsync to /mnt/pool/media/

Why is it creating /mnt/pool/media/media ?

In rsync the trailing slash on the source is significant, if the slash is present it means “sync the files in this directory” if not, it means “sync this directory”

And if you are syncing the directory and the directory is not present in this destination, then it will get created.

If you’re referring to rsync via the command line, yes, however this isn’t the case with rsync on TrueNAS core.

When creating the module, you need to specify the path to the dataset via the gui and it’s set to /mnt/pool/media

Then Synology creates the director media inside /mnt/pool/media resulting in a /mnt/pool/media/media