Last active 1739937534

gistfile1.txt Raw
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
11rsync -avz --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" LOCAL_FOLDER IP_SERVER:REMOTE_FOLDER
12
13# Run rsync as sudo with multiple paths
14rsync -avz -r --files-from=paths.txt --filter=":- .gitignore" --exclude='/.git' --rsync-path="sudo rsync" mekoworks-ecs:/ .