How to restore the setting encrypted by credential plugin?

1,129 views
Skip to first unread message

Ryanivanka

unread,
Sep 7, 2015, 9:37:29 PM9/7/15
to Jenkins Developers
Hi Experts,

I met a problem that I use thinbackup plugin to backup the jenkins home everyday, but if the jenkins server fail and recover, I copy over all the jenkins home, including jobs, many plugin xml configuration and secret files. The Credentails seems not working, like user name and password saved for github, and tokens for github. If I re-input the credentials, I can use the new created ones. But all the old ones which recovered from the backup file are not working, in some error state. 


If I understand it right, all the credential is encrypted with random key. So if we create a new jenkins server, we cannot reuse the credentials by just copy and paste the secret files. Am I right?

If that's the problem, is there any way I can restore the credentials? because I use marathon to re-create jenkins automatically when it fails, if I still need to be notified about this and need to reset all the credential manually, that sounds like a waste of time. 

Thank you for your help.
Ryanivanka

Stephen Connolly

unread,
Sep 8, 2015, 5:32:17 AM9/8/15
to jenkin...@googlegroups.com
when you recreate Jenkins you will need to provide the same seed files. I cannot recall exactly what files are the seed files, but $JENKINS_HOME/secrets would be where they are stored, you would be safe just recreating all files from that directory (but obviously keep the contents of that directory safe or your credentials can be recovered)
 

Thank you for your help.
Ryanivanka

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/89e96e3f-40b5-4b98-8c70-b95aca11f04b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryanivanka

unread,
Oct 8, 2015, 3:16:12 AM10/8/15
to Jenkins Developers
Hi Stephen

I tried to backup all the jenkins home, and re-deploy to a new machine, all the credentials seems to fail, is the key have something related to machine environment? 

Thanks,
Ryanivanka

Jesse Glick

unread,
Oct 8, 2015, 7:57:04 AM10/8/15
to Jenkins Dev
On Thu, Oct 8, 2015 at 3:16 AM, Ryanivanka <sarah...@gmail.com> wrote:
> I tried to backup all the jenkins home, and re-deploy to a new machine, all the credentials seems to fail, is the key have something related to machine environment?

No. Perhaps you missed some files.
Reply all
Reply to author
Forward
0 new messages