How to rsync – one way only!
For example you want to rsync “/var/lib/mysql” from “/somefolder/var/lib/mysql”, use the following syntax ( for local folders):
rsync -avz /somefolder/var/lib/mysql/ /var/lib/mysql
(notice the trailing ‘/’ at the end of the source path and the lack of it at the destination path!)
Syntax when source folder is on a remote location:
rsync -avz -e ssh root@somehost.net:/var/lib/mysql/ /var/lib/mysql