views:

650

answers:

5

I need Backup configuration of Hudson Master systems

Detailed information If a Hudson Master system goes down, we need to be able to bring it back up on a different VM as soon as possible (may be 3 hours). Therefore, I need to develop a way to backup the configuration and resetup a new VM reliabily. can any body let me know best way step by step.

THANKS

+3  A: 

When I was configuring hudson, I had the following setup:

  1. Master node was not used for building - 0 build agents and no tags. This keeps the master directory clean of the workspace stuff. All build artifacts are uploaded to this folder from the slaves, so you're not missing anything important.
  2. Backup the master's root directory, this includes the war file & all build history.
  3. Assign slaves to do the actual building. You can run a slave process on the same machine as the master, just give it a different root directory. Not much need to back this up.

Restoring the server really is just a case of restoring the master configuration directory to a vm and starting it up. If you're running on windows you'll also need to re-install it as a service and do all the things that you needed to do to get hudson to work in the first place (ie, install java). Imaging a working hudson server in this case is a good idea, restoring the master's root directory after restoring the image should bring your hudson up to date to the last backup.

Jim T
A: 

You should be able to make a copy of the ~/.hudson directory on unix or the equivalent on windows and then restore that copy on another machine.

You'll also want to make note of the paths on other builds tools (maven/ant), JDKs, config files for thos build tools (~/.m2/settings.xml) and the like.

I've migrated Hudson from server to server this way.

sal
+5  A: 

Or just use Hudson backup plugin?

Kohsuke Kawaguchi
Do you have any idea to use backup plugin and how i can reproduce exactly same from that point in another server?
A: 

Well I am able to use backup plug in but is there any way to execute automatically that plugin every week.(I don't want to keep hitting backup button every week).If so please let me know. reach sharp859 at gmaaail.com

Thanks! Praveen

sharp
+1  A: 

Hi praveen,

you can configure a build job that does:

"http://<host>:<port>/backup/launchBackup &"

breskeby