Digikam-users Digest, Vol 214, Issue 39

Nick Seward nick at homeslice.ca
Sun Mar 26 19:46:10 BST 2023


Thank you Gilles.
I missed that callout in the documentation that states only the core DB will be migrated. 

Just for fun I migrated the other SQLite DBs to MariaDB using sqlite3-to-mysql (https://pypi.org/project/sqlite3-to-mysql/).
Here are the steps in case anyone else is interested. Warning, Python knowledge required.

1. Created the 3 other databases (faces, thumbs, similarity) in MariaDB,
CREATE DATABASE thumbs;
CREATE DATABASE faces;
CREATE DATABASE similarity;

GRANT ALL PRIVILEGES ON faces.* TO 'digikam_user';
GRANT ALL PRIVILEGES ON thumbs.* TO 'digikam_user';
GRANT ALL PRIVILEGES ON similarity.* TO 'digikam_user';

FLUSH PRIVILEGES;

2. Migrated the core DB using the built in DB migration tool for DigiKam

3. Installed sqlite3-to-mysql

pip install sqlite3-to-mysql

4. Migrated the remaining DBs. I don't think order matters

sqlite3mysql -f recognition.db -d faces -u <your_user_name> --mysql-password <your_db_password> -h 192.168.0.10 -P 3306
sqlite3mysql -f similarity.db -d similarity -u <your_user_name> --mysql-password <your_db_password> -h 192.168.0.10 -P 3306
sqlite3mysql -f thumbnails-digikam.db -d <your_user_name> -u digikam_user --mysql-password <your_db_password> -h 192.168.0.10 -P 3306

(Replace <your_user_name> and <your_db_password> with the username and password to your MySql or MariaDB).

Importing everything was pretty fast even the thumbnails which saves some rebuilding time. 
Still, I will be re-reading the DB maintenance section of the DigiKam docs (https://docs.digikam.org/en/maintenance_tools.html#maintenance-tools).
 

Thanks,
Nick


> Date: Sat, 25 Mar 2023 18:12:54 +0100
> From: Gilles Caulier <caulier.gilles at gmail.com>
> To: digikam-users at kde.org
> Subject: Re: Migrating from SQLite to MariaDB
> Message-ID:
> 	<CAHFG6sG_aHnPeYUG-dz4JFRLgyXYnxV-By3B9ijmcgTDmrHEcA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi all,
>
> I just add a note in online documentation about the Core database
> processed with migration tool:
>
> https://docs.digikam.org/en/setup_application/database_settings.html#database-migration
>
> Best regards
>
> Gilles
>
> Le sam. 25 mars 2023 à 16:17, Maik Qualmann <metzpinguin at gmail.com> a écrit :
>>
>> With the rebuild of the training data in the maintenance tool, you then have
>> the current status of your confirmed faces in the core database. In addition,
>> the matrices of the currently used face engine from digiKam. This training
>> data maintenance should be done every now and then anyway to remove outdated
>> entries or when we've changed the face engine. Manually copying the database
>> is counterproductive.
>>
>> Maik
>>
>> Am Samstag, 25. März 2023, 15:47:40 CET schrieb Nick Seward:
>> > Thanks Maik.
>> >
>> > Will re-building the training data using the maintenance tool result in the
>> > same data that's in my SQLite DB? I'll see if I can manually copy this data
>> > over. I'd really like to keep my training data for facial recognition. I'll
>> > investigate manually copying this data over. Are there any technical
>> > hurdles or use cases I should consider before attempting this?
>> >
>> > Nick
>> >
>> > > Date: Sat, 25 Mar 2023 07:42:51 +0100
>> > > From: Maik Qualmann <metzpinguin at gmail.com>
>> > > To: digikam-users at kde.org
>> > > Subject: Re: Migrating from SQLite to MariaDB
>> > > Message-ID: <2672918.mvXUDI8C0e at linux-tpgn>
>> > > Content-Type: text/plain; charset="iso-8859-1"
>> > >
>> > > Yes, only the digiKam core database will be migrated. All other databases
>> > > are rebuilt, the thumbnail database during use or by the maintenance
>> > > tool. The face database with the maintenance tool and the option to
>> > > rebuild the training data, the similarity database also via the
>> > > maintenance tool and rebuild the fingerprints.
>> > >
>> > > Maik
>> > >
>> > > Am Samstag, 25. März 2023, 01:38:43 CET schrieb Nick Seward:
>> > >> Hi All,
>> > >>
>> > >> After a year of using SQLite as the DB for Digikam I'd like switch to a
>> > >> dedicated MariaDB instance as my database backend. I went through the
>> > >> DigiKam DB docs
>> > >> (https://docs.digikam.org/en/setup_application/database_settings.html#),
>> > >> setup a MariaDB instance and then used the Database Migration tool to
>> > >> move
>> > >> my data to the new DB. When I did this, only the core Digikam SQLite db
>> > >> was
>> > >> migrated. The "thumbs", "faces" and "similarity" SQLite db's weren't
>> > >> migrated. Is that expected?
>> > >>
>> > >> I'm using DigiKam 7.10.0 on an Intel MacBook Pro running MacOS 13.2.1.
>> > >> I'm running MariaDB 10.11 on a computer on my local network using Docker.
>> > >>
>> > >> Thanks,
>> > >>
>> > >> Nick


More information about the Digikam-users mailing list