Thanks to CloudBees for providing a great guide on how to migrate Jenkins credentials – makes it dead simple.
1. Stop Jenkins on new server.
new-server # /etc/init.d/jenkins stop
2. Remove the identity.key.enc file on new server:
new-server # rm identity.key.enc
3. Copy secret* and credentials.xml to new server.
current-server # cd /var/lib/jenkins current-server # tar czvf /tmp/credentials.tgz secret* credentials.xml current-server # scp credentials.tgz $user@$new-server:/tmp/
new-server # cd /var/lib/jenkins new-server # tar xzvf /tmp/credentials.tgz -C ./
4. Start Jenkins.
new-server # /etc/init.d/jenkins start
RE: https://support.cloudbees.com/hc/en-us/articles/115001634268-How-to-migrate-credentials-to-a-new-Jenkins-instance-
Leave a Reply