gistfile1.txt
· 499 B · Text
原始文件
# 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
# Run rsync as sudo with multiple paths
rsync -avz -r --files-from=paths.txt --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" mekoworks-ecs:/ .
| 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 |
| 12 | |
| 13 | # Run rsync as sudo with multiple paths |
| 14 | rsync -avz -r --files-from=paths.txt --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" mekoworks-ecs:/ . |