views:

35

answers:

2

I accidentally deleted some builds for a job that I would have rather kept. I restored the builds on disk from backup, but they still do not show up when I am on the status page for that job.

I have tried both triggering another build for the job and re-starting Hudson.

How can I fully-restore these builds? Is there a DB that Hudson uses to store this type of information?

A: 

Depends what you restored. It sounds like you restored the workspace folder, but this folder is irrelevant for historical information. I would first shut down Hudson and than restore the build folder and the modules folder. Than you can restart Hudson. For more information ask the Hudson project.

Peter Schuetze
I restored the builds folder, not the workspace folder. I am not sure what about my question led you to believe that I restored the workspace folder. Also, I don't see a modules folder anywhere in my hudson tree.
Kevin Crowell
sorry wrong wording. the 'might' is missing. When doing changes to files that are governed by Hudson, you should remember, that hudson probably has the information in memory already. This is at least true for the configuration. So when doing changes to files (except configuration) I would turn Hudson off beforehand.
Peter Schuetze
+2  A: 

Inside your %HUDSON_HOME% directory is a subdirectory called "jobs". Under "jobs" are subdirectories for every project. Inside each one are subdirectories for each build.

You need to make sure that jobs\<projectname> exists, and then copy the missing build directories inside.

Click "Manage Hudson/Reload Configuration From Disk" to make Hudson recognize the newly added builds. Not necessary to restart your servlet container (e.g. Tomcat) if you use one.

William Leara