cancel
Showing results for 
Search instead for 
Did you mean: 

ReIndex after backup

javi_gimeno
Champ in-the-making
Champ in-the-making
Good morning,
according to our contingency plan I am doing a new environment for testing. For this I took the backup of the production environment to restore an identical copy in this new environment. The environments are:
Production:
W2003 Server 32 Bits + Tomcat 6 + MySQL 5.1 + Alfresco 3.2 CE + Java 1.6
2 Processor Intel Xeon 5130 2Ghz (2 core).
4 GB RAM
JVM: JAVA_OPTS=-Xms768m -Xmx1536m -Xss1m -XX:MaxPermSize=128m -Xcomp -Xbatch -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=384m -XX:CMSInitiatingOccupancyFraction=80 -server -Dalfresco.home=%ALF_HOME% -Dcom.sun.management.jmxremote

Test:
Virtual Machine
W2008 Server 64bits + Tomcat 6 + MySQL 5.1 64 bits +Alfresco 3.2 CE + Java 1.6 64 Bits
4 Processor Intel Xeon E7440 2.4Ghz
8GB RAM
JVM: JAVA_OPTS=-server -Xcomp -Xbatch -Xss1M -Xms2G -Xmx3G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=1G -XX:MaxPermSize=256M -XX:CMSInitiatingOccupancyFraction=80

To restore the backup follow the steps in the wiki backup. When restored the indices gives an error:
14:01:46,772 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No se hicieron cambios en el esquema.
14:01:58,348 DEBUG [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Performing index recovery for type: FULL
14:02:03,455 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Iniciada la recuperación de índices: 205.526 transaciones.
15:42:36,353 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    10 % completado.
19:06:47,530 ERROR [org.hibernate.transaction.JDBCTransaction] JDBC rollback failed
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
   at com.mysql.jdbc.Util.getInstance(Util.java:381)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
   at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3032)
   at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4606)
   at org.apache.commons.dbcp.DelegatingConnection.rollback(DelegatingConnection.java:328)
   at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.rollback(PoolingDataSource.java:312)
   at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
   at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:597)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:753)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:730)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:332)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.completeTransactionAfterThrowing(SpringAwareUserTransaction.java:562)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.rollback(SpringAwareUserTransaction.java:532)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:387)
   at org.alfresco.repo.node.index.AbstractReindexComponent$ReindexWorkerRunnable.run(AbstractReindexComponent.java:780)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)

Is it normal to take so long for 205,526 transactions?, To get the 10% of completed takes over an hour and a half, plus the following answer him nearly 5 hours and returns an error as if it had a problem with the database data …

Anyone feel the same? do you advise me to solve the problem?, I read a lot for the forum and the logs I've seen other installations take less time to reindex the index.

Thanks and regards.
5 REPLIES 5

pjcaracuel
Champ in-the-making
Champ in-the-making
It´s easy.

Put in alfresco-global.properties
index.recovery.mode=FULL

Too, delete de index folder and backup index folder (lucene-indexes) and when you start alfresco, index will be create.

Regards

javi_gimeno
Champ in-the-making
Champ in-the-making
Hi abhaychaware
Documenting how to back up and restore is described here:
http://wiki.alfresco.com/wiki/Backup_and_Restore

I recommend you make a cold backup, with Alfresco stopped. Once you want to restore, with Alfresco stopped, you should:
1 - Restore the copy of the database
2 - Copy the entire contents of the folder alf_data
3 - In some places recommended to delete the contents of the folders backup-lucene-index and lucene-index.
4 - repository.properties file you have to do is put the property index.recovery.mode = FULL
5 - Start Alfresco and begin to restore the index. Once refurbished, this property should be left to index.recovery.mode = AUTO.

The performance of the restoration of the copies is based on the version you have of Alfresco, the database manager, operating system, the hardware you are using etc …

There is a post where they write some tips to retrieve the index:
http://forums.alfresco.com/en/viewtopic.php?t=10984

javi_gimeno
Champ in-the-making
Champ in-the-making
In manual data backup and recovery is essential to have a copy of the database and repository. I think if you lack either of these two components can not retrieve the repository. I have read some cases similar to yours in the forum and there is no solution, at least I do not know.

pjcaracuel
Champ in-the-making
Champ in-the-making
You must start from a clean installation and do not forget to backup properly to the next time .. Sorry

pjcaracuel
Champ in-the-making
Champ in-the-making
If you have an ACP files with all repository content then you can do the import action with alfresco web client. But the import will be in a alfresco instance clean.

Regards