Cannot create or restore XML backup due to OutOfMemory errors
Backups within Confluence fail with this error in the logs:
2008-01-15 17:50:57,138 ERROR [http-8080-Processor5] [atlassian.xwork.interceptors.XWorkTransactionInterceptor] onThrowable Invoking rollback for transaction on action '/admin/dobackup.action (BackupAction.execute())' due to throwable: java.lang.OutOfMemoryError -- url: /admin/dobackup.action | userName: pkamal java.lang.OutOfMemoryError
Confluence backups require large amounts of memory and CPU.
Atlassian recommends disabling the backup from within Confluence and using native database sql dump tools instead. This is preferable for backup, upgrade, and creation of a test server. The xml backup is only needed for migration to a new database. Refer to Site Backup and Restore for details.
If migrating to a new database,
- Increase the amount of memory available to your confluence server. Refer to Fixing Out Of Memory Errors. This guide describes how to update the
setenv.sh/setenv.batto increase the value of
-Xmx, to increase the amount of system memory reserved by the JVM.
- If increased memory settings still does not work, try a backup without attachments. You can later move the attachments directory in place manually, from
- If you still cannot export due to memory issues, export all your large spaces individually, and import one by one. Both confluence instances (the one you are exporting from and the one you are importing into) need to be the same version.
Check Troubleshooting failed XML site backups for related troubleshooting techniques.
Was this helpful?Yes Provide feedback about this article