Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Plan directories on the filesystem that are not in Bamboo's database


I noticed disk space filling up in Bamboo's artifacts directory, mostly due to a very large number of directories beginning with "plan-".  In fact, there are currently 2,419 of these things.

Yet, when I look in the BUILD table in Bamboo's database, at best I can only find 182 builds with that storage tag

bamboo=# SELECT COUNT(*) FROM build WHERE storage_tag LIKE 'plan-%';
(1 row)

Does this mean Bamboo is expiring builds internally, but failing to actually remove the files from the filesystem?

2 answers

1 accepted

Ok, here's one way to clear this up, but it's extremely dangerous., so please understand what you're doing.

  1. Shut Bamboo Down (or at least pause it)
  2. Get the list of plans to be kept from the database with:
    SELECT storage_tag FROM build WHERE storage_tag != '';
  3. Store the above in a text file "dirs_to_preserve.txt", with one directory per line
  4. Add the following to the text file:
  5. Now change '*' to ignore the directories in your text file as follows:
    export GLOBIGNORE=$(paste -s -d : /tmp/dirs_to_preserve.txt
  6. (still in the artifacts directory):  rm -rf -- *

Yep... you read that last one right... this is unspeakably scary.  In my case, I can't even take a backup, as the volume is full, and I have no spares.

Note that some plan names from the database may not exist as directories in the filesystem.

Once I've done the above, then I'll have enough space to make a backup beforehand, and then I can write a script that does this on a regular basis.


I had an answer back from Atlassian Support... apparently this is "as designed".  Bamboo does not delete these folders... you have to delete them manually.

This, in spite of prolific use of the word "delete" in this article:

Suggest an answer

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

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

166 views 0 4
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