Upgrading Alfresco without the content binary files (for testing and validating purposes)

Blog Post created by folcina Employee on Nov 8, 2018

This post is going to cover how to upgrade an Alfresco instance without using the data in the content store. This is a useful scenario to quickly validate an upgrade, as it is usually costly to clone the data on large repositories.


For instance, imagine you want to make a clone of a production environment to test an upgrade, and the repository (content store) has a several TB of data, it will require a lot of time (and money) to make a clone of such amount of content. However, following this method you'll speed up the upgrading process as it won't be necessary to use the content. 


Needless to say this is a method to quickly do an upgrade ONLY for testing purposes. The recommended way to upgrade an Alfresco instance is fully documented here.


Having said that, when using this method and bootstrapping the new version for the first time without the data, Alfresco will be able to complete the process but content won't be accessible (metadata will). This is still useful to estimate how long it takes to upgrade the DB or to make simple functionality tests that aren't content dependant.


The instance used on this post is a vanilla version of Alfresco 4.2.8 that will be upgraded to 5.2.4.


These are the steps to follow:


1. Find the binary files associated with the descriptor node.


The only binary files from the content store that Alfresco needs to bootstrap and/or do an upgrade are those linked to the descriptor node. Depending on the Alfresco version the descriptor node has 2 or 3 binary files associated. 


The quickest way to identify the binary files associated with the descriptor node is by executing the following SQL query:


select uuid,content_url from alf_node n,alf_node_properties np,alf_content_url cu,alf_content_data cd where and and and n.uuid IN (select n.uuid from alf_node n,alf_store s where AND s.identifier='system');

The output of the previous query in the Alfresco instance used in this post is:




Therefore the binaries required from the content store to be able to upgrade/bootstrap the Alfresco instance in this post are:

  • {ALFRESCO_DIR}/alf_data/contentstore/2018/11/8/15/34/8b30b10b-e27a-4fe4-8b3e-c89798c6e3e0.bin
  • {ALFRESCO_DIR}/alf_data/contentstore/2018/11/8/15/38/84f6eaf2-3cb7-44f3-8caf-2c9b7ae73a78.bin
  • {ALFRESCO_DIR}/alf_data/contentstore/2018/11/8/15/35/ae13363d-79a9-42ac-b2cc-99366a76eaf7.bin


To have a better context of the nature of those binary files, you can find the descriptor node in Alfresco using the nodebrowser. In this case, the noderef will be:


The following screenshot shows how to search the descriptor node using the nodebrowser:

This screenshot shows all the properties for the descriptor node:

Notice that the descriptor node has the following properties associated with the binary files found with the SQL query:


2. Set up the new instance


For this test, Alfresco will be upgraded to 5.2.4 therefore we need to have an instance of that version ready to be used for the upgrade.


This instance need the following:

  • To point to a copy of the DB of the Alfresco 4.2.8 instance.
  • A copy of the binary files identified on step 1. They should be placed on alf_data/contentstore folder keeping the same path. (e.g. {ALFRESCO_DIR}/alf_data/contentstore/2018/11/8/15/34/8b30b10b-e27a-4fe4-8b3e-c89798c6e3e0.bin).


3. Upgrade


Once the new instance with Alfresco 5.2.4 is ready with the requirements of step 2, we just need to bootstrap it. Alfresco will upgrade the database and will create new files on the content store. No warnings regarding missing files will be seen in the logs. 


Moreover, when upgrading from Alfresco 4.2.x version to 5.2.x, new configuration files such as user dashboards will be created, therefore we will be able to log in into share with admin user with no issues.


The descriptor node will be updated with the new Alfresco version (5.2.4) and two new binaries linked to this node will be created as shown in the following screenshot:



For further updates you only need to repeat the steps in this post.