cancel
Showing results for 
Search instead for 
Did you mean: 

How can migrate Community from 5.2 to 6.2

serakoc
Champ on-the-rise
Champ on-the-rise

Hello everyone !

I am currently on relatively complicated job, i explain to you.

The goal is a production of a migration of alfresco 5.2 (originaly in 4.2, but the migration to 5.2 is good) to a alfresco 6.2.

I use for it the docker configuration by default.

Firstly, i have juste add a volumes on postgres -> it is ok, no error.

Then i have add a volumes for ACS -> it is ok, with owner change and rights.

When I run the migration, i.e. as explained here (just fort upgrade part): 

https://www.keensoft.es/en/upgrading-from-alfresco-5-to-alfresco-6-our-way/

Here is the content of my docker-compose.yml :

Spoiler

# This docker-compose file will spin up an ACS cluster on a local host or on a server and it requires a minimum of 12GB Memory to distribute among containers.
# Limit container memory and assign X percentage to JVM. There are couple of ways to allocate JVM Memory for ACS Containers
# For example: 'JAVA_OPTS: "$JAVA_OPTS -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"'
# See Oracle docs (https://docs.oracle.com/javase/9/gctuning/parallel-collector1.htm#JSGCT-GUID-CAB83393-3438-44ED-98F0...).
# If the container memory is not explicitly set then the flags above will set the max heap default to 1/4 of the container's memory, which may not be ideal.
# For performance tuning, assign the container memory and give a percentage of it to the JVM.

# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"

services:
alfresco:
image: alfresco/alfresco-content-repository-community:6.2.0-ga
mem_limit: 1500m
environment:
JAVA_OPTS: "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbcSmiley Tongueostgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dshare.host=127.0.0.1
-Dshare.port=8080
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
-Dmessaging.broker.url=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE

-Dlocal.transform.service.enabled=true
-DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
-DlocalTransform.imagemagick.url=http://imagemagick:8090/
-DlocalTransform.libreoffice.url=http://libreoffice:8090/
-DlocalTransform.tika.url=http://tika:8090/
-DlocalTransform.misc.url=http://transform-misc:8090/

-Dlegacy.transform.service.enabled=true
-Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
-Djodconverter.url=http://libreoffice:8090/
-Dimg.url=http://imagemagick:8090/
-Dtika.url=http://tika:8090/
-Dtransform.misc.url=http://transform-misc:8090/

-Dauthentification.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap
-Dldap.authentication.active=true
-Dldap.synchronization.active=true

-Dalfresco_user_store.adminpassword=a069705b7b1b4dd119a5080972ea4d1b
-Dalfresco_user_store.adminusername=abeecher


-Dcsrf.filter.enabled=false
-Xms1500m -Xmx1500m
"
volumes:
- ./alf_data:/usr/local/tomcat/alf_data

alfresco-pdf-renderer:
image: alfresco/alfresco-pdf-renderer:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ports:
- 8090:8090

imagemagick:
image: alfresco/alfresco-imagemagick:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ports:
- 8091:8090

libreoffice:
image: alfresco/alfresco-libreoffice:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ports:
- 8092:8090

tika:
image: alfresco/alfresco-tika:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ports:
- 8093:8090

transform-misc:
image: alfresco/alfresco-transform-misc:2.1.0
mem_limit: 1g
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ports:
- 8094:8090

share:
image: alfresco/alfresco-share:6.2.0
mem_limit: 1g
environment:
REPO_HOST: "alfresco"
REPO_PORT: "8080"
JAVA_OPTS: "
-Xms500m
-Xmx500m
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
-Dalfresco.protocol=http
"

postgres:
image: postgres:11.4
mem_limit: 512m
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG
ports:
- 5432:5432
volumes:
- ./pg_data/:/var/lib/postgresql/data

solr6:
image: alfresco/alfresco-search-services:1.4.0
mem_limit: 2g
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
#HTTP by default
- ALFRESCO_SECURE_COMMS=none
- "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
ports:
- 8083:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:5.15.8
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

proxy:
image: alfresco/acs-community-ngnix:1.0.0
mem_limit: 128m
depends_on:
- alfresco
ports:
- 8080:8080
links:
- alfresco
- share

I have a context initalization failed,  Cannot find Alfresco Repository on this server,

with this config file as well as the website tutorial (just the upgrades part) am i right, am i not?

Thank's for your reply,

Cordially, Serhat

1 ACCEPTED ANSWER

Hi Serakoc,

Hope you have  remove SOLR indexes and allow the server to re-index again all the content before start definitively your brand new Alfresco 6.

Also its always better to upgrade 5.2 to 6.0 and then to 6.2 as Alfresco suggested.

image

Please see my upgrade steps:

Without stopping Alfresco 5 service, we started a copy of the contents.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/
Once the synchronisation was full, we stopped Alfresco 5 service and we performed a database dump.

$ sudo service alfresco stop
  
$ sudo su - postgres
  
$ cd /opt/alfresco/postgresql/bin
$ ./pg_ctl start
  
$ ./pg_dump alfresco > /tmp/exportFile-20180801.dmp
Password:
  
$ ./pg_ctl stop
$ exit
We copied the file to the new server and we restored the database in Alfresco 6.

$ docker-compose up postgres
 
$ cat exportFile-20180801.dmp | docker exec -i docker_postgres_1 psql -U alfresco -d alfresco
After that, a new synchronisation to gather last changes.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/
And we decided to remove SOLR indexes and allow the server to re-index again all the content before start definitively our brand new Alfresco 6.

