Author Topic: Moving install location issue with sqlite database  (Read 112 times)

Offline JulianB

  • Newbie
  • *
  • Posts: 2
Moving install location issue with sqlite database
« on: January 13, 2021, 04:11:35 AM »
Hi,

I have a manually installed copy of Roundcube (1.4.6) on my openSUSE server. I wanted to migrate to the SUSE ditribution which installs in a different location. I am running using sqlite. I moven the config files over and everything worked perfectly. However the new install was pointing at and still running from the database in its origonal location. When I tried to move the database to the new directory (and edited the path in the config file) it failed to connect to the database.

Moving going back to the origonal copy in the origonal location worked fine. Moving the database to a new folder, deleeting the origonal install location and then renameing that folder back to the origonal name also failed. It seems that Roundcube can only use the origonal database in it's origonal location (irrespective of editing the master config file). Is its location tied to the DES_Key or some other form of security.

Thanks.

Edited ..........................

OK I did a fresh install and called my sqlite database "database" (how origonal!).

It was working. So I moved the database to database2 as follows and it still worked having edited "config.in.php"

Code: [Select]
ProgressTM:/srv/www/roundcubemail # mv database database2
ProgressTM:/srv/www/roundcubemail # pico config/config.inc.php
ProgressTM:/srv/www/roundcubemail #

However copying the databse to database3 and editing "config.inc.php" broke it.
 
Code: [Select]
ProgressTM:/srv/www/roundcubemail # cp database2 database3
ProgressTM:/srv/www/roundcubemail # pico config/config.inc.php
ProgressTM:/srv/www/roundcubemail #

I can browse both databases with sqlitebrowser.

Any explanation would be greatfully recieved.
« Last Edit: January 13, 2021, 10:06:50 AM by JulianB »

Offline JulianB

  • Newbie
  • *
  • Posts: 2
Re: Moving install location issue with sqlite database
« Reply #1 on: January 14, 2021, 07:03:32 AM »
OK. Solved it. sqlite does not close the db file when you log out. As such you need a reboot if you copy it or move it as well as changing the config file.