Upgrade Lizmap Web Client
Upgrading from 3.0 to the 3.1 version
From 3.0 versions to upper, here is how to upgrade.
Backup dei dati
Backup your data into a directory (ex: /tmp) with the lizmap/install/backup.sh script, so you could reinstall them if the installation failed.
lizmap/install/backup.sh /tmp
If you want to backup by hand, you should backup at least these files:
var/jauth.db
var/logs.db
var/config/installer.ini.php
var/config/liveConfig.ini.php (if it exists)
var/config/lizmapConfig.ini.php
var/config/localconfig.ini.php
var/config/profiles.ini.php
Sostituisci i file lizmap
Get the lizmap archive (by downloading an archive or by doing a git clone/pull)
You should
replace the lib/ directory by the new lib/ directory
replace files into lizmap/ directory by the new lizmap/ files
If the replacement has erased some files that you’ve been backuped, restore them with
lizmap/install/restore.sh /tmp
Launch the installer
You have to launch the installer, it will upgrade some stuff: database tables, configuration etc..
sudo lizmap/install/clean_vartmp.sh
php lizmap/install/installer.php
sudo lizmap/install/clean_vartmp.sh
Upgrading from Lizmap 2.x to Lizmap 3.0
First, be sure that your lizmap installation has been upgraded to the latest version of 2.x. The last one is 2.12.
Then you can upgrade to Lizmap 3.0.
Backup dei dati
Backup your data into a directory (ex: /tmp).
Lizmap 2.12.2 and higher has a lizmap/install/backup.sh script. Call
lizmap/install/backup.sh /tmp
If you don’t have this script, backup by hand, copy these files somewhere, /tmp for instance:
var/jauth.db
var/logs.db
var/config/lizmapConfig.ini.php
var/config/installer.ini.php
var/config/profiles.ini.php
Sostituisci i file lizmap
Get the lizmap archive (by downloading an archive or by doing a git clone/pull)
You should
replace the lib/ directory by the new lib/ directory
replace the lizmap/ directory by new lizmap/
Restore data and clean installation
Restore rights and owner on some directories. Here is an example where «myuser» is the user owning the application file, and «www-data», the group of the web server.
sudo lizmap/install/set_rights.sh www-data www-data
sudo lizmap/install/clean_vartmp.sh
Then you can restore the backup, by giving the path where the backuped file where previously saved:
lizmap/install/restore.sh /tmp
Nota
Lizmap 3.x requires that *.db
files should be stored in var/db/, not in var/ as in 2.x
Last step: launch the upgrade script
php lizmap/install/upgrade-to-3.php
Upgrading between 2.x versions
Backup preliminare
Before update, make a backup of the configuration data: lizmap/var/config/lizmapConfig.ini.php, lizmap/var/jauth.db and the log file (from 2.8) lizmap/var/logs.db
MYAPP=lizmap-web-client
OLDVERSION=2.8.1 # replace by the version number of your current lizmap installation
# if you installation is 2.1.0 or less, use an empty OLDVERSION instead :
# OLDVERSION=
cp /var/www/$MYAPP-$OLDVERSION/lizmap/var/jauth.db /tmp/jauth.db # user database
cp /var/www/$MYAPP-$OLDVERSION/lizmap/var/config/lizmapConfig.ini.php /tmp/lizmapConfig.ini.php # text configuration file with services and repositories
cp /var/www/$MYAPP-$OLDVERSION/lizmap/var/logs.db /tmp/logs.db # lizmap logs
Then do a typical installation of the new version (see above), which will create a new folder in the directory /var/www/
Copia i files salvati nella cartella della nuova versione
$VERSION=2.10.3
cp /tmp/jauth.db /var/www/$MYAPP-$VERSION/lizmap/var/jauth.db
cp /tmp/lizmapConfig.ini.php /var/www/$MYAPP-$VERSION/lizmap/var/config/lizmapConfig.ini.php
cp /tmp/logs.db /var/www/$MYAPP-$VERSION/lizmap/var/logs.db
Nota
In qualche versione, è necessario aggiornare anche il database che memorizza i diritti. Vedi sotto per maggiori dettagli.
Dalla versione 2.3 o precedente alla versione 2.4
The Jelix framework (tool with which Lizmap Web Client is built) has been updated. It is necessary to change the rights management SQLite database:
cd /var/www/$MYAPP-$VERSION/
sqlite3 lizmap/var/jauth.db < lizmap/install/sql/upgrade_jacl2db_1.3_1.4.sql
Dalla versione 2.6 o precedente alla versione 2.7
Support for annotations and management of related rights was added to Lizmap Web Client. It is necessary to change the rights management SQLite database to upgrade it:
cd /var/www/$MYAPP-$VERSION/
sqlite3 lizmap/var/jauth.db < lizmap/install/sql/upgrade_jacl2db_lizmap_from_2.0_and_above_to_2.5.sql
Dalla versione 2.7.* alla versione 2.8
The editing tool replaced the annotation tool and fields to describe each Lizmap Web Client user has been added. It is necessary to upgrade the rights management SQLite database:
cd /var/www/$MYAPP-$VERSION/
sqlite3 lizmap/var/jauth.db < lizmap/install/sql/upgrade_jacl2db_2.7_2.8.sql
Dalla versione 2.8.* alla versione 2.9
The functionality of layers data filtering based on the connected user requires the addition of rights related to the user data base:
cd /var/www/$MYAPP-$VERSION/
sqlite3 lizmap/var/jauth.db < lizmap/install/sql/upgrade_jacl2db_2.8_2.9.sql
Dalla versione 2.9.* alla versione 2.10
The functionality of layers data filtering based on the connected user requires the addition of rights related to the user data base:
cd /var/www/$MYAPP-$VERSION/
sqlite3 lizmap/var/jauth.db < lizmap/install/sql/upgrade_jacl2db_2.9_2.10.sql
Elimina i file temporanei Jelix
rm -rf /var/www/$MYAPP-$VERSION/temp/lizmap/*
Ridefinire i diritti ai files dell’applicazione
cd /var/www/$MYAPP-$VERSION
chown :www-data temp/ lizmap/var/ lizmap/www lizmap/install/qgis/edition/ -R
chmod 775 temp/ lizmap/var/ lizmap/www lizmap/install/qgis/edition/ -R