Confluence Cloud -> Server backup restore failing
Asked by Jordan Berry:

Getting issues when trying to restore a confluence cloud backup in to our local server. We are restoring to Confluence ver 6.1, but have yet to had a successful full restore. I have tried every thing listed [here](https://confluence.atlassian.com/jira/removing-invalid-characters-from-xml-backups-12079.html?_ga=2.40598178.127915473.1496674342-1303430742.1487177934), but there has been no luck. I am attempting to import without attachments first, as our cloud instance is quite large (130gb+).

Has anyone experienced these issues before, and overcame them. Any assistance would be greatly appreciated


Answers:
author: Jordan Berry
body: Hello Ann,

Below are the errors I am seeing when restoring this backup. We have yet to have a backup restore properly. Most of the solutions say the duplicat feilds should be removed from the DB, but we have no access to it on cloud

(My response it getting auto-deleted with my full log output)

```
2017-06-07 19:11:34,328 ERROR [http-nio-8090-exec-5] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep setupStack is empty of actions.
```

```
2017-06-07 19:11:34,329 ERROR [http-nio-8090-exec-4] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep The setupStack is empty; the last action should always be 'complete', which will prohibit further setupStack activity! Odds are it wasn't in this case.
```

```
2017-06-07 19:11:35,586 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,597 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
```

comments: author: AnnWorley
body: The Cloud support team does have access to the database. I found several tickets where they fixed issues like this. It involves some file transfers so is best done via a support request: <https://getsupport.atlassian.com>

Please see [Unable to restore from site from setup wizard](https://jira.atlassian.com/browse/CONFCLOUD-26991) regarding the error:

```
setupStack is empty of actions
```


author: Jordan Berry
body: Hello Ann,

Below are the errors I am seeing when restoring this backup. We have yet to have a backup restore properly. Most of the solutions say the duplicat feilds should be removed from the DB, but we have no access to it on cloud

(my response is not posting)

```
2017-06-07 19:11:34,328 ERROR [http-nio-8090-exec-5] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep setupStack is empty of actions.2017-06-07 19:11:34,329 ERROR [http-nio-8090-exec-4] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep The setupStack is empty; the last action should always be 'complete', which will prohibit further setupStack activity! Odds are it wasn't in this case.2017-06-07 19:11:34,734 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'contentJobQueueExecutorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,737 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'ReferralQueueFlushJob'; will attempt recovery in 60 seconds2017-06-07 19:11:34,750 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,812 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'LongRunningTaskPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:34,844 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'purgeHistoryJobConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,880 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'AmqPayloadPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:35,586 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,597 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,598 ERROR [http-nio-8090-exec-1] [confluence.admin.actions.SystemInfoOnStartup] startup Unable to log system info on startupCaused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,613 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,614 ERROR [http-nio-8090-exec-1] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@4633b7f9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,660 ERROR [http-nio-8090-exec-5] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,663 ERROR [http-nio-8090-exec-5] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@290f66a9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:12:39,247 ERROR [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job com.atlassian.sal.core.scheduling.DefaultPluginScheduler#DefaultPluginScheduler:com.atlassian.support.healthcheck.scheduler.HealthCheckRunnerImpl:job failed to run2017-06-07 19:16:34,749 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds
```


author: AnnWorley
body: Please let us know what, if any, error message(s) you are seeing in the browser and the logs when the import fails.

I am sure you have seen this:

[Migrate from Confluence Cloud to Server](https://confluence.atlassian.com/confcloud/migrate-from-confluence-cloud-to-server-724765578.html)

"You can migrate from your Confluence Cloud to Confluence Server 6.0 or later, only. You can't import Cloud data (whole site or individual space exports) into any earlier versions of Confluence. We recommend installing the latest version."

The latest version now is Confluence 6.2.1, though technically it "should" work on 6.1.

comments: author: Jordan Berry
body: So before I was getting some java heap memory errors, but those have subsided since we increased the servers memory. Here are all of the errors I got with the latest attempted import. This has been plaguing us for the past month, and we still cant get a backup to restore

```
2017-06-07 19:11:34,328 ERROR [http-nio-8090-exec-5] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep setupStack is empty of actions.2017-06-07 19:11:34,329 ERROR [http-nio-8090-exec-4] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep The setupStack is empty; the last action should always be 'complete', which will prohibit further setupStack activity! Odds are it wasn't in this case.2017-06-07 19:11:34,734 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'contentJobQueueExecutorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,737 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'ReferralQueueFlushJob'; will attempt recovery in 60 seconds2017-06-07 19:11:34,750 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,812 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'LongRunningTaskPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:34,844 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'purgeHistoryJobConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,880 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'AmqPayloadPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:35,586 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,597 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,598 ERROR [http-nio-8090-exec-1] [confluence.admin.actions.SystemInfoOnStartup] startup Unable to log system info on startupCaused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,613 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,614 ERROR [http-nio-8090-exec-1] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@4633b7f9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,660 ERROR [http-nio-8090-exec-5] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,663 ERROR [http-nio-8090-exec-5] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@290f66a9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:12:39,247 ERROR [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job com.atlassian.sal.core.scheduling.DefaultPluginScheduler#DefaultPluginScheduler:com.atlassian.support.healthcheck.scheduler.HealthCheckRunnerImpl:job failed to run2017-06-07 19:16:34,749 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds
```


author: Jordan Berry
body: Hello Ann,

Below are the errors I am seeing when restoring this backup. We have yet to have a backup restore properly. Most of the solutions say the duplicat feilds should be removed from the DB, but we have no access to it on cloud

```
2017-06-07 19:11:34,328 ERROR [http-nio-8090-exec-5] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep setupStack is empty of actions.2017-06-07 19:11:34,329 ERROR [http-nio-8090-exec-4] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep The setupStack is empty; the last action should always be 'complete', which will prohibit further setupStack activity! Odds are it wasn't in this case.2017-06-07 19:11:34,734 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'contentJobQueueExecutorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,737 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'ReferralQueueFlushJob'; will attempt recovery in 60 seconds2017-06-07 19:11:34,750 ERROR [Caesium-1-3] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,812 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'LongRunningTaskPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:34,844 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'purgeHistoryJobConfig'; will attempt recovery in 60 seconds2017-06-07 19:11:34,880 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'AmqPayloadPurger'; will attempt recovery in 60 seconds2017-06-07 19:11:35,586 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,597 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,598 ERROR [http-nio-8090-exec-1] [confluence.admin.actions.SystemInfoOnStartup] startup Unable to log system info on startupCaused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,613 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block2017-06-07 19:11:35,614 ERROR [http-nio-8090-exec-1] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@4633b7f9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction blockCaused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,660 ERROR [http-nio-8090-exec-5] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:39,663 ERROR [http-nio-8090-exec-5] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@290f66a9] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@22c67b94]Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:12:39,247 ERROR [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job com.atlassian.sal.core.scheduling.DefaultPluginScheduler#DefaultPluginScheduler:com.atlassian.support.healthcheck.scheduler.HealthCheckRunnerImpl:job failed to run2017-06-07 19:16:34,749 ERROR [Caesium-1-4] [scheduler.caesium.impl.CaesiumSchedulerService] executeClusteredJobWithRecoveryGuard Unhandled exception during the attempt to execute job 'confluenceDavSessionInvalidatorConfig'; will attempt recovery in 60 seconds
```


author: Jordan Berry
body: Hello Ann,

Below are the errors I am seeing when restoring this backup. We have yet to have a backup restore properly. Most of the solutions say the duplicat feilds should be removed from the DB, but we have no access to it on cloud

(My response it getting auto-deleted with my full log output)

```
2017-06-07 19:11:34,328 ERROR [http-nio-8090-exec-5] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep setupStack is empty of actions.
```

```
2017-06-07 19:11:34,329 ERROR [http-nio-8090-exec-4] [atlassian.confluence.setup.DefaultSetupPersister] progessSetupStep The setupStack is empty; the last action should always be 'complete', which will prohibit further setupStack activity! Odds are it wasn't in this case.
```

```
2017-06-07 19:11:35,586 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: duplicate key value violates unique constraint "uk_osprt1myxoltvtd8yodb0besm"2017-06-07 19:11:35,597 ERROR [http-nio-8090-exec-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
```


author: Jordan Berry
body: Hello Ann,

Its not letting me respond to you directly, my response was marked as another answer. Please see below


Tags: backup

developer

import

server