cancel
Showing results for 
Search instead for 
Did you mean: 

[RESOLVED] Alfresco Hot Backup and data synchronization pb

nmaupu
Champ in-the-making
Champ in-the-making
Hello,

We currently have 2 machines. A master one which handle all requests to our alfresco repository and a "slave" one which should be synchronized every night with master's data.
My work is based on this article : http://wiki.alfresco.com/wiki/Backup_and_Restore. I spent a lot of time in experiencing to succeed to "migrate data" from master to slave.

I can't stop alfresco instance on master so I need to proceed a hot backup.
Here is how I proceed :

On master machine :
1- I create a MySQL hot backup with Innodb Hot Backup (very expensive but efficient tool).
2- Right after, I make a LVM snapshot of alfresco repository.
3- I mount LVM snapshot in a temporary directory.

On slave machine :
4- I stop alfresco instance
5- I stop mysql
6- I restore MySQL backup created in 1
7- I rsync alfresco snapshot LVM (directories contentstore, contentstore.deleted, audit.contentstore and backup_lucene_indexes)
8- I delete lucene_indexes and move backup_lucene_indexes to lucene_indexes.
9- I restart MySQL
10- I Restart Alfresco

But 90% of the time I get the following exception when starting alfresco :


10:57:34,740 ERROR [ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 2 stores.
10:57:34,740 ERROR [ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
10:57:34,742 ERROR [ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Ensure that the 'dir.root' property is pointing to the correct data location.
        at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:313)
        at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:74)
        at org.alfresco.repo.admin.ConfigurationChecker$1.doWork(ConfigurationChecker.java:180)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:176)
        at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82)
        at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:184)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)

Is there anything wrong in my way of hot backuping ?
Is there another way ?

What if I keep both slave's MySQL and slave's alfresco lucene indexes and I just rsync  contentstore, contentstore.deleted and audit.contentstore ?

Thank you by advance for all advice I can get.
nmaupu
3 REPLIES 3

pmonks
Star Contributor
Star Contributor
Just to double check, is the 'dir.root' property in the standby instance is pointing to the directory created in step 7?

Also, what value do you have the 'index.recovery.mode' property set to (if any)?

Cheers,
Peter

nmaupu
Champ in-the-making
Champ in-the-making
Just to double check, is the 'dir.root' property in the standby instance is pointing to the directory created in step 7?

I double checked too, but my standby configuration is pointing to the right directory. For sure.

Also, what value do you have the 'index.recovery.mode' property set to (if any)?

index.recovery.mode is set to VALIDATE :
index.recovery.mode=VALIDATE in repository.properties file

I don't understand how backup-lucene-indexes could be synchronized with database backup because, backup of lucene indexes and mysql backup is not made at the same time (backup lucenes is made by alfresco at 3am and my routine is 4am). It exists differences between them, no ?
Do you have an idea how long time does backuping lucene indexes take ?

Thank you,
Nicolas Maupu

nmaupu
Champ in-the-making
Champ in-the-making
I finally figure out why I had my problem 🙂

In fact, it was from my rsync command … Some files in alfresco :

backup-lucene-indexes/system/system/IndexInfo
backup-lucene-indexes/system/system/IndexInfoBackup
backup-lucene-indexes/workspace/SpacesStore/IndexInfo
backup-lucene-indexes/workspace/SpacesStore/IndexInfoBackup
backup-lucene-indexes/workspace/lightWeightVersionStore/IndexInfo
backup-lucene-indexes/workspace/lightWeightVersionStore/IndexInfoBackup
backup-lucene-indexes/archive/SpacesStore/IndexInfo
backup-lucene-indexes/archive/SpacesStore/IndexInfoBackup
backup-lucene-indexes/user/alfrescoUserStore/IndexInfo
backup-lucene-indexes/user/alfrescoUserStore/IndexInfoBackup

don't have their date changed, neither their size … So rsync didn't update them on standby server (by default, it checks only size and date to know if file is updated or not) !
I just added –checksum option to rsync to update these files too.
My data synchronization works well now.