I lost all the jobs folders and configurations on Jenkins dashboard after restarts my Jenkins ubuntu server. But I can see the jobs and all in server at jenkins home path. How can I restore all the jobs on Jenkins dashboard or UI?

I lost all the jobs folders and configurations on Jenkins dashboard after restarts my Jenkins ubuntu server. But I can see the jobs and all in server at jenkins home path. How can I restore all the jobs on Jenkins dashboard or UI?

This on priority. Please help me.

Thanks,
Naveen

If the files are still there, then confirm that the setting of the Jenkins home directory matches what you expect. “Manage Jenkins” → “Setttings” displays it as the first item on the page, under the heading “Home directory”.

Mine looks like this:

jenkins-home

Jenkins home directory is correct (/var/lib/jenkins) but can’t see any jobs

You could use the Jenkins script console (“Manage Jenkins” → “Script console”) to show the files in the Jenkins home directory and their permissions with a command like:

println "ls -altr /var/lib/jenkins".execute().text

When I run that command on my Jenkins controller with my Jenkins home directory, it reports the contents of the directory as expected, with all files and directories owned by the user jenkins with permissions as expected.