Changing Jenkins home folder in Fedora

I recently went out of disk space on my Jenkins server and I changed the Jenkins home folder  (which includes workspace and jobs) to a new disk.

First I mounted the new disk (/dev/sdb1) to a folder /jenkins_home

  • We stop Jenkins
 /etc/init.d/jenkins stop 
  •  We change Jenkins home folder to /jenkins_home/home
 usermod -m -d /home/jenkins    jenkins
  • We change the JENKINS_HOME variable  in the file /etc/sysconfig/jenkins

#JENKINS_HOME=/var/lib/jenkins

JENKINS_HOME=/jenkins_home/home

  • Copy the files from previous jenkins home to the new jenkins home
 cp -r /var/lib/jenkins   /jenkins_home/home
  • start jenkins
 /etc/init.d/jenkins start 
Advertisements
This entry was posted in testing and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s