awsalfresco

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/ctlscript.sh stop
    
  • Copy the content repository and indexes to a backup location:

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

    $ mysqldump -u root -p bitnami_alfresco > /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/ctlscript.sh stop
    $ sudo /opt/bitnami/ctlscript.sh start mysql
    
  • Remove the existing content repository and replace it with the backup from the older version:

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

    ...
    ### database connection properties ###
    db.driver=org.gjt.mm.mysql.Driver
    db.username=bitnami
    db.password=DATABASE_PASSWORD
    db.name=bitnami_alfresco
    db.url=jdbc:mysql://localhost:3306/bitnami_alfresco?useUnicode=yes&characterEncoding=UTF-8
    
  • 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 < backup.sql
    
  • Restart the servers:

    $ sudo /opt/bitnami/ctlscript.sh 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 August 31, 2018