It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it safe to delete an agent's folder in xml-data\build-dir\ ?

In the xml-data\build-dir\ folder, there are folders with numbers for names that I believe correspond to each local agent (I have 25 agents, and 25 folders in this directory, one for each agent). I want to clear the contents of this entire working directory on a regular basis. If I delete these agent folders, will the bamboo agents simply create new ones here the next time they need to?

I know there's been discussions about how to clean up the working directory, but this is a question more about how bamboo actually works. Do the agents depend on those folders being there, or will an agent create a folder in xml-data\build-dir\ if the previous one has been deleted?

1 answer

1 vote

What is the exact content of xml-data\build-dir depends on which features you use. From what you wrote, I can infer you have 'concurrent build' functionality turned on and if that's indeed the case, then yes, the folders with numbers for names are related to the local agents (the folder name is actually the agent id)

Now for deleting stuff: it can be done but with caution. The agents will recreate missing directories if necessary, but (and I guess I'm stating the obvious here, but still) you need to be certain that you don't remove folders that are currently in use. In other words this can be done only if you can be absolutely sure that no job is being run on an agent in question.

Other than  that: the xml-data\build-dir folder contains things other than agents' working directories and it is generally not a good idea to remove those. For instance, if you purge repository caches you will take a performance hit the next time Bamboo attempts any Git or Mercurial operation.

Will deleting the contents of build-dir affect Bamboo's reporting?

My gut answer is "yes", because I've seen it happen. My company has a script that clears out old folders from the build-dir directory (folders that are 3+ days old). I notice on our Bamboo dashboard that the meta data is lost for affected plans, and no reporting can be gathered for those builds. However, it isn't clear to me what reporting data is gathered from build-dir. I notice in the builds directory there are "plan-12345" folders that can contain XML meta data. Are these files where reporting is gathered from?

@Marcin Gardias  I've have been facing these issues constantly where all my hard disk spaces are taken up by the bamboo-agent. I'm quite confused on where to start looking to mediate the problem. Do you have any resources handy that I may be able to review in order to begin a clean out/automate a clean out.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

695 views 2 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you