-
Notifications
You must be signed in to change notification settings - Fork 0
HowToMigrateNavalPlanToLibrePlan
TWiki> LibrePlan Web>Documentation>HowToMigrateNavalPlanToLibrePlan (20 Aug 2012, ManuelRego)EditAttach
If you are using Ubuntu or Debian packages there is a transitional package available to migrate all data from LibrePlan database to LibrePlan database. This migration essentially implies two phases: database renaming and schema updates.
This guide is intended to ease the migration for those running a manual installation of LibrePlan 1.1.x, i.e., those who installed the software through a WAR file (either downloaded from the Internet or created by compiling the source code from scratch).
Please note that in this guide it is assumed that the application database name is "navalplan". So, if this is not the case, just replace "navalplan" in step 5 by the name of your NavalPlan database.
Besides, this procedure has been tested in Debian, but it probably can be used without any adaptation in other GNU/Linux distributions.
Go through the following steps BEFORE deploying LibrePlan 1.2. Create a BACKUP of your old database and stop Tomcat before proceeding.
root@hostname:~# su - postgres
postgres@hostname:~$ psql
psql (9.0.4)
Type "help" for help.
postgres=#
postgres=# CREATE DATABASE libreplan;
CREATE DATABASE
postgres=# CREATE USER libreplan WITH PASSWORD 'libreplan';
CREATE USER
postgres=# GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
GRANT
postgres=# \q
postgres@hostname:~$
postgres@hostname:~$ pg_dump navalplan > /tmp/navalplan_1.1.x.sql
postgres@hostname:~$
(You should use a different destination directory for the dump if you're sharing the machine with someone else and you don't want your data to be read)
psql -U libreplan -h localhost libreplan < /tmp/navalplan_1.1.x.sql
wget http://sourceforge.net/projects/navalplan/files/LibrePlan/upgrade_1.2.0.sql/download -O /tmp/upgrade_1.2.0.sql
psql -U libreplan -h localhost libreplan < /tmp/upgrade_1.2.0.sql
Don't remove the old database before making sure the upgrade was applied correctly and no data was lost.
Also, don't forget to delete any temporary file created during the upgrade.
Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.