"Move" a job from a Linux master to a Windows master

175 views
Skip to first unread message

Steve K

unread,
Mar 31, 2014, 2:24:10 PM3/31/14
to jenkins...@googlegroups.com
Hello,

I'd like to bring along all of the job's history.
Is there any way I can move a job from a Linux master to a Windows master?
The Linux master is being decommissioned.

Thanks in advance.

Steve K.

Daniel Beck

unread,
Mar 31, 2014, 2:53:43 PM3/31/14
to jenkins...@googlegroups.com
It should suffice to just copy the files over to another Jenkins instance, and restart it. Make sure all plugins used in the job are available in compatible versions.

Since you're switching OSes, you might need to delete the symbolic links, e.g. build number -> build ID links in the 'builds' directory, or the last* links in the job directory, and have Jenkins recreate them.
> --
> 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 jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Steve K

unread,
Mar 31, 2014, 3:53:16 PM3/31/14
to jenkins...@googlegroups.com, m...@beckweb.net
Thanks Daniel,

I was concerned about how Windows was going to handle the Linux sym-links.
When I copied a job from the Linux disk (shared via Samba) to Windows, Windows turned those sym-links into "real" files and directories.
That probably means I'll have a lot of redundant data.
The job appears to be preserved though--except for the "Job Config History".  That's probably a separate copy.

I'm wondering if there are any other "gotchas".

Regards,

Steve K.


On Monday, March 31, 2014 2:53:43 PM UTC-4, Daniel Beck wrote:
It should suffice to just copy the files over to another Jenkins instance, and restart it. Make sure all plugins used in the job are available in compatible versions.

Since you're switching OSes, you might need to delete the symbolic links, e.g. build number -> build ID links in the 'builds' directory, or the last* links in the job directory, and have Jenkins recreate them.

Steve K

unread,
Mar 31, 2014, 4:13:33 PM3/31/14
to jenkins...@googlegroups.com, m...@beckweb.net
Another problem is that certain aspects of the job continue to behave as if it is still running on Linux.
As shown below, the job attempts to create a sym-link--even though it is now running on Windows (from the Console text):
Started by user anonymous ln builds\lastSuccessfulBuild D:\Jenkins\jobs\testjob\lastSuccessful failed hudson.util.jna.WinIOException: Failed to create a symlink D:\Jenkins\jobs\testjob\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:92) at hudson.Util.createSymlink(Util.java:1084) at hudson.model.Run.createSymlink(Run.java:1784) at hudson.model.Run.updateSymlinks(Run.java:1765) at hudson.model.Run.execute(Run.java:1677) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) ln builds\lastStableBuild D:\Jenkins\jobs\testjob\lastStable failed

Daniel Beck

unread,
Mar 31, 2014, 5:34:29 PM3/31/14
to jenkins...@googlegroups.com, Steve K

On 31.03.2014, at 22:13, Steve K <Steve.K...@CareStream.com> wrote:

> As shown below, the job attempts to create a sym-link--even though it is now running on Windows (from the Console text):

Actually, Windows/NTFS have symbolic links (run 'mklink /?' in cmd). AFAIK, Jenkins uses them if possible.

I'd try to copy the job dir still on Linux, run `find path/to/copied/jobdir -type l -delete` to delete them, and copy only the actual files/folders over to Windows afterwards to see what happens.

> The job appears to be preserved though--except for the "Job Config History". That's probably a separate copy.

Probably in $JENKINS_HOME/config-history or similar. It's again only a matter of copying the files over, might even be possible while Jenkins is running.

Steve K

unread,
Apr 1, 2014, 4:15:19 PM4/1/14
to jenkins...@googlegroups.com, Steve K, m...@beckweb.net
Thanks again Daniel.  Getting rid of the sym-links prior to copying over to Windows does seem to make the target system happier. Cheers!

On Monday, March 31, 2014 5:34:29 PM UTC-4, Daniel Beck wrote:
Reply all
Reply to author
Forward
0 new messages