ridzimeko revised this gist . Go to revision
1 file changed, 4 insertions, 1 deletion
gistfile1.txt
| @@ -8,4 +8,7 @@ | |||
| 8 | 8 | --rsync-path="sudo rsync" | |
| 9 | 9 | ||
| 10 | 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 | |
| 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:/ . | |
ridzimeko revised this gist . Go to revision
No changes
ridzimeko revised this gist . Go to revision
1 file changed, 11 insertions
gistfile1.txt(file created)
| @@ -0,0 +1,11 @@ | |||
| 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 | |