service jenkins stop
压缩包:tar -czvf /tmp/xx.tar.gz --exclude=“workspace” --exclude=“.m2" --exclude=builds /var/lib/jenkins
Copy over xx.tar.gz to the fresh jenkins server. Adjust your systems paths configuration.
/etc/init.d/jenkins stop
解压包:tar -xvzf xx.tar.gz