Migrate a local LemnaTec database
LemnaTec offers software that can be used to conduct image-based phenotypic analyses of plants for images that are not derived from the LemnaTec system. The LemnaBase programme, which supports this function, can be used with database structures on a server or otherwise run on a local workstation.
Due to the size of the database that I had created, I needed to move my database but this was easier said than done. These are the steps that I followed to migrate a LemnaTec database from one local drive to another and restore the functionality of LemnaBase and the LemnaGrid daemon.
Background and Setup
I am running the LemnaTec software on Windows 7 (64-bit). The software is installed at
C:\LemnaTec\LemnaLauncher\V6.0.9999.21891\ (the numbers will differ depending on the version).
A local database had been set-up at
C:\Test but had become too big. I needed to move it to another network drive where there was sufficient drive space.
Step 1: Copy the entire database
Copy the entire contents of
C:\Test to the new network drive (which I shall call
F:\New\Location\Test). This must include system.db and test.db (or whatever other .db file is located in the folder if the name differs).
Step 2: Edit the XML file
Open the XML file at
C:\LemnaTec\Hardware\hardwareini.xml and adjust the reference to the database in the file using a plain text editor. The line should look something like this:
Step 3: Install DB Browser for SQLite
Download and install the latest version of DB Browser for SQLite from GitHub. This will be required to view and edit the SQLite database.
Step 4: Edit the database
Open DB Browser for SQLite. In the menu, go to File > Open and navigate to
Click on the “Browse Data” tab and choose
ltdbs from the drop-down menu.
Double-click on the cell under “name”, as this will contain a file path to
test.db. Change this parameter so that it points to
F:\New\Location\Test\test (no file extension). If “removed” equals
1, change it to
Close DB Browser for SQLite and save the changes to the database.
When opened again, the LemnaBase software should now open the copy of the database in the new location.
Step 5: Edit LemnaGrid Daemon shortcut
The changes just made will work for LemnaBase, LemnaGrid and LemnaMiner but not the LemnaGrid Daemon. This is easily remedied by changing the file reference in the target for the shortcut.
Copy the existing LemnaGrid shortcut and paste onto the desktop. Right-click on the new icon and choose “Properties”. The “Target” field will have something like this in it:
C:\LemnaTec\LemnaLauncher\V6.0.9999.21891\LemnaGrid\LemnaGridDaemon.exe daemon sqliteexternalblobs t t t C:\test\system 8 1 600
Change this parameter to reflect the location of the new database:
C:\LemnaTec\LemnaLauncher\V6.0.9999.21891\LemnaGrid\LemnaGridDaemon.exe daemon sqliteexternalblobs t t t F:\New\Location\Test\system 8 1 600
Save the changes. The database migration is complete.