Permanent change to Bamboo export location
Asked by Config Manager:

Hi,

We are running Bamboo 5.3 on Windows Server 2008 R2. I wanted to change the location where scheduled backups and exports are written to. I edited the bamboo.set.paths.allowed system property and restarted Bamboo as described in [](https://confluence.atlassian.com/display/BAMBOO/Configuring+Bamboo+on+start-up#ConfiguringBambooonstart-up-SettingPropertiesforWindowsServicesviatheWindowsRegistry)<https://confluence.atlassian.com/display/BAMBOO/Configuring+Bamboo+on+start-up#ConfiguringBambooonstart-up-SettingPropertiesforWindowsServicesviatheWindowsRegistry>and was able to set the path in both Scheduled Backups ("Backup path") and Export ("Export directory path") screens. Then, as advised, I removed the system property and restarted again.

I find that although the scheduled backup setting has changed permanently, the export location hasn't, still pointing to \<bamboohome\>\\exports.

How can I set this to the desired value without setting the system property every time?


Answers:
author: Sultan Maiyaki
body: Hi John,

Ok now I understand the issue you are facing. Once you have set the property bamboo.paths.set.allowed to true, Bamboo allows you to change the export directory fom the UI anytime you are taking the exxport. The scheduled backup is however configured on bamboo-cfg.xml file on permanent basis. So yes we have no property like the daily.backup.dir to point the export to a directory. This is also a limitation to limit security vulnerability.

I believe the daily.backup.dir is shown because you have removed the property. You can feel free to remove it again and add back the property set to true

comments: author: Config Manager
body: OK, thanks for this further information, Sultan.


author: Config Manager
body: Oh how I miss my Unix heritage ... particularly the symbolic link. The options for symlinks in Windows where I work now are limited, not always available and by all accounts not all that easy and reliable.

But getting back to my orginal question: for the record I have switched the scheduled backup location in the way Sultan advised and this works fine. It's just the one-off exports that go to the pre-defined location, but since I've only had to do such an export on rare occasions like when upgrading, it doesn't really matter. Bit inconsistent though.


author: Mark Hopkins
body: .... and exports don't work at all using a symlink....

comments: author: Jason Monsorno
body: I'm running v5.2 on Windows Server 2008 R2 and I don't experience any problem with builds or exports.


author: Mark Hopkins
body: In 5.3 the use of a symlink only works partially. Once the backup job is scheduled you can create the symlink and it does work. However try making a change to the scheduled job; you will receive the following error and you will not be able to save the change:

**Specified file name must be a relative path under Bamboo home directory**

So each time you want to modify the scheduled backup you must play a little game with the symlink. Not optimal but we can live with it for now. We would still like the flexibility of using variables to control file locations.


author: Mark Hopkins
body: I am not understanding any of this. Can we or can we not change the directory locations for backups and/or exports. I have added the following to the global variables and it changed nothing:

bamboo.paths.set.allowedtrue

And I do not see John's question answered so I will ask it again. In the file:

/opt/atlassian/bamboo/atlassian-bamboo-5.3/bamboo.cfg.xml

the following exists:

\<property name="daily.backup.dir"\>${bambooHome}/backups\</property\>

(1) What is it?

(2) Can we modify it? I already tried, and teh change was ignored.

Also, please explain "This is also a limitation to limit security vulnerability". I am not getting this at all. Leave security to us please, and give us a flexible product.

Thanks

Mark

comments: author: Jason Monsorno
body: I let it point to it's default location but replace it with a symbolic link. Bamboo is happy and I'm happy.


author: Sultan Maiyaki
body: Hi John,

We have a guideline for changing paths in this knowledge article: [](https://confluence.atlassian.com/display/BAMKB/Changing+paths+location+in+Bamboo)<https://confluence.atlassian.com/display/BAMKB/Changing+paths+location+in+Bamboo>Basically after adding the system property, you can changing the paths location from the bamboo-cfg.xml file located in the home directory

comments: author: Config Manager
body: Hi Sultan,  

Thanks for this info, it's very helpful, but I have 2 questions about this:  

The knowledge article gives an example of changing the artifacts directory location, and that property is there already in the config file to change if needed. What would be the name of the property to change for the exports directory, as it isn't already in the file - presumably it's something like bamboo.exports.directory?

Secondly, as my original question noted, I have changed the scheduled backup location to somewhere else, and yet I see an entry in bamboo,cfg.xml   
<property name="daily.backup.dir">${bambooHome}\backups</property>  
To what does this refer as it is certainly not the scheduled backup location?  

Regards, John


author: Config Manager
body: Can Sultan or anyone else answer my two follow-on questions please? I'm being prompted to close the question but it hasn't been fully answered yet!