Rsync examples
$ rsync options source destination
Source and destination could be either local or remote. In case of remote, specify the login name, remote server name and location.
rsync archive mode
rsync option -a indicates archive mode. -a option does the following,
- Recursive mode
- Preserves symbolic links
- Preserves permissions
- Preserves timestamp
- Preserves owner and group
rsync files from local to remote
rsync -avz –progress /local/dir/ remoteuser@123.123.0.1:/remote/dir/
While doing synchronization with the remote server, you need to specify username and ip-address of the remote server. You should also specify the destination directory on the remote server. The format is username@machinename:path
rsync files from remote to local
rsync -avz –progress remoteuser@123.123.0.1:/remote/dir/ /local/dir/
Source: thegeekstuff.com
Recent Comments