Report this

What is the reason for this report?

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

Posted on January 7, 2018

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]

Thanks.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

Example:

rsync -azp /home/user/public/Shared\ Videos/Movies/ admin@[IP ADDRESS OF YOUR NEW NAS]:[DESTINATION DIRECTORY]

rsync -avzh /home/ root@1.1.1.1:/home/user/

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.