$ rm -rf /opt/alfresco/data/solr-data
 
$ docker-compose up -d

View answer in original post

5 REPLIES 5

arjunmony
Star Contributor
Star Contributor

Hello,

Can you please post the error trace from alfresco.log file.

Hope you did the migartion in the below order.

  1. - Install the Alfresco 6.0 first and do not start it.
  2. - Take a dump of database of your Alfresco 5.0
  3. - Point to the alf_data folder of 5.0 by making changes in the alfresco-global.properties file in 6.0
  4. - Restore the dump to 6.0
  5. - start the 6.0 server check whether the contents and other properties are properly working or not.
  6. - Try to apply the customizations if there was anything.

-Arjun

serakoc
Champ on-the-rise
Champ on-the-rise

Hi Arjun, thank's for your reply.

I followed the indications, following this, several errors in the logs occurred one after the other:

1) the dir.root variable was on ./alf_data, I had to modify to / usr / local / tomcat / alf_data.

2) Here is an error I got:

Spoiler

org.alfresco.service.cmr.repository.ContentIOException: 03290000

Failed to create directory for file storage: / usr / local / tomcat / alf_data / contentstore / 2021/4/29/8 / 24

To do this, change the owner of the alf_data folder (from the docker volume mapping) to 33000 (33000 being the alfresco guid in the container).

Currently I am blocking on the patches ...

Here is the error encountered in the logs:

Spoiler

2021-04-29 09: 14: 32,432 INFO [admin.patch.PatchExecuter] [localhost-startStop-1] Checking for patches to apply ... 2021-04-29 09: 14: 33,096 INFO [admin.patch.PatchExecuter] [localhost-startStop-1] Applying patch 'patch.db-V4.2-remove-old-index-act' (Delete unnecessary indexes add with older version of Activiti in 4.0 branch.).

2021-04-29 09: 14: 33,102 ERROR [admin.patch.PatchExecuter] [localhost-startStop-1] 03290018 Patch 'patch.db-V4.2-remove-old-index-act' was last supported on version 5.2 .x. Please follow an incremental upgrade using version 5.2.x.

2021-04-29 09: 14: 33,183 ERROR [admin.patch.PatchExecuter] [localhost-startStop-1] === Failed to apply patch === ID: patch.db-V4.2-remove-old-index -actRESULT: 03290018 Patch 'patch.db-V4.2-remove-old-index-act' was last supported on version 5.2.x. Please follow an incremental upgrade using version 5.2.x. ======================================

2021-04-29 09: 14: 33,186 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed org.alfresco.error.AlfrescoRuntimeException: 03290019

Not all patches could be applied

He explains to me that a patch dating from version 4.2 is no longer compatible with version 6.2. Do you know how to remove the application of a patch, or at best, update the patch? 

Here is the all alfresco.log file :

https://docs.google.com/document/d/e/2PACX-1vR0PFq6qusj9R27wY48pkd2HZCH4IvCp7f8QmxuXr5i4JecUTZsDOCTy...

Cordially, Serhat

Hi Serakoc,

Hope you have  remove SOLR indexes and allow the server to re-index again all the content before start definitively your brand new Alfresco 6.

Also its always better to upgrade 5.2 to 6.0 and then to 6.2 as Alfresco suggested.

image

Please see my upgrade steps:

Without stopping Alfresco 5 service, we started a copy of the contents.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/
Once the synchronisation was full, we stopped Alfresco 5 service and we performed a database dump.

$ sudo service alfresco stop
  
$ sudo su - postgres
  
$ cd /opt/alfresco/postgresql/bin
$ ./pg_ctl start
  
$ ./pg_dump alfresco > /tmp/exportFile-20180801.dmp
Password:
  
$ ./pg_ctl stop
$ exit
We copied the file to the new server and we restored the database in Alfresco 6.

$ docker-compose up postgres
 
$ cat exportFile-20180801.dmp | docker exec -i docker_postgres_1 psql -U alfresco -d alfresco
After that, a new synchronisation to gather last changes.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/
And we decided to remove SOLR indexes and allow the server to re-index again all the content before start definitively our brand new Alfresco 6.

$ rm -rf /opt/alfresco/data/solr-data
 
$ docker-compose up -d

serakoc
Champ on-the-rise
Champ on-the-rise

It is ok for me...

Yes indeed, thank you very much: D
The patches are invalid because I did not proceed as indicated on the site ... (4.2 -> 5.2 -> 6.2 / 7.0) From version 5.2 we can indeed go up to 7.0 currently ...

I had to make some modifications ... alfresco not having write rights on the volumes (alf_data in particular) I had to change the owner of the folder mapped to 33000, which corresponds to the alfresco user of the container .

Following this, in order to add the ldap-ad authentication installed on version 4.2, I added the relevant properties to the configuration file (-Dauthentication.chain = ldap: ldap .........) , I mapped the subsytems folder so that I could add the authentication and synchronization folders as they were installed from version 4.2.

So there Smiley Happy

I wish I added https on top of that, I saw this post:
https://stackoverflow.com/a/24536839

I just can't find the share-config-custom.xml file, any idea where it is?

thanks again, best regards, Serhat

EddieMay
World-Class Innovator
World-Class Innovator

Hi @serakoc 

You may find this thread useful re: Share ports.

HTH

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!