In the docs it says that all you have to do is copy the files or folders. But when I do that and then try to restore by restarting the service and using the GUI Manage Jenkins > Reload Configuration from Disk
(btw, is there a way to do this programatically?), only the credentials are restored (they come from credentials.xml which I also copied). No jobs are listed.
Any ideas?
Edit:
I created a directory /var/lib/jenkins/jobs/myjob and inside it I dropped the "config.xml" file. That file used to be in the previous instance of my server, on the same location.
I also dropped the old "credentials.xml" into /var/lib/jenkins. That worked fine, I can see the credentials in the web interface.