Bamboo backup failing
Asked by Bill Manuel:

For about a month now our scheduled backup has been getting stuck and never finishing. We have to restart the server to get Bamboo to work again. We are using version 2.6.2 and have not had problems with the backup before. There are not any errors in the logs except access errors when people try to access Bamboo while it's stuck in this state. I see nothing that would tell me why the backup is getting stuck. From the file sizes of the backups, it appears that everything is still being backed up, but Bamboo does not think so.

Does anyone know how to increase logging to get the backup agent to show more information? Has anyone had problems with the backup agent before that could suggest something to look at?

The relevant log from the backup:

```
 21:00:00,016  [XmlMigrator] Creating zip:/app-bamboo/backups/bamboo_backup_2012_03_06.zip 21:00:00,022  [XmlMigrator] Starting export of data... 21:00:00,027  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/users.xml 21:00:00,030  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.UserMapper@18880085 21:00:00,340  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/users.xml 21:00:00,356  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/groups.xml 21:00:00,357  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.GroupMapper@37f70070 21:00:00,419  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/groups.xml 21:00:00,429  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/authors.xml 21:00:00,430  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.AuthorMapper@175b269f 21:00:00,448  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/authors.xml 21:00:00,456  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/labels.xml 21:00:00,457  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.LabelMapper@6fe6164e 21:00:04,576  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/labels.xml 21:00:04,591  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/images.xml 21:00:04,592  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ElasticImageConfigurationMapper@de282f 21:00:04,667  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/images.xml 21:00:04,809  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/pipelines.xml 21:00:04,811  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.PipelineMapper@65d058e2 21:00:04,924  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/pipelines.xml 21:00:04,942  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/sharedCapabilities.xml 21:00:04,943  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.SharedCapabilityMapper@6cd246da 21:00:05,063  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/sharedCapabilities.xml 21:00:05,106  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/jiraservers.xml 21:00:05,107  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.JiraServerMapper@52198ec6 21:00:05,169  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/jiraservers.xml 21:00:05,199  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/imservers.xml 21:00:05,200  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.InstantMessagingServerMapper@502adcfb 21:00:05,264  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/imservers.xml 21:00:05,306  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/mail-servers.xml 21:00:05,307  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.MailServerMapper@699fd58a 21:00:05,307  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/mail-servers.xml 21:00:05,323  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/elasticInstanceSchedules.xml 21:00:05,325  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ElasticInstanceScheduleMapper@404b11ef 21:00:06,729  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/elasticInstanceSchedules.xml 21:00:06,749  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/projects.xml 21:00:06,751  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ProjectMapper@4599660d 21:00:11,957 INFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/ajax/viewPlanUpdates.action' to '/error/error.action' 21:01:10,392  [BuildResultSummaryMapper] Exporting PRODUCTION-MISCAPPSWFETRANSPORT BuildResultsSummaries: 1000 21:01:19,329  [BuildResultSummaryMapper] Exporting PRODUCTION-MISCAPPSWFETRANSPORT BuildResultsSummaries: 2000 21:06:40,690  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/projects.xml 21:06:40,824  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/dependencies.xml 21:06:40,825  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ProjectDependencyMapper@37c672ab 21:06:40,966  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/dependencies.xml 21:06:41,122  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/commits.xml 21:06:41,123  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.CommitRootMapper@27b23987 21:07:06,978  [CommitRootMapper] Exporting Commit: 10000 21:07:30,833  [CommitRootMapper] Exporting Commit: 20000 21:07:56,202  [CommitRootMapper] Exporting Commit: 30000 21:08:12,803  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/commits.xml 21:08:13,004  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/linkedjiraIssues.xml 21:08:13,005  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.LinkedJiraIssueRootMapper@aa8774e 21:08:14,041  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/linkedjiraIssues.xml 21:08:14,548  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/bandanaItems.xml 21:08:14,549  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.BandanaItemMapper@53d0f5b 21:08:14,910  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/bandanaItems.xml 21:08:15,498  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/acls.xml 21:08:15,500  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.AclMapper@421dca9d 21:08:18,698  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/acls.xml 21:08:18,814  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testClasses.xml 21:08:18,816  [XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestClassMapper@675f2a3b 21:08:19,829  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testClasses.xml 21:08:20,126  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCases.xml 21:08:20,127  [XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestCaseMapper@4ea52079 21:08:23,849  [TestCaseMapper] Exporting TestCases: 16112 / 16112 21:08:23,849  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCases.xml 21:08:24,053  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testClassResults.xml 21:08:24,054  [XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestClassResultMapper@e53410f 21:08:25,022  [TestClassResultMapper] Exporting TestClassResults: 2393 / 2393 21:08:25,022  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testClassResults.xml 21:08:25,121  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCaseResults.xml 21:08:25,123  [XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestCaseResultMapper@2771027a 21:08:26,523  [TestCaseResultMapper] Exporting TestCaseResults: 9655 / 9655 21:08:26,523  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCaseResults.xml 21:08:26,651  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCaseResultErrors.xml 21:08:26,652  [XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper@43c3d0f5 21:08:29,171  [TestCaseResultErrorMapper] Exporting TestCaseResultErrors: 8131 / 8131 21:08:29,172  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/testCaseResultErrors.xml 21:08:29,270  [XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/loginInfos.xml 21:08:29,271  [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.LoginInformationMapper@2f77a8c1 21:08:29,617  [XmlMigrator] Finished writing to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/loginInfos.xml 21:08:29,678  [XmlMigrator] Zipping config dir:/app-bamboo/backups/bamboo_backup_2012_03_06.zip/configuration 21:08:29,909  [XmlMigrator] Zipping build dir:/app-bamboo/backups/bamboo_backup_2012_03_06.zip/builds 21:36:18,248  [XmlMigrator] Updating destination zip:/app-bamboo/backups/bamboo_backup_2012_03_06.zip 21:36:48,382  [XmlMigrator] Finished updating zip 21:36:48,383  [XmlMigrator] Ensuring the the file has been unmounted 21:36:48,673  [XmlMigrator] Unmounted /app-bamboo/backups/bamboo_backup_2012_03_06.zip 21:36:48,673  [XmlMigrator] Export completed. 0:36:48.657 23:59:17,597 INFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'2012-03-07 02:02:08,314 INFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'2012-03-07 04:30:20,597 INFO [1112732142@qtp-730252978-150] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'
```


