rsync is an open source tool to transfer and synchronizes file or directory with one way transfer. From local (on the same system) or remote (network or internet).
Basic syntax
From and to local
$ rsync -av -P SOURCEPATH DESTINATIONPATH
To transfer from local to remote
$ rsync -e ssh -av -P -z SOURCEPATH USER@HOST:DESTINATIONPATH
To transfer from remote to local
$ rsync -e ssh -av -P -z USER@HOST:SOURCEPATH DESTINATIONPATH
Notes:
- -a (archive) is to synchronize file or directory recursively and metadata (as date, ownership and permissions)
- v increase verbosity, to display files name being transfer to screen.
- P same like -v but more deep than verbose, is display progress or percentages during a file being transfer.
- -z (compress), compress file data during the transfer to save bandwidth
No comments:
Post a Comment