My Diary: Upgrading Alfresco Installations

Screen Shot 2014-04-11 at 10.10.58 PMHere’s my diary from the “epic” experience of simply trying to upgrade Alfresco installations from 4.2.c to 4.2.f. I found the community documentation to be dated and had minimal confidence in its current validity. Still, it helped. These are my final notes on the process and in actuality there were a lot of wrong turns I made along the way before landing with the below. I spent like 5 hours working this out. Crazy.

In my case, my 4.2.c installation was performed by the .bin installer from the Alfresco website. Similarly, my 4.2.f installation used the .bin install method as well.

Note my alfresco installations are located on my server under

  • /opt/alfresco-4.2.c/
  • /opt/alfresco-4.2.f/

My original alfresco installation had an init script created to run it, named alfresco.

Upgrade Steps

  1. Run /opt/alfresco-4.2.c/postgesql/bin/pg_dump alfresco > /alfresco-4.2.c-database.postgresql 
  2. service alfresco stop 
  3. Download Alfresco 4.2.f installer. 
  4. Run Alfresco 4.2.f installer. I previously opted to install alfresco-4.2.c with an init service wrapper. The service for my 4.2.c install is therefore called “alfresco”. The 4.2.f installer required I pick an unused named. So my 4.2.f installation has the service name “alfresco42f”. 
  5. cp -ra /opt/alfresco-4.2.f/alf_data /opt/alfresco-4.2.f/alf_data__ORIG 
  6. cp -ra /opt/alfresco-4.2.c/alf_data /opt/alfresco-4.2.f/ 
  7. mkdir /opt/alfresco-4.2.f/alf_data/PENDINGDEL 
  8. mv  /opt/alfresco-4.2.f/alf_data/postgresql  /opt/alfresco-4.2.f/alf_data/PENDINGDEL/ 
  9. mv  /opt/alfresco-4.2.f/alf_data/solr  /opt/alfresco-4.2.f/alf_data/PENDINGDEL/ 
  10. mv  /opt/alfresco-4.2.f/alf_data/keystore  /opt/alfresco-4.2.f/alf_data/PENDINGDEL/ 
  11. cp -ra  /opt/alfresco-4.2.f/alf_data__ORIG/*  /opt/alfresco-4.2.f/alf_data/ 
  12. service alfresco42f start (wait a couple of mins so it start sanely). 
  13. Create a new database in the postgres instance that came with the new installation:
    /opt/alfresco-4.2.f/postgresql/bin/psql will get you the postgres command line
    CREATE DATABASE alfresco_42c; will create a database named alfresco_42c.
  14. Load the backup copy of the database in to the new database from the previous step:
    /opt/alfresco-4.2.f/postgresql/bin/psql alfresco_42c
     < /alfresco-4.2.c-database.postgresql
     
  15. Edit /opt/alfresco-4.2.f/tomcat/shared/classes/alfresco-global.properties to use the alfresco_42c database. 
  16. Check that the alfresco site now appears to have been successfully upgraded.
  17. Remove the startup script for the previous alfresco version:
    update-rc.d alfresco remove

  18. Reboot the server and verify that it starts up you Alfresco instance the way you expect.