Code Snippet

Just another Code Snippet site

[Bash] Copy local directory to remote server using Rsync and SSH

ssh_identity_file : link to the SSH identification file
user_name : remote user name
remote_hostname : remote hostname /

rsync -e 'ssh -i /path/to/<ssh_identity_file> -l <user_name>' -avrhzO --progress --stats --exclude '*.excluded' /src/DirToBck/ <remote_hostname>:/dst/BckDir/

Identity File : More information
Rsync -avrhzOz option :
Rsync –progress option : Show progress during transfer
Rsync –stats option : Give some file transfer stats

, , , ,


Comments are currently closed.