cancel
Showing results for 
Search instead for 
Did you mean: 

Migrate repository with replication service

martin_nedved
Champ in-the-making
Champ in-the-making
Hi,
I am trying to migrate data from one instance of Alfresco to another. I can't use standard backup procedure, because the DB and filesystem contains some inconsistent data and I want to make a "clean" copy.

I have tried to transfer data using the replication service. When transferring one site from instance A to instance B, in instance B I have following problems:

1) Default site groups are lost (all ACL too)
2) All documents has aspect "Transferred from another repository", but I dont want this.
3) All "Quickshared" documents are unavailable. When I click on view shared link, I get error: "It Appears That this shared file link has been removed"
4) and the document cannot be unshared.

here is log:  2013-09-24 17:44:34,727  ERROR [scripts.quickshare.QuickShareMetaDataGet] [http-apr-8080-exec-10] Unable to find: iONcd01ORp2aCZOhkSS5HA

So my question is:

1) Can I move one instance of Alfresco to second with replication service?
2) Is there a other way to move content to another instance keeping ACL, nodeRefs, quickshare links, comments, version history etc..
3) Can I repair all Quickshared documents using Javascript API (unshare and share again)?

Alfresco version 4.2.d on both instances (Instance A is upgraded from 4.2.c).


Thanks

Martin Nedved
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Hello,

if you want to move one instance of Alfresco to another with all data intact and unchanged, the only proper way to do this is a backup with data sanitation / correction of inconsistent state. You already seem to know about the consistency issues so why can't you write up a script to correct these?

Regards
Axel

martin_nedved
Champ in-the-making
Champ in-the-making
Hi Axel,
thank you for your reply. I just thing, but I am not sure, that the problem is in database. I did Full SOLR reindex, during reindexing, there was many errors in log like this:

<blockquote>2013-09-18 07:41:47,716  WARN  [solr.tracker.CoreTracker] [SolrTrackingPool-archive2] Node index failed and skipped for 26412 in Tx 31764
org.alfresco.error.AlfrescoRuntimeException: 08180000 GetNodeMetaData return status is 500
   at org.alfresco.solr.client.SOLRAPIClient.getNodesMetaData(SOLRAPIClient.java:770)
   at org.alfresco.solr.tracker.CoreTracker.indexNode(CoreTracker.java:2341)
   at org.alfresco.solr.tracker.MultiThreadedCoreTracker$NodeIndexWorkerRunnable.doWork(MultiThreadedCoreTracker.java:812)
   at org.alfresco.solr.tracker.MultiThreadedCoreTracker$AbstractWorkerRunnable.run(MultiThreadedCoreTracker.java:753)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)</blockquote>

The biggest problem with my instalation, is that I cannot access trash can items, I get only message "Error loading items". When I try to access trashcan as admin, the folowing error is logged:

<blockquote>
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: 0826113111 Access Denied.  You do not have the appropriate permissions to perform this operation.
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:50)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:161)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:79)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:447)
   at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at com.sun.proxy.$Proxy9.getProperties(Unknown Source)
   at org.alfresco.repo.web.scripts.archive.ArchivedNodeState.create(ArchivedNodeState.java:66)
   at org.alfresco.repo.web.scripts.archive.ArchivedNodesGet.executeImpl(ArchivedNodesGet.java:79)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   … 30 more
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
   at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:398)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
   … 42 more
</blockquote>

Other problem is that workflows aren't available.(click on "start workflow" button opens a empty dropdown menu).
<blockquote>
Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix wswf is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:99)
   at org.alfresco.service.namespace.QName.createQName(QName.java:121)
   at org.alfresco.repo.workflow.WorkflowQNameConverter.convertNameToQName(WorkflowQNameConverter.java:103)
   at org.alfresco.repo.workflow.WorkflowQNameConverter.convertNameToQName(WorkflowQNameConverter.java:85)
……
</blockquote>

I thing too, that the best way is to sort out errors, instead of migrating data.. But I haven't found any solution for these errors.

Thanks in advance for any help.

Martin

rajeshdk
Champ in-the-making
Champ in-the-making
Hi Axel,

We have a alfresco 4.1.5 Pilot (User Testing) environment with content on windows server and metadata on oracle db. Could you please tell me the best approach to set up the same environment on production from scratch and copy the content, metadata, users, groups, all the sites configuration, folder structures and content.

Thank you so much!

Rajesh

afaust
Legendary Innovator
Legendary Innovator
Hello,

the missing namespace issue is most likely related to a removal of the model for the workflow. Unless the model is made available, Alfresco can't convert the workflow definition to its specific abstract object type and the web script that fills the dropdown fails.

The admin should never have access problems like this unless it has been messed with, e.g. admin removed from the ALFRESCO_ADMINISTRATORS group. Have you tried setting the *.defaultAdministratorUserNames property in one of your authentication subsystem configurations to force the admin to be treated as one even if he does not belong to the ALFRESCO_ADMINISTRATORS group?

For the GetNodeMetaData 500-error it is imported to know what happens on the Repository tier. Do you have any log information for that? The excerpt posted is from the SOLR log.

Regards
Axel

gvola
Champ in-the-making
Champ in-the-making
Hello

I'm wondering how I could/should use the replication jobs for a backup purpose.
Let me try to explain …
1. I set up some replication tasks or jobs from a source (PROD) to a target (BACKUP)
2. I plan the replication to be executed every 24h
3. When I backup my PROD to Day-24H (for any reason) I use the target to restore the gap

Few questions here:
- Is the replication incremental ?
- How to reverse the content of the Target into the PROD repository
- During replication do we keep the same documents id ?

Thanks for your answers
Guillaume

mrogers
Star Contributor
Star Contributor
The replication service is not intended to be used for backup.

Answers.
No its not incremental,  however its got enough brains not to transfer content un-neccessarily.
You can't reverse the replication
yes it will maintain docid.