Last active
March 1, 2020 06:22
-
-
Save qichunren/eba241497133e103175f1851fe0a6536 to your computer and use it in GitHub Desktop.
Auto sync source dir to target host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Start rsync daemon ..." | |
for (( ; ; )) | |
do | |
echo "rsync checking ... [ hit CTRL+C to stop]" | |
rsync -az --exclude 'log/' --exclude 'tmp/' --exclude 'public/' --exclude 'node_modules/' --exclude '.git/' --exclude 'Gemfile.lock' --exclude 'yarn.lock' backend_www [email protected]:/home/xxxxxxx/code/ --delete | |
sleep 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment