Problem to backup confluence
Asked by Igor Topic:

I have problem to create backup on Confluence. Problem is when I try create backup manually i have error and also scheduled backup says done but I cannot find in Backup folder on server.


Answers:
author: AnnWorley
body: The automatic backups should be in the **backups** folder in the [Confluence Home](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html) directory. That directory is the the path defined in the installation folder in the file: confluence/WEB-INF/classes/**confluence-init.properties.**

You didn't mention what error you are getting when you back up manually, but it is common for XML backups to use a lot of resources. Please see [Production Backup Strategy](https://confluence.atlassian.com/doc/production-backup-strategy-38797389.html) for our recommended alternative.

comments: author: Igor Topic
body: ```
com.atlassian.confluence.importexport.ImportExportException: Couldn't backup database data. at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.backupEntities(AbstractXmlExporter.java:239) at com.atlassian.confluence.importexport.impl.AbstractXmlExporter.backupEverything(AbstractXmlExporter.java:104) at com.atlassian.confluence.importexport.impl.FileXmlExporter.backupEverything(FileXmlExporter.java:96) 
```

And cannot add support zip file


author: AnnWorley
body: Hi Igor,

The Community forum doesn't provide file sharing, that's why the support zip cannot be added.

The error you posted is similar to the one in this article [Can't create XML backup due to backupEntities Couldn't backup database data](https://confluence.atlassian.com/confkb/can-t-create-xml-backup-due-to-backupentities-couldn-t-backup-database-data-776821980.html). If you are running MySQL that may be your issue.

Thanks,

Ann


author: Igor Topic
body: Hi Ann,

It seems that Confluence connected to HSQL database, not MySQL.


author: Igor Topic
body: Hi Ann,

It seems that Confluence connected to HSQL database, not MySQL.

comments: author: AnnWorley
body: Hi Igor,

We started using [H2](https://confluence.atlassian.com/doc/embedded-h2-database-145098285.html) instead of HSQL several versions of Confluence ago. Please let me know what you are working on and what your current version of Confluence is.

For example, do you want to move to a supported external database via XML back-up so you can move the system to Production, or perhaps upgrade?

Thanks,

Ann


author: Igor Topic
body: Hi Ann,

Yes, i want to move to a supported external database via XML back-up so I can move the system to Production.

Ver. of Conflunece is 5.6.1


author: AnnWorley
body: I found this bug with a similar error, and it turned out to be an out of memory issue: [Unable to backup Confluence installation (4.3) because of large stacktrace.](https://jira.atlassian.com/browse/CONFSERVER-26849)

I also found a support request where a duplicate entry in the database was causing an error "Couldn't backup database data" during an XML export. To see if that is what we are running into please look in the **atlassian-confluence.log\*** for an error such as:

```
 Caused by: net.sf.hibernate.HibernateException: More than one row with the given identifier was found

```

**\* \<confluence_home\>/logs/atlassian-confluence.log**   
(note) The \<confluence_home\> directory is the path defined in the following file: \<confluence_install\>/confluence/WEB-INF/classes/confluence-init.properties


author: Igor Topic
body: Hi Ann,

I have error in atlassian-confluence.log

ERROR \[scheduler_Worker-7\] \[org.quartz.core.JobRunShell\] run Job DEFAULT.ClusterSafetyJob threw an unhandled Exception:  
java.lang.RuntimeException: More than one cluster safety number in database.


author: Igor Topic
body: Any news about this?


author: AnnWorley
body: The cluster safety scheduled job (ClusterSafetyJob from your error) checks for multiple applications writing to the Confluence database by checking the CLUSTERSAFETY table in the database every 30 seconds ([Scheduled Jobs](https://confluence.atlassian.com/doc/scheduled-jobs-96567525.html)). The error is caused because there are two records. **If you are not running a Data Center instance** then you should be able to fix the issue by removing either of the rows in the CLUSTERSAFETY table.

Before running any SQL against the database please shut down Confluence and and back up your database.

If the issue is not resolved by deleting one row, a colleague recommended just deleting all entries from the CLUSTERSAFETY table. A new entry will be generated on startup.


author: Igor Topic
body: How I can fix that, Confluence is use HSQL database. I want to move to a supported external database via XML back-up so I can move the system to Production.


author: AnnWorley
body: **If you are not running a Data Center instance** then you should be able to fix the issue by removing either of the rows in the CLUSTERSAFETY table of the HSQL database.

If the issue is not resolved by deleting one row, a colleague recommended just deleting all entries from the CLUSTERSAFETY table. A new entry will be generated on startup.

To connect to the HSQL database so you can delete the extra row from the CLUSTERSAFETY table, please follow: [Connecting to HSQLDB using DBVisualizer](https://confluence.atlassian.com/display/CONF54/Connecting+to+HSQLDB+using+DBVisualizer)


author: Igor Topic
body: Hi Ann,

Thank you for your support, now I am able to create backup.

Do you have instruction how to migrate from HSQL to MySQL?

Regards,

Igor


author: Nic Brough -Adaptavist-
body: <https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html> is the starting point for changing the database