You are on page 1of 2

Prod Environment:

https://jenkins.viasat.com/job/Afterburner_Jenkins/job/phy/job/
app_upgrade_single_sanapp/

To Restore the Job


1. SSH into the Prod Bastion host
2. SSH into the prod Jenkins instantance: ssh wdc1jenkinsp02.hq.corp.viasat.com
3. cd to /jenkins-data/prod-cb/archived_jobs
4. Locate the .cpio file: ls -altr | grep sanapp
5. To restore the job, run the command from the archived_jobs directory:
cpio -ivd < Afterburner_Jenkins^phy^app_upgrade_single_sanapp.1682907068.cpio
6. The output of the command would create a app_upgrade_single_sanapp directory at
the location:
/var/lib/cloudbees-core-cm/jobs/Afterburner_Jenkins/jobs/phy/jobs/
7. Check for app_upgrade_single_sanapp directory. with in the directory check for
config.xml file is copied.
8. Now open the browser and login to Jenkins Prod Environment:
https://jenkins.viasat.com/
9. Go to location of the job folder and append reload:
https://jenkins.viasat.com/job/Afterburner_Jenkins/job/phy/reload
10. You will be prompted with Post is Required (click Post)
11. Refresh your browser and Verify the missing job was restored

Preprod environment -
https://jenkins-pp.viasat.com/job/Afterburner_Jenkins/job/phy/job/
app_upgrade_single_sanapp/

To Restore the Job


1. SSH into the Prod Bastion host
2. SSH into the Preprod Jenkins Instance: ssh wdc1jenkinspp02.hq.corp.viasat.com
3. cd to /jenkins-data/pre-prod-cb/archived_jobs
4. Locate the .cpio file: ls -altr | grep sanapp
5. To restore the job, run the command from the archived_jobs directory:
cpio -ivd < Afterburner_Jenkins^phy^app_upgrade_single_sanapp_test.1656705772.cpio
6. The output of the command would create a app_upgrade_single_sanapp_test
directory at the location:
/var/lib/jenkins/jobs
7. Check for app_upgrade_single_sanapp_test directory. with in the directory check
for config.xml file is copied.
8. We need to copy the app_upgrade_single_sanapp_test directory to
/var/lib/cloudbees-core-cm/jobs/Afterburner_Jenkins/jobs/phy/jobs/
cp -rp /var/lib/jenkins/jobs/app_upgrade_single_sanapp_test /var/lib/cloudbees-
core-cm/jobs/Afterburner_Jenkins/jobs/phy/jobs/
9. Now open the browser and login to Jenkins Pre-Prod Environment: https://jenkins-
pp.viasat.com/
10. Go to location of the job folder and append reload: https://jenkins-
pp.viasat.com/job/Afterburner_Jenkins/job/phy/reload
11. You will be prompted with Post is Required (click Post)
12. Refresh your browser and Verify the missing job was restored

Hi @gomati, we were able to restore the job from Prod environment, but the job from
Pre-prod environment was not archived. instead we found a similar job
app_upgrade_single_sanapp_test and it was archived on July 2022.

https://jenkins.viasat.com/job/Afterburner_Jenkins/job/phy/job/
app_upgrade_single_sanapp/
https://jenkins-pp.viasat.com/job/Afterburner_Jenkins/job/phy/job/
app_upgrade_single_sanapp_test/
To Restore the Job
1. SSH into the test Bastion host
2. SSH into the test Jenkins instantance: ssh wdc1jenkinst01.hq.corp.viasat.com
3. /jenkins-data/test-cb/.snapshot/daily.2024-01-04_0010/archived_jobs
4. To restore the job, run the command from the archived_jobs directory:
cpio -ivd <
Afterburner_Jenkins^InServiceRobots^op_chi_smac_cluster_deploy.1697499420.cpio
6. The output of the command would create a op_chi_smac_cluster_deploy directory at
the location:
/var/lib/cloudbees-core-cm/jobs/Afterburner_Jenkins/jobs/InServiceRobots/jobs/
7. Check for op_chi_smac_cluster_deploy directory. with in the directory check for
config.xml file is copied.
8. Now open the browser and login to Jenkins test Environment:
https://jenkins.test.viasat.com/
9. Go to location of the job folder and append reload:
https://jenkins.test.viasat.com/job/Afterburner_Jenkins/job/InServiceRobots/reload
10. You will be prompted with Post is Required (click Post)
11. Refresh your browser and Verify the missing job was restored

You might also like