Database backup

Art Zemon art at zemon.name
Sun Mar 30 18:52:31 BST 2025


Since you didn't know much about MySQL or MariaDB then I strongly encourage
you to use the database built into digikam. Screwing this up would trash
much of the metadata about your photos.

    -- Art Z.

Sent from my phone. Please excuse brevity and bizarre typos.

On Sun, Mar 30, 2025, 12:45 PM Steve Franks <stevef48 at gmail.com> wrote:

> Thank you for your advice.
> I ran the command on my Windows 11 PC and received the following error
> message:-
> mysqldump: Got error: 2002: "Can't connect to server on 'localhost'
> (10061)" when trying to connect
> I assumed that it was because digikam wasn't running, but when I tried
> again with digikam running the same thing happened.
> As you know, I don't know much about MySql/MariaDB, so I don't know how to
> fix this.
> Regards
> Steve
>
> On Sun, 30 Mar 2025 at 13:58, Art Zemon <art at zemon.name> wrote:
>
>> Steve,
>>
>> When you use a database like MariaDB, you need to export the data in a
>> format that can be re-imported. Saving all 720 files is one option but a
>> poor one. Should you miss a single file, or try to restore it to a
>> different machine or a different version of MariaDB then the restore might
>> fail.
>>
>> I use the mysqldump tool to export all of the tables. Check that out and
>> test restoring it before you trust that your backups are valid.
>>
>> The command that I use is: mysqldump -hlocalhost --opt digikam >
>> digikam.sql
>>
>> I then back up the digikam.sql file to my NAS box.
>>
>> To restore the database, I would first create it and then reload the data
>> with: mysql < digikam.sql
>>
>> I am running on Linux and I named my database "digikam" so you may need
>> to tweak this command to suit your own situation.
>>
>>     -- Art Z.
>>
>>
>> On Sun, Mar 30, 2025 at 6:32 AM Steve Franks <stevef48 at gmail.com> wrote:
>>
>>> The internal sql database consists of 4 files, but the Mariadb database
>>> on my Windows PC now has 720 files in 7 folders taking up 46.3gb of space.
>>> Do I need to retain all of these files? 439 of them are named
>>> mysql-bin.99999 and mysql-bin.99999.idx (99999 means a 5 digit number), are
>>> these necessary?
>>> Thanks in advance
>>> Steve
>>>
>>>
>>
>> --
>> My blog: CheerfulCurmudgeon.com
>> *​**​In a place where there are no humans, strive to be human. [Pirkei
>> Avot 2:5]*
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20250330/18843884/attachment.htm>


More information about the Digikam-users mailing list