Upgrade Alfresco Community

It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

An in-place upgrade of the Bitnami Alfresco Stack is not recommended. Instead, the correct procedure is to install a new version of the stack and then transfer the existing content repository to it.

NOTE: The steps below assume that you have already installed a new version of the stack and have access to both the older version (which contains data to be migrated) and the newer version (which contains no data).

On the older Alfresco version:

  • Stop all servers:

      $ sudo /opt/bitnami/ stop
  • Copy the content repository and indexes to a backup location:

      $ mkdir /tmp/backup
      $ sudo cp -R /opt/bitnami/alfresco/data /tmp/backup
  • Back up the database to an SQL file, entering the database password when prompted:

      $ mysqldump -u root -p bitnami_alfresco > /tmp/backup/alfresco.sql
  • Transfer the content repository, indexes and database backup file to the new Alfresco instance, using SFTP, SSH or any other file transfer mechanism.

On the newer Alfresco version:

  • Stop all services and start only MySQL:

      $ sudo /opt/bitnami/ stop
      $ sudo /opt/bitnami/ start mysql
  • Remove the existing content repository and replace it with the backup from the older version:

      $ sudo rm /opt/bitnami/alfresco/data
      $ sudo cp -R data /opt/bitnami/alfresco/
      $ sudo chown -R tomcat:tomcat /opt/bitnami/alfresco/data
  • Obtain the current database password by viewing the contents of the Alfresco configuration file at /opt/bitnami/alfresco/tomcat/shared/classes/ and noting the value of the db.password field. You should see something like this:

      ### database connection properties ###
  • Remove the existing Alfresco database and create a new one, then grant access to the bitnami database user. Replace the DATABASE_PASSWORD placeholder in the final command with the database password obtained in the previous step.

      $ mysql -u root -p
      Password: ****
      mysql> DROP DATABASE bitnami_alfresco;
      mysql> CREATE DATABASE bitnami_alfresco;
      mysql> GRANT ALL PRIVILEGES ON bitnami_alfresco.* TO 'bitnami'@'localhost' IDENTIFIED BY 'DATABASE_PASSWORD';
  • Restore the database from the database backup file:

      $ mysql -u root -p bitnami_alfresco < /tmp/backup/alfresco.sql
  • Restart the servers:

      $ sudo /opt/bitnami/ restart

You should now be able to access the content repository from the older version in the new Alfresco instance.

For more information, refer to the official Alfresco upgrade documentation.

Last modification February 9, 2023