Skip to content

Latest commit

 

History

History
197 lines (123 loc) · 5.15 KB

linshare-upgrade-from-v6.0.2-to-v6.1.0.md

File metadata and controls

197 lines (123 loc) · 5.15 KB

LinShare upgrade guide

Note :

  • We explain in this file how to upgrade your LinShare's version.
  • Please note that all the components found in each LinShare's version (http://download.linshare.org/versions/{VERSION}) must be upgraded together.
    Each LinShare version folder, contains the dependencies required to install the version properly.
  • You can find the required versions of LinShare's dependencies here

Overview

LinShare versions number are named according to the following pattern

X.Y.Z.

  • X : Major release A major version can bring disruptive changes, among which addition/replacement/removal of technologies used in the product. They could break compatibility between two versions of LinShare.

  • Y : Minor release A minor version brings new functionalities and possibly database schema modification.

  • Z : Maintenance release Only bug fixes. No database schema modification.

In this new version of LinShare a new admin interface is introduced, so we will need two ui-admin components (old component and new one), as it will be explained later. Our goal for the future is to implement all features in the old interface into the new one.

For this migration, download the following files from this address: http://download.linshare.org/versions/6.1.0 :

  • linshare-core-6.1.0.war

  • linshare-ui-admin-6.1.0.tar.bz2

  • linshare-ui-admin-4.2.7-legacy1.tar.bz2

  • linshare-ui-user-6.1.0.tar.bz2

  • linshare-ui-upload-request-6.1.0.tar.bz2

Note :

  • In this upgrade guide we suppose that all components are downloaded on /root/downloads directory

To avoid any side effect of these critical operations, it is better to store a backup of your databases PostgreSQL and MongoDB.

Note :
In this upgrade guide we consider that the default databases PostgreSQL and MongoDB are named linshare

To do that please execute these commands :

  • Postgres linshare dump:
       pg_dump -h `host` -p `port` -U linshare -W  -f dump-linshare.sql
  • MongoDb linshare dump:

For mongo you can just dump linshare database and avoid dumping linshare-files because it contains only thumbnail and mail attachments, it won't be impacted by the upgrade process.

         mongodump --host `host` --port `port` --db=linshare

First you need to stop Apache and Tomcat services:

$ systemctl stop apache2
$ systemctl stop tomcat9.service

Once your Tomcat service is stopped, you should extract the content of linshare-core-6.1.0-sql.tar.bz2 by using this command:

$ tar xjvf  /root/downloads/linshare-core-6.1.0-sql.tar.bz2

Then you will find the required file for the migration, named linshare-core-6.1.0-sql/postgresql/Migration_6.0.0_to_6.1.0.sql

In order to upgrade LinShare from 6.0.2 to 6.1.0 you need to run the migration script as follow:

$ psql -h `host` -d linshare -U linshare -f Migration_6.0.0_to_6.1.0.sql

Once the migration script is done, you can check the database's version through the following query: select * from version.

The next step, you should replace the linShare.war with LinShare-core-6.1.0.war:

$ rm /var/lib/tomcat9/webapps/linshare.war
$ rm -fr /var/lib/tomcat9/webapps/linshare
$ cp  /root/downloads/linshare-core-6.1.0.war /var/lib/tomcat9/webapps/linshare.war
$ systemctl start tomcat9.service

Upgrade LinShare-ui-admin

As mentioned before for application LinShare UI Admin we will need two components, you can follow the steps bellow to deploy them in the apache2 repository :

$ cd /var/www/
$ rm -rf linshare-ui-admin
$ tar xjvf /root/downloads/linshare-ui-admin-4.2.7-legacy1.tar.bz2
$ chown -R www-data: linshare-ui-admin
$ cd linshare-ui-admin
$ tar xjf /tmp/linshare_data/linshare-ui-admin-6.1.0.tar.bz2
$ mv linshare-ui-admin new

Deploy the archive of the application LinShare UI User in the Apache2 repository :

$ cd /var/www/
$ rm -rf linshare-ui-user
$ tar xjvf  /root/downloads/linshare-ui-user-6.1.0.tar.bz2
$ chown -R www-data: linshare-ui-user

Deploy the archive of the application LinShare UI Upload Request in the Apache2 repository :

$ cd /var/www/
$ rm -rf linShare-ui-upload-request
$ tar xjvf  /root/downloads/linshare-ui-upload-request-6.1.0.tar.bz2
$ chown -R www-data: linshare-ui-upload-request

Now you can start your Apache service again.

$ systemctl start apache2