Rsync notes
From raju
ignore .git directory and .gitignore
Add this to the rsync command
--exclude='.git/' --exclude='.gitignore'
For example
$ rsync -n -prltvzD --exclude='.git/' --exclude='.gitignore' foo_dir user@destition:/path/to/foo/parent
Ref:-
- https://unix.stackexchange.com/questions/100660/how-to-use-rsync-to-backup-a-directory-without-git-subdirectory
- 6 rsync examples to exclude multiple files and directories
http://www.thegeekstuff.com/2011/01/rsync-exclude-files-and-folders/
tags | copy directory from one machine to another.
use private key
Use
-e "ssh -i path/to/private/key"
For example
rsync -prltvzD -e "ssh -i path/to/private/key" username@hostname:/from/dir /to/dir
Ref:- https://unix.stackexchange.com/questions/127352/specify-identity-file-id-rsa-with-rsync