We assume you have a previous Alfresco community installation from an installation bundle. This describes how you can safely upgrade to a new Alfresco version by installing a new bundle alongside the old one and have the possibility of later switching between the two, if needed. The instructions are based on a Windows installation with Alfresco running as a service and using Postgre but the procedure is more or less the same on Linux.
- Install the new Alfresco community bundle with the higher version number than the previous Alfresco installation. (You can install the new Alfresco in the folder alongside the old one, e.g. in c:projectsservers or similar.) Important! Do NOT start Alfresco at the end of the installation process.
- Shut down the old Alfresco tomcat service. (Leave the Alfresco Postgre service running.)
- Go to the old Alfresco folder and run: postgresqlbinpg_dump.exe -h 127.0.0.1 -p 5432 -U alfresco -f alf_pgdump.sql
- Shut down the old Alfresco Postgre SQL service
- Change settings of the two old services (Tomcat + Postgre) to Disabled.
- Start up the new Alfresco Postgre service. Important! Just the Postgre service NOT the Tomcat service.
- Run: postgresqlbinpsql -h 127.0.0.1 -p 5432 -U alfresco -f alf_pgdump.sql (assuming you are still in the directory where alf_pgdump.sql is located)
- Copy the previous Alfresco installation’s alf_data/contentstore to the new installation (there is no contentstore folder in the fresh installation’s alf_data folder since we haven’t started up the new Alfresco yet).
- Edit the new Alfresco’s alfresco-global.properties and copy in any customizations you had from the old installation. (Afterwards run a diff between the two files and verify. It should mainly be paths that differ.)
- Edit the new setenv.bat and increase the JVM memory as in the old installation.
- Create AMPs that contain the modifications you’ve made of Alfresco and install them into the new installation. Make sure you increase the version number before you create the AMPs since the old version number is stored in the database that we use.
- Copy in any other external modules you may have used such as language pack JARs or other third party AMPs.
- Copy in other customization that you’ve made such as changes to Tomcat’s server.xml or share-config-custom.xml.
- Start up Alfresco and follow the log.
- When Alfresco is started as a Windows service, the JAVA_OPTS in setenv.bat are ignored after the service is created. Verify that the service has the right JAVA_OPTS by following the instructions in this blog post. Also verify that the working directory is correct as explained in this blog post.
Following this procedure you know you have an intact system since it was created from scratch using the bundle, and you can easily switch between the old and the new version since they both remain and have their separate databases. Just make sure you switch to the correct Postgre service if you intend to roll-back the procedure.