Created
May 11, 2019 20:29
-
-
Save D4R4/3e17ef15e9a73f37408fda9a03091ad8 to your computer and use it in GitHub Desktop.
Rsync with remote site with cron consideration
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
pgrep -cx rsync || sshpass -p 'P@SSW0RD' rsync -avzP -e "ssh -p 4532" root@HOSTNAME:/var/www/dataroot/html/media /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment