Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

could not backup confluence

Amir Hosseini November 9, 2024

 

I'm getting these errors when a performing a daily backup (running the backup job or manually) in Confluence. However as soon as I unselect "Backup attachments" the error goes away. So it must be related to #83099657 (see below).

my confluence version is 8.5.12 (data center).

Is there any way to locate this id and what is it?

 

Any help would be appreciated!

 

 

 

2024-11-10 09:48:41,945 ERROR [Caesium-1-1] [confluence.impl.importexport.AbstractXmlExporter] backupEntities Couldn't backup database data. org.hibernate.FetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist at org.hibernate.type.ManyToOneType.resolve(ManyToOneType.java:268) at org.hibernate.engine.internal.TwoPhaseLoad$EntityResolver.lambda$static$0(TwoPhaseLoad.java:576) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntityEntryLoadedState(TwoPhaseLoad.java:221) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:155) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:126) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:221) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:187) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:96) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:105) at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:285) 2024-11-10 09:48:41,950 ERROR [Caesium-1-1] [confluence.importexport.impl.BackupJob] runJob Error while running the scheduled backup com.atlassian.confluence.importexport.ImportExportException: Couldn't backup database data. at com.atlassian.confluence.impl.importexport.AbstractXmlExporter.backupEntities(AbstractXmlExporter.java:222) at com.atlassian.confluence.impl.importexport.AbstractXmlExporter.backupEverything(AbstractXmlExporter.java:105) at com.atlassian.confluence.impl.importexport.AbstractFileXmlExporter.backupEverything(AbstractFileXmlExporter.java:99) Caused by: org.hibernate.FetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist at org.hibernate.type.ManyToOneType.resolve(ManyToOneType.java:268) at org.hibernate.engine.internal.TwoPhaseLoad$EntityResolver.lambda$static$0(TwoPhaseLoad.java:576) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntityEntryLoadedState(TwoPhaseLoad.java:221) ... 33 more

 

2024-11-10 09:48:41,951 WARN [Caesium-1-1] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job BackupJob#BackupJob-runNow-1731219362863 failed with response JobRunnerResponse[runOutcome=FAILED,message='ImportExportException: Couldn't backup database data.\nFetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist']

3 answers

0 votes
Amir Hosseini November 11, 2024 edited

.

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2024

@Amir Hosseini - After confirming the entity's absence, investigate related tables for orphaned references to the missing entity with ID 83099657. Run database queries to check for lingering connections:

Search content labels and attachments by executing:
SELECT * FROM content_label WHERE contentid = 83099657;
SELECT * FROM attachments WHERE contentid = 83099657;

If orphaned references are found, consider removing them to maintain database consistency and prevent potential issues. Eliminating these unnecessary links will help ensure data integrity

Regards

0 votes
Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2024

Hi @Amir Hosseini 

The Confluence error message indicates that the backup process is failing due to a missing or corrupted database entry, specifically an attachment record with the identifier 83099657. This entity, a ContentEntityObject, cannot be located, preventing the backup from completing successfully when "Backup attachments" is selected.

  • To troubleshoot, start by locating the missing entity in your Confluence database. The ID 83099657 corresponds to a specific attachment, page, or content entity. Run a database query to find it:
  • SELECT * FROM content WHERE contentid = 83099657;

If no results are returned, it confirms that the entity is missing or deleted, causing the FetchNotFoundException. This insight will guide further investigation to resolve the issue.

 

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Amir Hosseini November 11, 2024

Hi @Humashankar VJ 
Thank you for your reply
I tried the queries you mentioned and it didn't give any results.
I did a full text search on the database to see where this ID was used. I think it is related to this table "AO_7B47A5_EVENT".
SELECT * FROM "AO_7B47A5_EVENT" WHERE "CONTENT_ID" = 83099657;
The AO_7B47A5_EVENT table in Confluence stores data for Confluence Analytics, including information about page views and edits, and when a page was deleted.

Amir Hosseini November 11, 2024

Any idea what happens if I delete these records?

Humashankar VJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2024 edited

Hi @Amir Hosseini 

This analysis indicates that the issue is from a deleted content entity still referenced in Confluence Analytics. Specifically, ContentEntityObject ID 83099657 is missing from main content tables but remains in the AO_7B47A5_EVENT table.

This discrepancy causes backup failures when including attachments, as the process attempts to reference the non-existent content.

Give a try with the below listed pointers:

1. Back up your database before proceeding.
2. Remove orphaned references from AO_7B47A5_EVENT: DELETE FROM "AO_7B47A5_EVENT" WHERE "CONTENT_ID" = 83099657.
3. Retry the backup with attachments.
4. If successful, consider reindexing the database for data consistency: Go to Confluence Admin > Content Indexing and click "Rebuild search index."

Best Regards

 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, ai strategies, team productivity, teamwork collection, modern tech stack, ai for teams, collaboration tools, atlassian learning, workplace AI, team automation, leadership in tech, digital teamwork

The modern tech leader’s playbook for AI-powered teamwork

Join us to see how leading engineering teams are transforming workflows, accelerating delivery, and gaining a competitive edge with Teamwork Collection. Link to your Atlassian Community Event or Community Forums post

Register now
AUG Leaders

Upcoming Confluence Events