Rsync

From DikapediaV2
Revision as of 14:24, 11 September 2024 by Ardika Sulistija (talk | contribs) (Created page with " <B>rsync</B> - A fast, versattile, remote (and local) file-copying tool. Like SCP, but faster and you can sync. ==== How to Use Rsync Between Remote and Local Servers ==== ---- Basic SSH format: rsync -avpe '[ssh]' [source] [destination@x.x.x.x:/dir/] To copy from remote server to local host: rsync -avpe "ssh -i /home/user/.ssh/key" user@lo.cal.i.p:/home/user/file /dir/file # Example: rsync -avpe "ssh -i /home/ardika/.ssh/home_vm_key" ardika@192.168.0.2:/hom...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


rsync - A fast, versattile, remote (and local) file-copying tool. Like SCP, but faster and you can sync.


How to Use Rsync Between Remote and Local Servers


Basic SSH format:

rsync -avpe '[ssh]' [source] [destination@x.x.x.x:/dir/]

To copy from remote server to local host:

rsync -avpe "ssh -i /home/user/.ssh/key" user@lo.cal.i.p:/home/user/file /dir/file

# Example: 
rsync -avpe "ssh -i /home/ardika/.ssh/home_vm_key" ardika@192.168.0.2:/home/ardika/Documents/file /tmp/file

To copy from local host to remote server:

rsync -avpe "ssh -i /home/user/.ssh/key" /home/user/file user@rem.ote.i.p:/home/user/file

# Example:
rsync -avpe "ssh -i /home/ardika/.ssh/aws_key_ardika" /home/ardika/Documents/file ardika@3.83.174.147:/home/ardika/Documents/