youngmon/atlassian-qna huggingface dataset:
Bamboo backup restore is too slow
Asked by Roozbeh Shafiee:

Recently I'm upgrading and migrating my current Bamboo server from 6.4 to 6.10.x ! The backup zip file provided by "Import/Export" option from the Bamboo UI and I'm trying to import that into another Bamboo instance. The size of Backup is \~4GB and the restore process on a machine with SSD, 16 GB of RAM and 8 core CPU takes \~14 hours! Due to limitation of timeframe for the migration, how can I speed up the process ?

Thanks


Answers:
author: Daniel Santos
body: Hi [@Roozbeh Shafiee](/t5/user/viewprofilepage/user-id/2691937)

First of all, let me explain why this process is slow. The export feature you are using will get the data from your DB and convert it to a DB independent format (XML) and backup your home directory with it. This process is really slow since every piece of data needs to be converted and then (depending on the configuration used) you will still have the time to pack the home directory. This is necessary when you want to convert your DB data to import it into a clean instance with a **different** DB flavor. I hope that is not your case.  

Assuming you are moving your server to a different machine and keeping the same DB flavor, I would suggest something like:

**1) Replicate the server to the new location**(keeping the version 6.4)

Use the *Alternative cloning scenario* described in this document:

* [Cloning a Bamboo instance](https://confluence.atlassian.com/bamboo/cloning-a-bamboo-instance-289277407.html)

This process will not require an export and will be faster to setup.

**2) Upgrade the server**

Follow the instructions in this document to upgrade your instance:

* [Bamboo upgrade guide](https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html)

The steps above will not require the use of the Bamboo DB export/import feature and should be a lot faster.  

Please, let me know if you have any questions about this.

comments: author: Roozbeh Shafiee
body: Thank you so much [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) for the links and solution!  

after some manual tests and then writing an Ansible playbook for that, it works like a charm and I can migrate/upgrade my Bamboo easily without any pain and blood!

;)


author: Daniel Santos
body: I'm very glad to hear that [@Roozbeh Shafiee](/t5/user/viewprofilepage/user-id/2691937)!  
Better when no pain and blood is involved =\]  

Keep rocking out there!  
Have a good one mate!
"Get-ChildItem env:" error in deployment script: duplicate key?
Asked by Berry de Groot:

