I need to change my Jenkins 2.89.3 version Home Directory from /Var/lib/jenkins to /app due to space constraints. I need to make sure , all jobs which are using the /var/lib/jenkins directory wont get affected by this migration. how to perform this operation and ran my jenkins job as expected
Current size of /var/lib/jenkins 5.1G
Move all contents to /app/
run jenkins jobs without any issues
Please help in this migration
You can use a symbolic link to do that:
Move all files from /var/lib/jenkins to /app/jenkins
mv /var/lib/jenkins /app/
Replace /var/lib/jenkins with a symbolic link to /app/jenkins
ln -s /app/jenkins /var/lib/jenkins
Start Jenkins again.
That way all the files are actually stored under /app but all paths to /var/lib/jenkins stay valid due to the symbolic link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With