Created
July 27, 2016 15:00
-
-
Save kaosf/16e0189970d0babfe66a143853e5abff to your computer and use it in GitHub Desktop.
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
# Clean at first | |
rm -f backup_*.tar.gz | |
URL=https://raw.githubusercontent.com/sue445/jenkins-backup-script/0.1.8/jenkins-backup.sh | |
if type curl; then | |
curl $URL | bash -s /var/lib/jenkins backup_`date +"%Y%m%d%H%M%S"`.tar.gz | |
elif type wget; then | |
wget $URL -O - | bash -s /var/lib/jenkins backup_`date +"%Y%m%d%H%M%S"`.tar.gz | |
else | |
echo "There is neighter curl nor wget." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment