From 2a3c6b5cf2ec8fb9c3ae0b1c9c5001d36b3ae3b4 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Fri, 17 Jan 2020 16:18:23 +0000 Subject: [PATCH 1/2] commiting jenkins conf --- backup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 backup.sh diff --git a/backup.sh b/backup.sh new file mode 100755 index 0000000..fc33363 --- /dev/null +++ b/backup.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +jenkis-backup= "cd /var/lib/jenkins" +mv jenkins_backup /home/ec2-user/git_p +git add . +git commit -m "commiting jenkins conf" +git push github + +if [ #? -ne 0 ] ; then +mail -s "back up failed" narenopq@gmail.com +else +mail -s "jenkins backup successful" narenopq@gmail.com +fi +crontab scheduler 00 18 * * * From 766841838d4d8e7ca1d302cfbb574d5482de0867 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Fri, 17 Jan 2020 16:40:09 +0000 Subject: [PATCH 2/2] ading fike to Test repo --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index fc33363..acd77d7 100755 --- a/backup.sh +++ b/backup.sh @@ -4,7 +4,7 @@ jenkis-backup= "cd /var/lib/jenkins" mv jenkins_backup /home/ec2-user/git_p git add . git commit -m "commiting jenkins conf" -git push github +git push github https://github.com/Naen9090/jenkins_backup if [ #? -ne 0 ] ; then mail -s "back up failed" narenopq@gmail.com