cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to existing MySQL data

cyber-wizard
Champ in-the-making
Champ in-the-making
We were running Alfresco 2.0 on a server and had started to evaluate it. It seems that the evaluation server was interpreted as a production server and a fair amount of data was composed so I can't just do a fresh installation and have users start over. I'm not entirely certain why production data was entered during the eval period but it's happened. One day, following a server reboot, I was unable to get Alfresco up and running again. After several days of unsuccessful attempts to fix it , the boss suggested that we move to 2.1 as he was planning on that anyway. I backed up my Alfresco directory and did a fresh installation of 2.1 Tomcat Community in a new location on the server.

I'm running
SuSE Linux Enterprise Server 10
Alfresco Community 2.1
Tomcat 5.5.23
mysql 5.0.37
jdk1.5.0_11

I was unable to get that fresh installation of Alfresco/Tomcat to start no matter what I did to it. After a few more days of fighting, I did a mysqldump of my alfresco db, dropped the db and used db_setup.sql to recreate the alfresco db. With that done, Alfresco started working just fine. Unfortunately I still need my old data.

Can anyone advise me on how to connect this new 2.1 installation to my old data from 2.0? I restored the mysql dump back into the alfresco db, but that put me right back where I started before I recreated the database. I also transferred the alf_data directory from my 2.0 backup into the new 2.1 installation but that didn't help either.

I would also be interested in hearing in how everyone is backing up their Alfresco data. If a mysqldump isn't sufficient, I'll find myself in a tight spot if I'm in a disaster recovery position one day.
5 REPLIES 5

kevinr
Star Contributor
Star Contributor
A SQL dump is not enough - Alfresco also needs the "alf_data" folder in the /bin directory of tomcat/jboss. The DB contains the meta-data and the alf_data folder contains the lucene-indexes and content for the files in the repository. You need both backed up also for disaster recovery.

However that's not going to help as a DB dump+alf_data move will only work between the same versions of alfresco i.e. 2.1->2.1 but 2.0->2.1 won't work as the schemas are different. If you still have your 2.0 installation (i.e. DB and alf_data) then i suggest you try upgrading it to 2.1. To do this, you just copy the new alfresco.war file from the 2.1 package over the top of the old alfresco.war file in your 2.0 installation (do this when the server is stopped!). Then when you start the server it will automatically attempt to upgrade the DB schema from 2.0->2.1 (Alfresco has always done this - that is how people move from 1.4->2.0-2.1 etc.). If you get errors during that progress, please post them here and we'll try to help you.

Thanks,

Kevin

schneika
Champ in-the-making
Champ in-the-making
I will do an Repository-Transfer from one machine to another. I use Linux with V2.1.0CE Final on both machines.

I copy the complete /opt/Alfresco-Directory (with alf_data) and take a mysqldump from alfresco to the new machine.
After Index Recovery i get the following error in catalina.out:

