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
- Note about LinShare versions
- Required artifacts
- Backups
- Upgrade LinShare core
- Upgrade LinShare ui-admin
- Upgrade LinShare ui-user
- Upgrade tasks
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.
For this migration, download the following files from this address: http://download.linshare.org/versions/4.1.0 :
-
linshare-core-4.1.0.war
-
linshare-core-4.1.0-sql.tar.bz2
-
linshare-ui-admin-4.1.0.tar.bz2
-
linshare-ui-user-4.1.0.tar.bz2
On this 4.1 version of LinShare a new component, named linshare-ui-upload-request-4.1.0.tar.bz2, has been developped, you can find more details here
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 namedlinshare
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-4.1.0-sql.tar.bz2
by using this command:
$ tar xjvf /root/downloads/linshare-core-4.1.0-sql.tar.bz2
Then you will find the required file for the migration, named linshare-core-4.1.0-sql/postgresql/Migration_4.0.0_to_4.1.0.sql
In order to upgrade LinShare from 4.0 to 4.1 you need to run the migration script as follow:
$ psql -h `host` -d linshare -U linshare -f Migration_4.0.0_to_4.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-4.1.0.war
:
$ rm /var/lib/tomcat9/webapps/linshare.war
$ rm -fr /var/lib/tomcat9/webapps/linshare
$ cp /root/downloads/linshare-core-4.1.0.war /var/lib/tomcat9/webapps/linshare.war
$ systemctl start tomcat9.service
Deploy the archive of the application LinShare UI Admin in the Apache2 repository :
$ cd /var/www/
$ rm -rf linshare-ui-admin
$ tar xjvf /root/downloads/linshare-ui-admin-4.1.0.tar.bz2
$ chown -R www-data: /var/www/linshare-ui-admin
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-4.1.0.tar.bz2
$ chown -R www-data: /var/www/linshare-ui-user
Now you can start your Apache service again.
$ systemctl apache2 start
For this new version, you need to run further upgrade tasks in the
admin interface : http://YourServerName
/#/upgradetasks/list.
All the tasks must be executed by order and succeed in order to complete the upgrade.
NB: A task can finish with a successful status but errors can be noticed during the progress. It is necessary to check the execution reports found in the console. In case of errors, you must read the logs of Tomcat server for more details, resolve the problems and re-launch the task.
-
As long as the tasks with status
Mandatory
are not completed, the users can not use the system. -
As long as the tasks with status
Required
are not completed, the system will work partially (Some functionalities might be deactivated). These tasks can be executed simultaneously without disrupting the user's activity.
Once the mandatory tasks have been executed, you can switch to the next step if you want to re-establish quickly the LinShare service. The required tasks can take some time depending on amount of data to upgrade.
Once all these tasks are done, your LinShare will be operational.