How do I use rsync to transfer files or folders from my Mac to a QNAP NAS?
Last modified date:
2025-09-02
Aplicable Products
- All QNAP NAS models running QTS or QuTS hero
Scenario
You want to transfer files or folders from a macOS computer to your QNAP NAS efficiently and securely using the rsync command in Terminal.
Solution
- Enable SSH on your NAS
- Go to Control Panel > Network & File Services > Telnet/SSH, and select Enable SSH.
- Ensure your NAS user account has SSH login permission. For details, see How do I access my QNAP NAS using SSH?
- On your Mac, open Terminal.
- To copy a single file, enter:
rsync -avh /Users/$USER/Downloads/qlink.jpg admin@192.168.xxx.xxx:/share/Public//Users/$USER/Downloads/qlink.jpg: Path to the file on your Macadmin@192.168.xxx.xxx: Replace with your NAS username and IP address/share/Public/: Destination folder on the NAS
- To copy a folder (e.g., Downloads), enter:
rsync -avh /Users/$USER/Downloads/ admin@192.168.xxx.xxx:/share/Public/- The trailing
/ensures all contents ofDownloadsare included.
- The trailing
- When prompted, enter your NAS account password.
- Your files or folders will appear in the NAS Public folder.
Reminders
- Your NAS account must have write access to the target folder and SSH login permission enabled.
- If you see a
Permission deniederror, confirm your NAS folder permissions and SSH settings. - You can replace
Downloadswith any folder path on your Mac. - If you do not know your NAS IP address, find it at Control Panel > System > System Status > Overview on your NAS.