This is the 18th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021″

❤️ About the author: Hello everyone, I am Xiao Xu Zhu. Java field quality creator 🏆, CSDN blog expert certification 🏆, Huawei Cloud enjoy expert certification 🏆

❤️ technology live, the appreciation

❤️ like 👍 collect ⭐ look again, form a habit

The problem

Jenkins 2.303.1 has some plugins installed and projects created, but in the installation directory, there are only a few simple files

Where is the data stored for some plug-ins and some projects?

The analysis reason

Look at the jenkins.xml configuration file, where a JENKINS_HOME environment variable parameter is configured

 <env name="JENKINS_HOME" value="%LocalAppData%\Jenkins\.jenkins"/>
Copy the code

**%LocalAppData%\Jenkins. Jenkins **

%LocalAppData% the path of this is in

C:\Windows\System32\config\systemprofile\AppData\Local\

The solution

Therefore, you should change the jenkins. XML configuration file and JENKINS_HOME environment variable parameters immediately after the installation is completed. It is not recommended to directly save the JENKINS_HOME configuration file in the system disk C and change it to another disk.

1. Since Jenkins started as a service, the service should be stopped first.

2. Modify the value of the JENKINS_HOME environment variable parameter and save it

Modify the arguments

Modify the pidfile

3. Start Jenkins service again.

4. If Jenkins has been running for a while and you want to change the JENKINS_HOME environment variable, you can. Create a new directory for the JENKINS_HOME environment variable and back up the **%LocalAppData%\Jenkins\ ** directory.

Like this,

Then start from step 1. (It has been verified and feasible)

reference

Jenkins tread pit: blog.csdn.net/liboshi123/…