[MGNLBACKUP-112] Wrong repository config path is being resolved Created: 26/Jul/17  Updated: 02/Jun/22  Resolved: 22/Apr/22

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

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: AntonĂ­n Juran
Resolution: Fixed Votes: 3
Labels: maintenance, to-estimate
Remaining Estimate: Not Specified
Time Spent: 0.5d
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLBACKUP-120 The configurationPath property doesn'... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: Nucleus 8
Story Points: 3
Team: Nucleus

 Description   

Wrong repository config path is resolved when a manual backup is done (info.magnolia.module.backup.app.BackupPresenter.manualBackup())

BackupOperationConfiguration configuration = backupOperationConfiguration()
                        .withBackupLocation(Paths.get(items.get(BackupView.FORM_VIEW_MANUAL_BACKUP).getItemProperty("backupPath").getValue().toString()))
                        .withRepositoryPath(Paths.get(properties.getProperty("magnolia.repositories.home"), "magnolia"))
                        .withConfigurationPath(Paths.get(properties.getProperty("magnolia.home"), properties.getProperty("magnolia.repositories.jackrabbit.config")))
                        .build();

Here magnolia.home is used to compose the path in addition to magnolia.repositories.jackrabbit.config. magnolia.home can be configured in magnolia properties, so it might lead to errors locating this configuration file.

I guess that it should be resolved as it is done in provider implementation for Apache JackRabbit JCR repository (info.magnolia.jackrabbit.ProviderImpl) where info.magnolia.cms.core.FileSystemHelper.getAbsoluteFileSystemPath(String) is used to compose the path, getting absolute filesystem path and adding application root if path is not absolute.

Same for: info.magnolia.module.backup.commands.BackupCommand.executeAutomatedBackup(Context, String)



 Comments   
Comment by Adam Siska [ 22/Apr/22 ]

For release notes:
Backup procedure works without issues also with magnolia.repositories.jackrabbit.config property set to absolute filesystem path of the configuration file.

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