To free up space on C:
, I would like to move my Jenkins data files (specifically the \\jobs
directory) from the default installation directory
Pre Jenkins 2.121
JENKINS_HOME is where Jenkins is installed which is not what you want to change. After you start up Jenkins, go to:
This gives you text fields where you can change the directory for the workspace and builds directories. Those are the two directories that use a good bit of disk space. Note that it will not move history. If you want to move the existing workspaces/etc, you'll need to manually copy them over.
Post 2.121 You have to set properties (not through the UI). The system property to use is jenkins.model.Jenkins.buildsDir.
https://jenkins.io/doc/upgrade-guide/2.121/#ui-option-for-custom-builds-and-workspace-directories-on-the-master-has-been-removed https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties
Another possibility is to move the entire contents of $JENKINS_HOME.
It does not require editing configuration files, and it preserves the build history.
Stop the running service: jenkins.exe stop
Uninstall the service: jenkins.exe uninstall
Copy C:\Jenkins\home to F:\Jenkins\home
Rename C:\Jenkins to something else, keep it as backup.
Go to F:\Jenkins\home
Reinstall the service: jenkins.exe install
Start Jenkins: jenkins.exe start
Enjoy the new disk space!