Cleanup of bamboo /tmp directory

Can the bamboo /tmp be cleaned up. It takes a lot of space up and we are trying to manage the space on our server. Can we remove these files/folders nightly with a script? Or should we keep everything and move the temp directory via the config files?

2 answers

This widget could not be displayed.

Hi Daniel,

Depending on the way you environment is set up, Bamboo local and remote agents will look for files under the temporary directory. If you don't have them, the same will throw an error/exception.

You can check the option "Clean Working Directory after build" under the miscellaneous tab of your job configurations. This will clear the local copy of the repository available at <bamboo-home>/xml-data/build-dir/ before each build. Please note that this may increase the time taken to run a build but will save space.

Kind regards,
Rafael

Charlie Misonne Community Champion Mar 10, 2016

does this also clear the tmp dir used for a build under /tmp?

No, it only clears the working directory.

This widget could not be displayed.

I don't think Rafael's response answers the question.

The problem is that Bamboo (and its 3rd party tasks) dumps dozens of directories in /tmp (for example, /tmp/npm-81678765765).  These directories on our system are each around 250MB or more, and simply remain in /tmp until it fills up.

This causes issues with builds failing due to "no space left on device".

Best solution at the moment is to write a script that checks which of these directories has no recent files, delete them, and then cross your fingers.

 

EDIT:  And I can confirm that, unfortunately, launching the Bamboo Agent with an alternate temp directory does not solve this problem.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 13 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

66 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you