gistfile1.txt
· 334 B · Text
Bruto
# filter directory based on .gitignore file
--filter=":- .gitignore"
# exclude .git folder
--exclude='/.git'
# run rsync as sudo
--rsync-path="sudo rsync"
# Run rsync as sudo with gitignore and exclude .git folder
rsync -avz --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" LOCAL_FOLDER IP_SERVER:REMOTE_FOLDER
| 1 | # filter directory based on .gitignore file |
| 2 | --filter=":- .gitignore" |
| 3 | |
| 4 | # exclude .git folder |
| 5 | --exclude='/.git' |
| 6 | |
| 7 | # run rsync as sudo |
| 8 | --rsync-path="sudo rsync" |
| 9 | |
| 10 | # Run rsync as sudo with gitignore and exclude .git folder |
| 11 | rsync -avz --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" LOCAL_FOLDER IP_SERVER:REMOTE_FOLDER |