CompilerOracle: exclude org/apache/lucene/index/IndexReader$1 doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeDeletions
26.09.2007 14:36:54 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
26.09.2007 14:36:54 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2578 ms
26.09.2007 14:36:54 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
26.09.2007 14:36:54 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
26.09.2007 14:36:54 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
26.09.2007 14:36:56 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
14:37:08,225 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/dictionaryModel.xml
14:37:08,297 INFO  [repo.dictionary.DictionaryDAO] Registered model d:dictionary
14:37:08,297 INFO  [repo.dictionary.DictionaryDAO] Registered namespace '' (prefix '')
14:37:08,297 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org' (prefix 'alf')
14:37:08,297 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/dictionary/1.0' (prefix 'd')
14:37:08,297 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/view/repository/1.0' (prefix 'view')
14:37:08,298 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/systemModel.xml
14:37:08,342 INFO  [repo.dictionary.DictionaryDAO] Registered model sys:systemmodel
14:37:08,343 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/system/1.0' (prefix 'sys')
14:37:08,343 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/system/registry/1.0' (prefix 'reg')
14:37:08,343 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/system/modules/1.0' (prefix 'module')
14:37:08,344 INFO  [repo.dictionary.DictionaryDAO] Loading model from org/alfresco/repo/security/authentication/userModel.xml
14:37:08,373 INFO  [repo.dictionary.DictionaryDAO] Registered model usr:usermodel
14:37:08,373 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/user/1.0' (prefix 'usr')
14:37:08,374 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/contentModel.xml
14:37:08,422 INFO  [repo.dictionary.DictionaryDAO] Registered model cm:contentmodel
14:37:08,422 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/content/1.0' (prefix 'cm')
14:37:08,423 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/bpmModel.xml
14:37:08,762 INFO  [repo.dictionary.DictionaryDAO] Registered model bpm:businessprocessmodel
14:37:08,763 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/bpm/1.0' (prefix 'bpm')
14:37:08,764 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/wcmModel.xml
14:37:08,767 INFO  [repo.dictionary.DictionaryDAO] Registered model wcm:wcmmodel
14:37:08,767 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/wcmmodel/1.0' (prefix 'wcm')
14:37:08,768 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/forumModel.xml
14:37:08,781 INFO  [repo.dictionary.DictionaryDAO] Registered model fm:forummodel
14:37:08,781 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/forum/1.0' (prefix 'fm')
14:37:08,782 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/applicationModel.xml
14:37:08,787 INFO  [repo.dictionary.DictionaryDAO] Registered model app:applicationmodel
14:37:08,787 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/application/1.0' (prefix 'app')
14:37:08,788 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/wcmAppModel.xml
14:37:09,024 INFO  [repo.dictionary.DictionaryDAO] Registered model wca:applicationmodel
14:37:09,024 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/wcmappmodel/1.0' (prefix 'wca')
14:37:09,025 INFO  [repo.dictionary.DictionaryDAO] Loading model from org/alfresco/repo/action/actionModel.xml
14:37:09,177 INFO  [repo.dictionary.DictionaryDAO] Registered model act:actionmodel
14:37:09,178 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/action/1.0' (prefix 'act')
14:37:09,179 INFO  [repo.dictionary.DictionaryDAO] Loading model from org/alfresco/repo/rule/ruleModel.xml
14:37:09,181 INFO  [repo.dictionary.DictionaryDAO] Registered model rule:rulemodel
14:37:09,182 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/rule/1.0' (prefix 'rule')
14:37:09,182 INFO  [repo.dictionary.DictionaryDAO] Loading model from org/alfresco/repo/version/version_model.xml
14:37:09,187 INFO  [repo.dictionary.DictionaryDAO] Registered model ver:versionmodel
14:37:09,187 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/versionstore/1.0' (prefix 'ver')
14:37:09,188 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/deprecated/deprecated_contentModel.xml
14:37:09,190 INFO  [repo.dictionary.DictionaryDAO] Registered model cm:deprecated_contentmodel
14:37:31,924 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
14:37:32,776 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/extension/vsaModel.xml
14:37:32,783 INFO  [repo.dictionary.DictionaryDAO] Registered model my:mynewmodel
14:37:32,783 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'my.new.model' (prefix 'my')
14:37:35,590 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/model/jcrModel.xml
14:37:35,595 INFO  [repo.dictionary.DictionaryDAO] Registered model jcr:jcrmodel
14:37:35,595 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.jcp.org/jcr/1.0' (prefix 'jcr')
14:37:35,595 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.jcp.org/jcr/nt/1.0' (prefix 'nt')
14:37:35,595 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.jcp.org/jcr/mix/1.0' (prefix 'mix')
14:37:35,595 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.jcp.org/jcr/sv/1.0' (prefix 'sv')
14:37:35,596 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.w3.org/XML/1998/namespace' (prefix 'xml')
14:37:38,427 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
14:37:40,754 INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
14:37:40,915 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/workflow/workflowModel.xml
14:37:40,920 INFO  [repo.dictionary.DictionaryDAO] Registered model wf:workflowmodel
14:37:40,920 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/workflow/1.0' (prefix 'wf')
14:37:40,920 INFO  [repo.dictionary.DictionaryDAO] Loading model from alfresco/workflow/wcmWorkflowModel.xml
14:37:40,925 INFO  [repo.dictionary.DictionaryDAO] Registered model wcmwf:workflowmodel
14:37:40,925 INFO  [repo.dictionary.DictionaryDAO] Registered namespace 'http://www.alfresco.org/model/wcmworkflow/1.0' (prefix 'wcmwf')
14:37:42,871 INFO  [node.index.FullIndexRecoveryComponent] Index-Wiederherstellung gestartet: 52.568 Transaktionen.
14:40:38,007 INFO  [node.index.FullIndexRecoveryComponent]    10 % vollendet.
14:46:26,774 INFO  [node.index.FullIndexRecoveryComponent]    20 % vollendet.
14:55:12,426 INFO  [node.index.FullIndexRecoveryComponent]    30 % vollendet.
14:58:56,064 INFO  [node.index.FullIndexRecoveryComponent]    40 % vollendet.
15:02:25,088 INFO  [node.index.FullIndexRecoveryComponent]    50 % vollendet.
15:03:33,667 INFO  [node.index.FullIndexRecoveryComponent]    60 % vollendet.
15:08:33,623 INFO  [node.index.FullIndexRecoveryComponent]    70 % vollendet.
15:13:20,905 INFO  [node.index.FullIndexRecoveryComponent]    80 % vollendet.
15:18:31,739 INFO  [node.index.FullIndexRecoveryComponent]    90 % vollendet.
15:25:04,821 INFO  [node.index.FullIndexRecoveryComponent]    100 % vollendet.
15:25:04,829 INFO  [node.index.FullIndexRecoveryComponent] Index-Wiederherstellung vollendet.
java.lang.reflect.InvocationTargetException
   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:494)
   at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
   at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
   at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
   at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
   at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
   at org.alfresco.repo.content.transform.PoiHssfContentTransformer.transformInternal(PoiHssfContentTransformer.java:87)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:246)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:210)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.indexProperty(ADMLuceneIndexerImpl.java:821)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocuments(ADMLuceneIndexerImpl.java:546)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.indexImpl(AbstractLuceneIndexerImpl.java:631)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.indexImpl(AbstractLuceneIndexerImpl.java:656)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.flushPending(AbstractLuceneIndexerImpl.java:788)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.doPrepare(ADMLuceneIndexerImpl.java:1337)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.prepare(AbstractLuceneIndexerImpl.java:471)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.prepare(AbstractLuceneIndexerAndSearcherFactory.java:679)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:634)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:821)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:637)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:420)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:239)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:220)
   at org.alfresco.repo.node.index.IndexRecoveryBootstrapBean.onBootstrap(IndexRecoveryBootstrapBean.java:35)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.ArrayIndexOutOfBoundsException
   at java.lang.System.arraycopy(Native Method)
   at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
   at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
   at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
   at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
   at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
   at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
   … 65 more

Tomcat/alfresco wont start.
Whats going wrong here?

vijay_alfresco
Champ in-the-making
Champ in-the-making
Did you add the data folder in the repository.properties.
like dir.root=c:/………

–Vijay

kevinr
Star Contributor
Star Contributor
Looks like a file could not be indexed because the transformer responsible for converting that mimetype to text has thrown an exception. However, that should _not_ stop the indexing process nor should it stop tomcat from starting. I'll ask the appropriate engineer why that could happen.

Thanks,

Kevin

schneika
Champ in-the-making
Champ in-the-making
To vijay:
Yes i have already added the complete linux-path for dir.root= /opt/Alfresco/alf_data

To kevinr:
After a restart without Full-Recovery (now i take VALIDATE) the problem has gone and everything seems ok so long.

Thanx for all