=== rsync between servers ===
rsync -avzhe ssh --progress directory/ Luke@x.x.x.x:~/
===Custom port:===
rsync -avzh -e "ssh -p 666" --progress directory/ Luke@x.x.x.x:~/
=== Directory Locally ===
rsync -avzh $source_directory $_destination_directory/
=== Exclude Directories Locally ====
The . represents the current directory
rsync -avzh --exclude 'Dir1/' --exclude 'Dir2/' --exclude 'Dir3' --exclude 'Dir4/' . /var/www/vhost/lukeslinux.co.uk/
\\
\\
Need to update
rsync -avn --delete
rsync -avni --delete
rsync -avni --update
\\
\\
\\
-a - archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group
-v - verbose
-r - recursively
-z - compress
-h - human readable output
--progress - show progress report
--include - include only the directories mentioned
--exclude - exclude only the directories mentioned