Raveen Kumar

rsync

Usage

rsync -P source dest

This is the command that I used for syncing this website

# For whatever reason rsync excludes tags directory, so --include used
rsync -av --delete --checksum --copy-links -rPuzhi ./public/ root@raveenkumar.xyz:/var/www/raveenkumar/

Example - Directory mirroring

rsync -PCahzvu --delete $ORIG_PATH/$ORIG_DIR $MIRROR_PATH/.

-P -C: Skip revision control files
-a: Archive 
-h: Human readable
-z: zip
-v: Verbose
-u: Update
--delete: Delete directories and files which  is present in mirror directory but not in original directory.

To exclude

--exclude=”\*/file.txt”

https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux

#Rsync #Linux #Command-Line