Migrating project from Trello to Lavagna open source Kanban Board

Untitled

Trello comprise of stunning dead simple UI and can be very handy in maintaining personal todo lists + small projects. Free version has no time or storage limit. Incase you are looking for more privacy + better overall control and don’t like Trello premium. Lets try migrating an existing Trello board to open source kanban board Lavagna.io.

Embedded Image

Lavagna is written in Java. What makes Lavagna most awesome than any other kanban boards is that, it has in-memory HSQLDB which can be configured to go file-based persistent mode, meaning we won’t need a DB server like PostgreSQL, MySQL, Oracle or MS SQL Server to store or backup/restore project management data. So, Lavagna is probably the most lightweight project management tool out there.

Getting started with Lavagna project management board without a DB server:

Install & Configure Lavagna

The most simplest set of instructions for setting up Lavagna are:

This should start a Jetty server at port 8080. Navigate to http://localhost:8080. Use user name “user” and “user” for password:

Importing Project from Trello

  • Click on Demo ** TEST** project.
  • Click on Project Settings on the top right corner. Click Import. Click LOAD TRELLO CONNECTOR and click CONNECT TO TRELLO.
  • Login and Click Allow on next new window and should bring a list of Trello users list of projects.
  • Select desired project board and click Import. This should take a few seconds depending on project size. Upon finishing import, new project should be available on board list in Dashboard.

Demo picture displays a sample oil depot project kanban board imported from Trello.

Making Project HSQLDB Data Persistent:

HSQLDBs default in-memory mode data will be destroyed as soon as Lavagna process is terminated. In-memory mode provides test data for automated test in test environment during test run. To persist HSQLDB data, HSQLDB would have to to be switched to file mode. To do that, datasource.url parameter would have to be changed from jdbc:hsqldb:mem:lavagna to jdbc:hsqldb:file:lavagna in script ./lavagna-1.1.6/bin/lavagna.sh:

Taking Backup:

Download hsqldb-2.3.2.jar from https://mvnrepository.com/artifact/org.hsqldb/hsqldb/2.3.2 and run:

in $LAVAGNA_HOME/bin directory. Running this you may get:


Exception in thread "main" java.lang.IllegalStateException: 'modified' DB property is 'yes'
    at org.hsqldb.lib.tar.DbBackup.checkEssentialFiles(Unknown Source)
    at org.hsqldb.lib.tar.DbBackup.write(Unknown Source)
    at org.hsqldb.lib.tar.DbBackupMain.main(Unknown Source)

which indicates HSQLDB has changes in DB and needs running SHUTDOWN SCRIPT query for preparing HSQLDB for complete backup. Download sqltool-2.3.2.jar from https://mvnrepository.com/artifact/org.hsqldb/sqltool/2.3.2 and run:

while running this you may get:

Failed to retrieve connection info for urlid "lavagna".
Cause: Please set up authentication file '/home/USER/sqltool.rc'

Here is a sample configuration for lavagna:

Create a file named ~/sqltool.rc , paste this configuration & save, run SHUTDOWN SCRIPT query with sqltool.jar:

This will write down changes and get DB ready for making full backup. Sample output:


java -cp hsqldb-2.3.2.jar org.hsqldb.lib.tar.DbBackupMain --save tardir/bak1.tar \
 /c/Users/mohi/lavagna/lavagna-1.1.7/bin/lavagna
1 / 3 lavagna.properties...
2 / 3 lavagna.script...
3 / 3 lavagna.lobs...

This will create a bak1.tar in LAVAGNA_HOME/bin/tardir directory which contains two database files lavagna.script and lavagna.lobs:

Taking Backup ( manually ):

Lavagnas pre-included embedded HSQLDB manager can be started by adding startDBManager parameter in startup script ./lavagna-1.1.6/bin/lavagna.sh:

In HSQL DB Manager window, click File > Connect , set url= jdbc:hsqldb:file:lavagna there should be lots of tables named PUBLIC.LA_BOARD,PUBLIC.LA_BOARD_COLUMN, PUBLIC.LA_BOARD_COUNTER etc.

Run query:

Now lavagna.lobs & lavagna.script should contain whole database backup. Simply backup these two files:

Backup also can be made by running query:

Restoring DB:

Restoring DB ( manually ):

Backup creates tar file which contains compressed:

These are only two files we need to have an HSQLDB DB Backup.

After running SHUTDOWN SCRIPT query lavagna.lobs and lavagna.script file should contain whole database backup. Simply copying these two files to their original locations and restarting Lavagna can effectively restore database into a past snapshot:

References:

http://www.hsqldb.org/doc/1.8/guide/apc.html
http://hsqldb.org/doc/2.0/util-guide/sqltool-chapt.html
https://github.com/digitalfondue/lavagna/blob/master/README.md

No comments:

Post a Comment