Move Jenkins Controller Workspace

Hey everyone I’m new here but have been working with Jenkins now for the past year or so and have really been enjoying it so hello to all fellow Jenkins devs!

I’m currently looking to decouple where artifacts are stored from the system drive to a new larger additional drive that’s already been added. I’ve been looking at some guides online and would like to try and get some more clarification. Currently this is setup on a promox VM using CentOS.

This is the main guide I’ve been looking at:

Does this look correct to you more experienced Jenkins Users?

I’m just concerned because as part of that guide you have to redo the initialAdminPassword setup step.

My question is, will I lose all my current pipeline configs, plugins and nodes that are setup?

If anyone could please advise that would be great!

1 Like

Hello @ldsa and welcome to this community :wave:

I would have done something quick & dirty: just make a symbolic link and move only the workspace to the new drive. :person_shrugging:

The guide you’re looking at is correct in that you can change the Jenkins home directory to store artifacts on a different drive. However, if you’re not careful, you could potentially lose your current pipeline configurations, plugins, and nodes that are already set up.

Here are a few things to keep in mind:

  1. Before making any changes, back up your current Jenkins home directory. This should include your configuration files, plugins, and other important data.
  2. Make sure to follow the steps in the guide carefully. Specifically, when you’re copying your existing Jenkins home directory to the new location, be sure to preserve file permissions and ownership.
  3. After you’ve moved the Jenkins home directory to the new location, you may need to update the Jenkins configuration to point to the new location. This can typically be done by editing the JENKINS_HOME variable in the Jenkins startup script.
  4. When you start Jenkins again, you may be prompted to re-enter the initialAdminPassword. This is normal, and you should be able to retrieve the password from the new Jenkins home directory.

If you follow these steps carefully, you should be able to move your Jenkins home directory to a new location without losing your existing pipeline configurations, plugins, and nodes. However, it’s always a good idea to take extra precautions by backing up your data and testing the changes in a non-production environment before making them in production

1 Like

Hey thanks so much for getting back to me, I did follow your advice but wasn’t able to retain my pipeline configs, nodes and plugins etc but luckilly this was a relatively new setup so wasn’t too much of a pain to re add those bits. It was definitely nice to have the confirmation that the guide was accurate from yourself so thanks for that :+1: