Can you use the CLI? 

If so, something like this: 

java -jar jenkins-cli.jar -s https://oldjenkins.yourdomain.com login 
java -jar jenkins-cli.jar -s https://newjenkins.otherdomain.com login 
curl 'https://oldjenkins.yourdomain.com/view/All/api/python?pretty=true' | awk 
-F\" '/name/{print $4}' > testlist.txt 
for job in `cat testlist.txt` ; do 
java -jar jenkins-cli.jar -s https://oldjenkins.yourdomain.com get-job $job > 
$job.xml 
java -jar jenkins-cli.jar -s https://newjenkins.otherdomain.com create-job $job 
< $job.xml 
done 

If they have locked down the api entirely on the old server, you might be able 
to do some other html scrape of the all view. 


Patricia Wright 
Sr. MTS, VMware Site Recovery Manager 
[email protected] 
5 Cambridge Center, Cambridge MA 02142 
617.528.7611 Office 

----- Original Message -----

From: "SamiSam" <[email protected]> 
To: [email protected] 
Sent: Friday, February 28, 2014 9:56:42 AM 
Subject: Best practice to copy Jenkins jobs from old instance to new one - 
Different networks - No root access to server - Manual Copying preferred 

Hi there, 

Can someone recommend a way to copy Jenkins jobs from an old server to a new 
one? Unfortunatley, I don't have root access to the old server, so copying the 
directories is not an option. Using a plugin might not be an option either. Can 
this be performed manually? Any help would be greatly appreciated! 

Thanks in advance 



-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected]. 
For more options, visit https://groups.google.com/groups/opt_out . 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to