My organisation is migrating from Bamboo 6.0.1 to Bamboo 6.8.0 (don't ask why not 6.10). My task is to migrate the build- and deployment projects from the old to the new environment.

In the old environment, we have a powershell script that loops through the environment variables. In order to get the variables, it calls "Get-ChildItem env:". Works like a charm, so I copied the script to the new environment. Unfortunately the script ends up in an error:

Get-ChildItem : An item with the same key has already been added.

When I try to call "Get-ChildItem env:" in the powershell console, the command executes successfully.

The error leads me to this page: <https://github.com/PowerShell/PowerShell/issues/6305>  
which tells me that this error is caused by a duplicate key in the environment variables.

In the deployment output, Bamboo outputs "using extra environment variables:" but there are no duplicates in there.

My conclusion: Bamboo is somehow adding a duplicate (differently cased?) environment variable, which is causing me this problem.

I also looked through the release notes after Bamboo 6.8.0 to see if there is some fix relating environment variables, but nothing seems to point me in the right direction.

Does anyone recognise this behaviour? Any ideas on how to investigate further which key is duplicated and how to solve this or prevent this from happening?


Answers:
author: Prashanth Reddy Annedla
body: Hi [@Berry de Groot](/t5/user/viewprofilepage/user-id/2273164)

Were you able to find any solution/workaround for this issue?


Tags: powershell
Localhost 8085 not opening
Asked by mayankkumar083:

Even after starting the start-bamboo.bat , I am not able to open the link http://localhost:8085/


Answers:
author: Charlie Misonne
body: * What error are you getting in your browser?
* Does your firewall allow connections to port 8085?
* Do you have errors in the log files of Bamboo?
* Any chance you have a context path? Try http://localhost:8085/bamboo
Can we use the same Bamboo license across different machines
Asked by s2zaman:

I have three Bamboo servers installed across three machines. The First machine has original OS, rest of the two machines have OS images from the first one.

Bamboo Servers on all of them have the same **Bamboo Server Id** and each using the same Commercial License key.

The support period has already ended and all the Bamboo Servers are working fine.

My questions:

**Is it legal to use the same Commercial License key on all of them ?**


Answers:
author: Charlie Misonne
body: Are you using the 3 Bamboo instances as a production server?

In that case you are not allowed to use the same license.

See [Atlassian license agreement](https://www.atlassian.com/legal/software-license-agreement#null)
> 3.3. ++Number of Instances++ . Unless otherwise specified in your Order, for each Software license that you purchase, you may install one (1) production instance of the Software on systems owned or operated by you or one of your Authorized Users. We may also make available "developer" licenses free of charge for certain of our Software offerings to allow you to deploy non-production instances, such as for staging or QA purposes. Details for how to request non-production licenses are available on our website.

comments: author: s2zaman
body: Thanks Charlie !


Tags: licence
Upgrading bamboo 6.8.1 to 6.10.3 can't find bamboo.cfg.xml
Asked by Gintohewoo:

I recently updated confluence, jira, and was wrapping up the bamboo upgrade by following the instructions here:

<https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html?_ga=2.233998810.534527813.1570939997-570080728.1550282310>

I did everything as instructed and when I start the instance using ./bin/start-bamboo.sh I get the following when I try to go to the bamboo homepage.

![Bamboo6-10-3StartupIssue.PNG](/t5/image/serverpage/image-id/69267i0DED75AB175E8506/image-size/large?v=v2&px=999 "Bamboo6-10-3StartupIssue.PNG")

I triple checked the configuration file is there, it is owned by bamboo, it is readable and nothing appears wrong. Hopefully someone else has seen this issue and can help me get this fixed, thank you!


Answers:
author: Gintohewoo
body: Looks like this is a problem that results when you launch the ./bin/start-bamboo.sh file as root (or using sudo).

I recommend sudo su \<bamboo_user\> first then running it, this will ensure that all the files in your home directory remain owned by the \<bamboo_user\> and not root.

I had to go through and remove several write.lock files that were owned by root, had to change ownership of several log files and maybe one or two more files that were owned by root then things started working.


Tags: configuration

issue

upgrade
bamboo agent install or start up ignores -Dbamboo.home parameter
Asked by Timothy Will:

I Am running AWS Elastic Windows agents and am trying to create a base AMI with a different build working directory, but everything i do seems to just be ignored and the agent will start with the default directory. any help would be greatly appreciated.

The start up script calls,

"%JAVA_HOME%/bin/java" -Dbamboo.home=C:\\build-dir -Dimagefiles.version=6.5-SNAPSHOT -jar C:\\opt\\bamboo-elastic-agent\\bin\\atlassian-bamboo-agent-elastic-installer.jar \>\>bamboo-elastic-agent.out 2\>\&1

when the agent connects the working directory is C:\\Users\\Bamboo\\bamboo-agent-home\\xml-data\\build-dir

thanks

tim


Answers:
author: Charlie Misonne
body: I don't have any experience with Elastic agents but let me try to help.

Are you running the agent as a Windows service? In that case the java options need to be specified in the service configuration.

Or the easiest way to run an agent as windows service is by using the wrapper script (bin/wrapper.exe) and to use the conf/wrapper.conf file set the java options.  
There is a command to install an agent as a windows service. See [this article](https://confluence.atlassian.com/bamboo/additional-remote-agent-options-436044733.html) (last topic). This will add the java properties to the .conf file.
Does anyone have advice in upgrading bamboo from 5.14 to 6.10?
Asked by Chris Speier:

I am new to Bamboo administration. Does anyone have any upgrade advice for upgrading bamboo from 5.14 to 6.10? Any security issues? Do we need to upgrade bitbucket at the same time?


Answers:
author: Charlie Misonne
body: No need to upgrade Bitbucket at the same time.

You can upgrade Bamboo from v5.14 to 6.10 without intermediate upgrade. See [this article](https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html).

Reading the end of support announcements can be useful. especially for database and JDK compatibility: [End of support announcements for Bamboo](https://confluence.atlassian.com/bamboo/end-of-support-announcements-for-bamboo-289276775.html)
Download last successful build artifact of the same plan currently running
Asked by bh19954:

Hey.

I have a plan that outputs a certain file, and I want it to also download the previous build artifact (of the same plan), compare it to the current one and create a diff as well. (there were previous build to that plan, so that there always will be an artifact existing to compare to).

Problem is, Bamboo keeps trying to locate an artifact produced by the current run, therefore failing because it does not exist at this point.

Any ideas besides using wget or something to download the artifact?

Thanks.


Answers:
author: bh19954
body: For future reference, there are two ways to tackle this.

Either using rest to locate and download the latest successful artifact, or using a a child plan to be triggered and keep the artifacts of the main plan, then download the artifacts from the child plan in the main plan tasks.


author: Charlie Misonne
body: I don't think there is a way to do this without being creating with a wget or similar download command.

The url to the artifact always contains the build ID. Example:

[https://\<your-bamboo\>/browse/PRJ-BLD-144/artifact/shared/myarftifact/]()

You could get the previous ID by using ${bamboo.buildNumber} -1. Of course you should check if that build was succesful first.

comments: author: bh19954
body: I was afraid this was the case.  
Thanks for your help.
Plan Branches Build Not Always Triggered On Relative BitBucket's Repository Change
Asked by Nikolaos Rafail Papadakis:

Hello,

We have multiple Bamboo build plans with the same configuration both in Bamboo and in their relative BitBucket's repo, but we have observed that for some of them the build for their plan branches (default and non-default ones is not automatically triggered when code changes hit the relative repo's branch, despite having set up the needed trigger ("**Bitbucket Server repository triggered**") in the build plan for all of them.

We cannot identify why this keeps happening, since as already mentioned, configuration is the same for all these build plans (coming from bamboo specs project).

This causes significant problems, since we expect plan branches to auto build on BitBucket's branch's change and produce new artifacts with the expected updated content, and if this not happens we end up with outdated/wrong content being produced without being able to easily identify it, unless they are deployed (too late and too bad to happen).

Any ideas about why this keeps happening and what may be the root cause of this case?


Answers:
author: Daniel Santos
body: Hi [@Nikolaos Rafail Papadakis](/t5/user/viewprofilepage/user-id/3070613)

Given the type of problem you are experiencing, we need private data to investigate it further. I opened a support ticket on your behalf to allow this investigation. You should be receiving an email from our support channel about this ticket soon.  

Once the investigation is finished, please take some minutes to share what were your findings here. This will help other users that may lend on this thread.  

Thank you!

comments: author: Nikolaos Rafail Papadakis
body: I've updated the support ticket as requested and I'm now waiting for any feedback.

When we reach any conclusion/solution, I'll update this thread accordingly.

Kind Regards,

Nick


author: Daniel Santos
body: Thank you very much! =\]


author: Daniel Santos
body: Hi [@Nikolaos Rafail Papadakis](/t5/user/viewprofilepage/user-id/3070613)  

Your prior message was somehow categorized as spam. It happened probably because the same message was posted in two different threads. I've cleaned all the attempts you did from our spam queue so it does not try to filter your next comments out =\]  

**Message to foreign users**   
If you are trying to find a conclusion for this thread, please check this other thread where Nikolaos shared his findings:

* <https://community.atlassian.com/t5/Bamboo-questions/Plan-Branches-Not-Always-Created-When-Relative-Branch-Is-Created/qaq-p/1199759>


author: Nikolaos Rafail Papadakis
body: [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) I've just added a similar comment, almost at the same time as yours. :)

Kind Regards,

Nick


author: Daniel Santos
body: If you don't mind I can remove that one. =\]


author: Nikolaos Rafail Papadakis
body: Hello,

Yes, you can remove it if you want, no problem from my side.

Kind Regards,

Nick


author: Daniel Santos
body: Done! =\]
Job limit on starter license
Asked by Daniel Adolfsson:

I'm currently using Bamboo with the starter license, and I'm supposed to have a 10 job limit. I thought that Plan Branches were counted as well, but I've been able to create 13 or so plan branches on this license (the plan having 1 job).

I've been writing a custom integration between my git repository and Bamboo, and I was hoping the API endpoint would fail if I tried to go over the job limit, but it does not.

Is this an error, or is this by design? How is the job limit enforced? Or have they changed how they count jobs?


Answers:
author: Marcin Gardias
body: We've changed the way we count the jobs in Bamboo 6.9. We only count 'unique'\*) jobs and branched jobs are not considered 'unique'.

\*) unique being somewhat a loose term, we don't compare the actual content of the jobs...


author: Rafael Pinto Sperafico
body: Hi [@Daniel Adolfsson](/t5/user/viewprofilepage/user-id/120405) ,

Thank you for your inquire.

Atlassian Bamboo has changed over past releases (as [@Marcin Gardias](/t5/user/viewprofilepage/user-id/781649) mentioned) and the documentation has not been updated to reflect all of those, therefore, I will try to summarise the Starter License count.

* PROJ-PLAN-JOB1, counted against license
* If PROJ-PLAN-JOB1 and PROJ-PLAN0-JOB1 are equal, not counted against license
* If PROJ-PLAN-JOB1 and PROJ-PLAN0-JOB1 are divergent, counted against license
* If PROJ-PLAN doesn't have Bamboo Specs code, all branches are same and don't
* count against license
* If PROJ-PLAN contains Bamboo Specs code, all branches are divergent and count against license

Disabling a JOB does not free the license count, it is require to delete the JOB so a new one can be created. Due to this "limitation", it would be wise to make use of Bamboo Specs, so you can have your plans configuration in YAML or Java as a backup in case you need to restore it/them.

Please, have a look at [Exporting existing plan configurations to Bamboo Specs](https://confluence.atlassian.com/bamboo/exporting-existing-plan-configurations-to-bamboo-specs-894743917.html "Exporting existing plan configurations to Bamboo Specs") for more information.

Hope the above clarifies things.

Kind regards,  
Rafael

comments: author: Rafael Pinto Sperafico
body: Hi [@Daniel Adolfsson](/t5/user/viewprofilepage/user-id/120405) ,

I have created a feature request to reduce friction on this matter - <https://jira.atlassian.com/browse/BAM-20919> - **Starter License should allow unlimited jobs with 1 local agent**

Please, feel free to comment on the link above.

Kind regards,  
Rafael


author: Jeyanthan I
body: Just in case if anyone landed in this thread via search engines, we created a dedicated page that explains these scenarios in detail along with a query that you can run to list those Bamboo jobs that are counted for license restrictions.

* [Bamboo Starter License - Checking number of Bamboo jobs for license restrictions](https://confluence.atlassian.com/bamkb/bamboo-starter-license-checking-number-of-bamboo-jobs-for-license-restrictions-950278536.html)

Cheers,  
Jey
Wrong path to JAVA_HOME or JRE_HOME /bin/bin/java: not found
Asked by ????_???????:

I am trying to install Bamboo and am having problems starting:

sudo
> ./start-bamboo.sh -fg

```
Server startup logs are located in /opt/atlassian/atlassian-bamboo-6.10.3/bin/logs/catalina.out

Bamboo Server Edition
Version : 6.10.3


If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo

Using CATALINA_BASE: /opt/atlassian/atlassian-bamboo-6.10.3
Using CATALINA_HOME: /opt/atlassian/atlassian-bamboo-6.10.3
Using CATALINA_TMPDIR: /opt/atlassian/atlassian-bamboo-6.10.3/temp
Using JRE_HOME: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
Using CLASSPATH: /opt/atlassian/atlassian-bamboo-6.10.3/bin/bootstrap.jar:/opt/atlassian/atlassian-bamboo-6.10.3/bin/tomcat-juli.jar
/opt/atlassian/atlassian-bamboo-6.10.3/bin/catalina.sh: 1: exec: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/bin/java: not found
```

I can't understand why the start script adds bin / java to the JAVA_HOME path again.

/usr/lib/jvm/java-1.11.0-openjdk-amd64***/bin/bin/java***: not found


Answers:
author: ????_???????
body: [@Alexis Robert](/t5/user/viewprofilepage/user-id/1213386) ,

Thank you, this guide is not complete enough. I did the same as the guide for Jira, and I did it.

I skipped some steps that are described in the guide for Jira, but they are not in the guide for Bamboo


author: Alexis Robert
body: Hi [@????_???????](/t5/user/viewprofilepage/user-id/1469176) ,

you should configure your JAVA_HOME to point to the main folder of the JDK, as the Bamboo script will automatically add the "/bin/java" to JAVA_HOME.

Let me know if you have any questions,

--Alexis

comments: author: ????_???????
body: Hi, thanks for the feedback.

What does this mean "main folder"?

```
echo $JAVA_HOME
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
```

```
echo $JRE_HOME
/usr/lib/jvm/java-1.11.0-openjdk-amd64
```

I think that in all environment variables the correct values are indicated


author: ????_???????
body: I get it. The problems were really with setting user paths for various users, including root.  
Is there a guide for setting up a user for Bamboo and permissions to run?

comments: author: Alexis Robert
body: Hi [@????_???????](/t5/user/viewprofilepage/user-id/1469176) ,

there is a detailed guide here : <https://confluence.atlassian.com/bamboo/installing-bamboo-on-linux-289276792.html>.

It should give you all the information on how to install Bamboo.

Let me know if you have any questions,

--Alexis
Access to the list of people in group via Bamboo variable
Asked by MS:

I would like to add a plan launch notification. The "notification" function only allows you to send notifications when the plan is completed. However, it can be set in plan to receive notification by a group.

I prepared a PowerShell script that will be called in the first Task in Stage. Is it possible to get a list of people from the bamboo group via bamboo variable? Something like $ {bamboo.group.mail_test}?


Answers:
author: Daniel Santos
body: Hi [@MS](/t5/user/viewprofilepage/user-id/2211572)

Bamboo does not provide a way to gather this information via variables nor REST APIs. This restriction will probably be enforced due to GDPR compliance reasons.

I guess the options you have would be:

* Gather the user's email from LDAP via API and add it to a variable **OR**
* Create a file in your build pipeline with the list of user' s emails (gathered either from the Bamboo UI or another method). Using an inject variable task to create a variable with the content you need.

There is a feature request to add an email task in Bamboo:

* [\[BAM-17085\] Send customized email via Bamboo Task](https://jira.atlassian.com/browse/BAM-17085?jql=project%20%3DBamboo%20%20and%20text~%22mail%20task%22%20order%20by%20createdDate%20)  
  ??Please vote on it and add yourself as a watcher to receive our updates.

I hope that helps to clarify this scenario.


Tags: notification
What's the difference between the plan's linked issues and job's linked issues?
Asked by mike:

On an overall build summary, there's the "Issues" tab which shows any issues linked to this build, usually populated automatically based on what was attached to any commits.

If you click any particular stage under that build, it also has an "issues" tab, but is empty, and does not appear to relate to the overall build's issues tab. Why?![buildissue.png](/t5/image/serverpage/image-id/68928i7DBE572D9F10742C/image-size/large?v=v2&px=999 "buildissue.png")![jobissue.png](/t5/image/serverpage/image-id/68929iAD349FBBC78ADCED/image-size/large?v=v2&px=999 "jobissue.png")


Answers:
author: Daniel Santos
body: Hi [@mike](/t5/user/viewprofilepage/user-id/175170)

Great observation, I was able to reproduce this behavior after reading your question.  
I found a bug report about it:

* [\[BAM-18123\] Bamboo Job Issues tab does not work](https://jira.atlassian.com/browse/BAM-18123)

This bug was closed and according to the developer, this behavior is intended. The jobs would be used only to manually link issues that were related to that job only. It could be for example an issue created to report/resolve a failed test that works on that build only.

I'm getting in touch with the development team to check if I should open another bug for the page description. If this page is intended to be used only with manual links the description is wrong. Once I get updates from them I'll post them here.

comments: author: mike
body: Thanks much for the reply. Seems simple enough.


author: Daniel Santos
body: Thank you Mike!


Tags: issue

issue-link