Rsync Commands
Rsync Commands
Basic copy from folder contents into folder command
rsync -av --progress /source/ /destination/
Copy folder contents into folder and delete destination content
rsync -av --progress --delete /source/ /destination/
Example rsync not to delete existing files (This will leave files in place from source)
rsync -av --ignore-existing --progress /source/ /destination/
Fast rsync copy example
cd /source/; ls -1 | xargs -n1 -P10 -I% rsync -av --progress % /destination/
sync from remote pc to local
rsync -e 'ssh -p <custom_port>' user@remote_host:/path/to/source /path/to/destination
sync from local pc to remote pc
rsync -e 'ssh -p <custom_port>' /path/to/local/source user@remote_host:/path/to/remote/destination