Linux/rsync: Backup remote folder into local folder

> rsync -avz -e "ssh -p <ssh port number>" <user>@<remote addr>:<remote path/folder> <local path/folder>
It makes a backup of remote folder in local folder by synchonizing folder content.
Example:

> rsync -avz -e "ssh -p 22000" root@192.168.13.100:/var/www/ /home/myuser/remote_backup_www

it creates a backup of remote folder "192.168.13.100:/var/www" in local folder "/home/myuser/remote_backup_www" using ssh port 22000. if local folder "/home/myuser/remote_backup_www" does not exists, it is created.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.