[MGNLBACKUP-161] Record does not exist, repair datastore Created: 02/Oct/23  Updated: 29/Jan/24  Resolved: 10/Oct/23

Status: Closed
Project: Backup
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Ivan Heredia Planas Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Deveopment


Attachments: File catalina.out     PNG File image-2023-10-02-12-02-36-507.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Visible to:
Ivan Heredia Planas, Ivan Heredia Planas

 Description   

Hi. I want do a backup of my magnolia author instance, can it do via API:

curl --location 'https://<server>/.rest/commands/v2/backup/backup' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <credentials>' \
--data '{
    "repositoryPath": "/mgnl_author/mgnl_data/repositories/author",
    "configurationPath": "/mgnl_author/mgnl_conf/jackrabbit-bundle-mysql-search.xml",
    "backupLocation": "/mgnl_author/backups/01",
    "compression": false
}'

When I execute the curl, in the catalina.out show this:

----------------------------------------------------------------
Mon Oct 02 11:49:29 CEST 2023:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.14.2.0 - (1828579): instance 5b0eecb3-018a-ef6e-3aaf-0000281784c0 
on database directory /mgnl_author/backups/01/version/db with class loader ParallelWebappClassLoader
  context: author
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@37f8bb67
 
Loaded from file:/opt/tomcat/apache-tomcat-9.0.41/webapps/author/WEB-INF/lib/derby-10.14.2.0.jar
java.vendor=Red Hat, Inc.
java.runtime.version=1.8.0_352-b08
user.dir=/
os.name=Linux
os.arch=amd64
os.version=3.10.0-1160.80.1.el7.x86_64
derby.system.home=null
Database Class Loader started - derby.database.classpath=''
----------------------------------------------------------------

three times, and show this line:

INFO  ule.backup.executor.ObservationAwareBackupExecutor: An error occurred while backup was ongoing, therefore, retrying to backup once more. 

Finally show a error track with this message:

javax.jcr.RepositoryException: Failed to copy content
...
Caused by: org.apache.jackrabbit.core.data.DataStoreException: Record ccc2fab22bfe8fc035c4fd7dd105d27b3bb74d1fb327c97d3bbf4a02c41725df does not exist 

I readed this incidence now closed https://jira.magnolia-cms.com/browse/MGNLBACKUP-143

In this incidence comment that the solution is repair the datastore, so in the logs not found a record because not exist.

 

In the incidence comment that doing this:

Can work, but not work. 

 

I don't understand very well the error.

But understand that the datastore folder in the author instance contains the database data indexs and as in the folder exist the path repositories/author/magnolia/repository/datastore/cc/c2/fa/ with the file ccc2fab22bfe8fc035c4fd7dd105d27b3bb74d1fb327c97d3bbf4a02c41725df. Magnolia is searching this uuid in the database and this not exist. Is correct?

 

The solution is reparir the datastore, How to I do this? Understand that the repositories must have the same indexs that in the database...Is correct?

 

Someone know as solved it?

 

Thank you very much.



 Comments   
Comment by Richard Gange [ 02/Oct/23 ]

Hello Ivan-

Are you a customer or partner? If so, it would best to open the ticket in our support project.

The command will work if you datastore is corrupted. It's not really an issue with Magnolia per say. The issue is occurring at the Jackrabbit level with the Repository Copier. If your datastore is corrupted it will cause the copier to fail.

I have a groovy script here which can check the consistency of your datastore. Maybe it would be a good idea to run that and fix all problems with your datastore before trying to run the backup.

HTH
Rich

Generated at Sun Feb 11 23:26:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.