Backup, mirrorring, restoring tool. Uses delta transfer algorithm to only send changes instead of whole file, thereby reducing network load.
Syntax: $rsync [options] <source_destination> <remote_destination>;
$rsync -avr --exclude="*.pyc" --exclude="static" remote_host:/opt/backup/ .; # Pulling from remote to local.
$rsync -avr . remote_host:/opt/backup/; # Pushing from local to remote.
-a : archive the contents while synchronizing.
-v : verbose output.
-r : recursive through directories.
-n : dry run.
-h : human readable outputs in STDOUT.
--progress : show sync progress.
$ctags -R --extra=+f --exclude=’static’; # Generate ctags for vim after the rsync.
(vim) :map <C-b> :w<CR>:!rsync -avr localpath remotepath<CR> # Auto rsync to remote on pressing Control+b shortcut in vim.