User Tools

Site Tools


Sidebar


guides:unix_admin:rsync

rsync

Local:  rsync [OPTION...] SRC... [DEST]

Access via remote shell:
 Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
 Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

Access via rsync daemon:
 Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
       rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
 Push: rsync [OPTION...] SRC... [USER@]HOST::DEST
       rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST

Usages with just one SRC arg and no DEST arg will list the source files instead of copying.

example:

 rsync --progress -zvrae 'ssh -p 22' file.sql.gz 192.168.0.1:/data
  • -z compression
  • -v verbose
  • -r recursive
  • -a archive
  • -e COMMAND specify the remote shell to use
guides/unix_admin/rsync.txt · Last modified: 2010/09/12 00:50 by michaelc