Rsync with ssh on Synology NAS: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * rsync =Overview=")
 
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Rsync#rsync_over_ssh|rsync]]
* [[Rsync#rsync_over_ssh|rsync]]
* [[Synology NAS Procedure Backup on External USB Disk]]


=Overview=
=Overview=
The rsync path on the Synology NAS server has to be explicitly specified with [[Rsync#--rsync-path|--rsync-path]]. This command is executed on a different machine that connects to the Synology NAS server via ssh.
<syntaxhighlight lang='bash'>
rsync [--protect-args] --rsync-path=/usr/syno/bin/rsync -avzhe ssh "root@192.168.1.4:/volume1/base/Software Archive/Windows 10 x64.vmwarevm" ./local-dir
</syntaxhighlight>
To pull content from a Mac (the Mac [[Rsync#Mac|has to have the latest rsync installed]]):
<syntaxhighlight lang='bash'>
sync --protect-args --rsync-path=/usr/local/bin/rsync -avzhe ssh "ovidiu@${mac_ip}:/Users/ovidiu/VMware Fusion VMs/Windows 10 x64.vmwarevm" .
</syntaxhighlight>
To push content to a Mac (the Mac [[Rsync#Mac|has to have the latest rsync installed]]), from the Mac:
<syntaxhighlight lang='bash'>
cd /Users/ovidiu/VMware Fusion VMs
rsync --protect-args --rsync-path=/usr/syno/bin/rsync -avzhe ssh "root@192.168.1.4:/volume1/base/Software Archive/Windows 10 x64.vmwarevm" .
</syntaxhighlight>

Latest revision as of 02:29, 11 September 2021

Internal

Overview

The rsync path on the Synology NAS server has to be explicitly specified with --rsync-path. This command is executed on a different machine that connects to the Synology NAS server via ssh.

rsync [--protect-args] --rsync-path=/usr/syno/bin/rsync -avzhe ssh "root@192.168.1.4:/volume1/base/Software Archive/Windows 10 x64.vmwarevm" ./local-dir

To pull content from a Mac (the Mac has to have the latest rsync installed):

sync --protect-args --rsync-path=/usr/local/bin/rsync -avzhe ssh "ovidiu@${mac_ip}:/Users/ovidiu/VMware Fusion VMs/Windows 10 x64.vmwarevm" .

To push content to a Mac (the Mac has to have the latest rsync installed), from the Mac:

cd /Users/ovidiu/VMware Fusion VMs
rsync --protect-args --rsync-path=/usr/syno/bin/rsync -avzhe ssh "root@192.168.1.4:/volume1/base/Software Archive/Windows 10 x64.vmwarevm" .