Database backup

Daniel Bauer linux at daniel-bauer.com
Sun Mar 30 20:26:43 BST 2025



Am 30.03.25 um 19:52 schrieb Art Zemon:
> 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.

I support this view. I use the built-in database because an attempt with 
MariaDB (years ago) became too complicated and I saw no advantage in it.

I currently have 446'801 files in 6090 directories (albums), no problem.

Also backup of the database is much easier, which is important for me...

> 
> On Sun, Mar 30, 2025, 12:45 PM Steve Franks <stevef48 at gmail.com 
> <mailto: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
>     <mailto: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
>         <mailto: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 <https://CheerfulCurmudgeon.com/>
>         /​//​In a place where there are no humans, strive to be human.
>         [Pirkei Avot 2:5]/
> 

-- 
Daniel Bauer photographer Basel Málaga
Twitter: @Marsfotografo (often explicit nudes)
https://www.patreon.com/danielbauer
https://www.daniel-bauer.com (nudes)



More information about the Digikam-users mailing list