Answers:
author: Przemek Bruski
body: It looks like there's a problem with removing the export in progress flag. What can I say, see you at [support.atlassian.com](http://support.atlassian.com) ... Make sure you reference this thread in the ticket body.


author: Przemek Bruski
body: > our scheduled backup has been getting stuck and never finishing.

and
> From the file sizes of the backups, it appears that everything is still being backed up, but Bamboo does not think so.

Could you clarify that? Is the backup still going and you cannot access Bamboo or has it finished and you cannot access Bamboo?

comments: author: Bill Manuel
body: According to Bamboo, the backup is still running. When you try to visit the home page bamboo displays the message that it is still exporting. I say it appears it has finished just based on the file sizes. It will get stuck like this for the entire weekend.


author: Przemek Bruski
body: What's the last backup - related message in the log file? It will most likely be issued by XmlMigrator class.


author: Bill Manuel
body: This line is repeated and is the only thing I see in the log. There is nothing in there about the backup starting. I see the root logger is set to WARN in the log4j.properties file. Is there a package that I can added to log4j to see the backup logging statements?

"WARN \[QuartzScheduler_Worker-4\] \[SessionImpl\] Narrowing proxy to class com.atlassian.bamboo.build.DefaultBuild - this operation breaks =="


author: Przemek Bruski
body: > "WARN \[QuartzScheduler_Worker-4\] \[SessionImpl\] Narrowing proxy to class com.atlassian.bamboo.build.DefaultBuild - this operation breaks =="

That's OK.

Can you start the backup manually and post the interesting bits from the Bamboo log file here?


author: Bill Manuel
body: ```
[XmlMigrator] Creating zip:/app-bamboo/backups/bamboo_backup_2012_03_06.zip[XmlMigrator] Starting export of data...[XmlMigrator] Writing xml to file: /app-bamboo/backups/bamboo_backup_2012_03_06.zip/db-export/users.xml[XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ProjectMapper@4599660dINFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/ajax/viewPlanUpdates.action' to '/error/error.action'[BuildResultSummaryMapper] Exporting PRODUCTION-MISCAPPSWFETRANSPORT BuildResultsSummaries: 2000[XmlMigrator] Exporting with: com.atlassian.bamboo.resultsummary.tests.TestCaseResultMapper@2771027a[TestCaseResultMapper] Exporting TestCaseResults: 9655 / 9655[TestCaseResultErrorMapper] Exporting TestCaseResultErrors: 8131 / 8131[XmlMigrator] Zipping build dir:/app-bamboo/backups/bamboo_backup_2012_03_06.zip/builds[XmlMigrator] Updating destination zip:/app-bamboo/backups/bamboo_backup_2012_03_06.zip[XmlMigrator] Finished updating zip[XmlMigrator] Ensuring the the file has been unmounted[XmlMigrator] Unmounted /app-bamboo/backups/bamboo_backup_2012_03_06.zip[XmlMigrator] Export completed. 0:36:48.657INFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'INFO [640312236@qtp-730252978-148] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'INFO [1112732142@qtp-730252978-150] [JohnsonFilter] The application is still starting up, or there are errors.  Redirecting request from '/' to '/error/error.action'
```