Copy files between to NAS using SSH and rsync and point to a specific folder on the nas'ses

January 7, 2018 581 views
Linux Commands

How do I point to the right directory in the command line without getting syntax errors?
Eg. The target directory is "Movies", that is a subdirectory to "Shared Videos", that is a subdirectory to "Public". The same question applies to the directory on the source NAS.

The command I want to use is this: rsync -azP [SOURCE DIRECTORY] admin@[IP ADDRESS OF YOUR NEW NAS]:[SOURCE DIRECTORY]


1 Answer

Are you forgetting to escape the white space in "Shared Videos" and remembering that file and folder names are case senstive?


rsync -azp /home/user/public/Shared\ Videos/Movies/ admin@[IP ADDRESS OF YOUR NEW NAS]:[DESTINATION DIRECTORY]
Have another answer? Share your knowledge.