How can migrate Community from 5.2 to 6.2

Showing results for 
Search instead for 
Did you mean: 
Active Member

How can migrate Community from 5.2 to 6.2

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):

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


# 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 (
# 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"

image: alfresco/alfresco-content-repository-community:6.2.0-ga
mem_limit: 1500m
-Ddb.url=jdbcSmiley Tongueostgresql://postgres:5432/alfresco
-Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"





-Xms1500m -Xmx1500m
- ./alf_data:/usr/local/tomcat/alf_data

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

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

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

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

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

image: alfresco/alfresco-share:6.2.0
mem_limit: 1g
REPO_HOST: "alfresco"
REPO_PORT: "8080"

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

image: alfresco/alfresco-search-services:1.4.0
mem_limit: 2g
#Solr needs to know how to register itself with Alfresco
#Alfresco needs to know how to call solr
#Create the default alfresco and archive cores
#HTTP by default
- "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
- 8083:8983 #Browser port

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

image: alfresco/acs-community-ngnix:1.0.0
mem_limit: 128m
- alfresco
- 8080:8080
- 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


5 Replies
Active Member II

Re: How can migrate Community from 5.2 to 6.2


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 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.


Active Member

Re: How can migrate Community from 5.2 to 6.2

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:


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:


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 :


Cordially, Serhat


Active Member II

Re: How can migrate Community from 5.2 to 6.2

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.



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
$ ./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


Active Member

Re: How can migrate Community from 5.2 to 6.2

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:

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

thanks again, best regards, Serhat


Community Manager
Community Manager

Re: How can migrate Community from 5.2 to 6.2

Hi @serakoc 

You may find this thread useful re: Share ports.


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