[digiKam-users] DigiKam and multiple computers -- best practices

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[digiKam-users] DigiKam and multiple computers -- best practices

Tac Tacelosky
I'm recently back from a trip, and am finally moving from my 13" laptop screen to a full-size monitor and faster computer.  I'm wondering what the best practices are for using DigiKam and multiple computers.

It appears that all the photo meta-data is stored in the database (MySQL or sqlite) AND in the sidecar files.  And of course there's the meta-data embedded in the images themselves (EXIF, etc in JPEG, and some camera data in the RAW files).  

I've copied the photos and meta-data files from my laptop to a removable drive, which I've added as a collection on my desktop.  (Side note: I was surprised not to see the drive listed, but rather had to add it via /tac/media/<drive>). 

So now I have 2 databases, one on my laptop and one on my desktop.  The images at the moment are the same, but I'm wondering what the next best step for the workflow is.  I'm thinking I should keep the external, removable drive as the "master", even though it's a bit slower, and simply attach the device to whatever computer I'm using and run the maintenance program to keep the database in sync.

Is my logic correct?  That is, should I keep independent databases on each computer, add the external drive as  a "collection" and keep the database in sync by leveraging the sidecar files?

Thanks,

Tac
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

cool.chris65
Hi,

my installation looks like this:
I've a NAS in my network at home, where the pics are stored on, and I can
reach them over nfs- or cifs-share.

The database I stored in a mariadb-server which is on the same nas

At least it is important, that the mount onto the system from where you want
to run DK is allways the same, eg:

Notebook: /mnt/pictures
Desktop: /mnt/pictures

So it needs just the first time a little bit to scan for new item on each
system, but you can work on each system with just the same datas without
storing thme more than one time.

Greetz, Christoph

Am Donnerstag, 22. März 2018, 16:24:26 CET schrieb Tac Tacelosky:

> I'm recently back from a trip, and am finally moving from my 13" laptop
> screen to a full-size monitor and faster computer.  I'm wondering what the
> best practices are for using DigiKam and multiple computers.
>
> It appears that all the photo meta-data is stored in the database (MySQL or
> sqlite) AND in the sidecar files.  And of course there's the meta-data
> embedded in the images themselves (EXIF, etc in JPEG, and some camera data
> in the RAW files).
>
> I've copied the photos and meta-data files from my laptop to a removable
> drive, which I've added as a collection on my desktop.  (Side note: I was
> surprised not to see the drive listed, but rather had to add it via
> /tac/media/<drive>).
>
> So now I have 2 databases, one on my laptop and one on my desktop.  The
> images at the moment are the same, but I'm wondering what the next best
> step for the workflow is.  I'm thinking I should keep the external,
> removable drive as the "master", even though it's a bit slower, and simply
> attach the device to whatever computer I'm using and run the maintenance
> program to keep the database in sync.
>
> Is my logic correct?  That is, should I keep independent databases on each
> computer, add the external drive as  a "collection" and keep the database
> in sync by leveraging the sidecar files?
>
> Thanks,
>
> Tac


Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

woenx
I also think that if you have exactly the same path to your pictures in both
machines, it's worth sharing just one database, although it will probably be
a bit slower if it's in a network share (it also depends on the kind of
network, wired, wireless...).

If you use two databases, one for each computer, there are some changes that
won't be applied from one computer to the other. For instance, deleted tags
won't sync from one database to the another, or renamed or moved tags won't
be written to the files (or the sidecars) unless you tell them them to
manually. So it's usually better to just have one database for the moment if
you want all your information to be up to date.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
also, even if your paths are different, there's an option to share the same
database - IF you don't mind manually editing database entries (see
https://bugs.kde.org/show_bug.cgi?id=261277):

For every 'collection', the 2nd path needs to be added to db-table
'AlbumRoots' (column 'Identifier'), e.g.:
"networkshareid:?mountpath=/mnt/myserver/data/Pictures"
needs to be changed to
"networkshareid:?mountpath=/mnt/myserver/data/Pictures&mountpath=U:/Pictures"
(this is a case, where the 2nd computer is a Windows machine connected via
Samba)

This can be achieved e.g. with MySQL Workbench:
digikam_core / Tables / AlbumRoots
=> click on table symbol at the end of the line
=> "Form Editor" View
don't forget to press oval 'Apply' button in bottom right corner...
.. done..



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

cool.chris65
Hey,

Am Freitag, 23. März 2018, 21:05:04 CET schrieb karsten_df:
> For every 'collection', the 2nd path needs to be added to db-table
> 'AlbumRoots' (column 'Identifier'), e.g.:
> "networkshareid:?mountpath=/mnt/myserver/data/Pictures"
> needs to be changed to
> "networkshareid:?mountpath=/mnt/myserver/data/Pictures&mountpath=U:/Pictures
> " (this is a case, where the 2nd computer is a Windows machine connected via
> Samba)

did I understand it right:
If I use eg. 3 machines with different (Mount-)path to my collection
(especially a windows-machine), I just have to made 3 entries with the path
into the database?

Greetz, Christoph

Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
cool.chris65 wrote
> did I understand it right:
> If I use eg. 3 machines with different (Mount-)path to my collection
> (especially a windows-machine), I just have to made 3 entries with the
> path
> into the database?

I‘ve tried only one Linux & one Windows machine - no problems there (apart
from the slightly annoying question re. a change in locales between the two
OSes - which in my case was no problem, since both machines are using utf-8)
I did a backup of the database before trying ..
Regards-
Karsten



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

woenx
Hey, I also tried it between a Windows 10 and a Ubuntu machine, and seems to
work just fine! I still have to see if the performance is acceptable (I plan
to host the database through an internet connection).

By the way, I am worried about the different locates between the computer.
The linux machine uses UTF-8, but the windows 10 computer just said
"System". I think everything was displayed correctly in digikam, but I'm
afraid of corrupting data. Anyone had some experience with this?



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
woenx wrote
> The linux machine uses UTF-8, but the windows 10 computer just said
> "System". I think everything was displayed correctly in digikam, but I'm
> afraid of corrupting data. Anyone had some experience with this?

Same thing here - it seems WIN10 uses utf-8 internally (but a specific
locale can be set for applications not supporting utf-8). So far I have not
come across any problems apart from the warning message, but my experience
is limited.
If there really are no issues with this configuration, it may make sense to
have an option to disable the warning.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

Simon Cropper


Windows uses Code Page 1252 (i.e. CP-1252 or Windows-1252) not UTF-8.

Problems will only occur if any unique CP-1252 characters are used in any text strings... UTF-8 gets confused otherwise no error occurs.

Check out https://en.wikipedia.org/wiki/Windows-1252


On 27/03/18 16:44, karsten_df wrote:
woenx wrote
The linux machine uses UTF-8, but the windows 10 computer just said
"System". I think everything was displayed correctly in digikam, but I'm
afraid of corrupting data. Anyone had some experience with this?
Same thing here - it seems WIN10 uses utf-8 internally (but a specific
locale can be set for applications not supporting utf-8). So far I have not
come across any problems apart from the warning message, but my experience
is limited.
If there really are no issues with this configuration, it may make sense to
have an option to disable the warning. 



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html

--
Cheers Simon

Simon Cropper
Principal Consultant
Botanicus Australia Pty Ltd
M: 0420 531 754.
W: http://www.simonchristophercropper.com



Simon Cropper
Botanicus Australia Pty Ltd
webpage: www.botanicusaustralia.com.au
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

Gilles Caulier-4
In reply to this post by karsten_df
Hi all,

It will be a good idea to resume well the experience here in the official documentation or a wiki page...

These kind of information are missing and can be usefull for other users.

Best

Gilles Caulier



2018-03-27 7:44 GMT+02:00 karsten_df <[hidden email]>:
woenx wrote
> The linux machine uses UTF-8, but the windows 10 computer just said
> "System". I think everything was displayed correctly in digikam, but I'm
> afraid of corrupting data. Anyone had some experience with this?

Same thing here - it seems WIN10 uses utf-8 internally (but a specific
locale can be set for applications not supporting utf-8). So far I have not
come across any problems apart from the warning message, but my experience
is limited.
If there really are no issues with this configuration, it may make sense to
have an option to disable the warning.

Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
In reply to this post by Simon Cropper
Simon Cropper wrote
> Windows uses Code Page 1252 (i.e. CP-1252 or Windows-1252) not UTF-8.
> Problems will only occur if any unique CP-1252 characters are used in
> any text strings... UTF-8 gets confused otherwise no error occurs.

that's interesting.. from the CP1252 table in Wikipedia, for which
characters would you expect to see problems?
German 'Umlaute' äüö, or the 'ß' character are correctly displayed across
platforms, both in filenames and digikam internal descriptions. Same for the
Euro currency symbol "€".




--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

PackElend
Hallo,
thx for the great input/guiding, I'm following your discussion closely.

In the beginning you mentioned that you set up a dedicated MariaDB. I've got a NAS what gives me same option, how did you set up the access rights etc for the digikam DB?

In addition I would like to extend the scope of this guide. What is the best practice adapting this configuration to be able to edit selected files when your are on the move?
The point is that when I travel I've got a plenty of time for that diligent but routine piece of work of rating and tagging all my pictures. 
If I put all pictures into this central database I would like to be able to extract a certain unprocessed share and edit locally when I'm on a train etc.
As soon as I will have reliable access to this DB (via VPN) again, I want to return those files. 
How would you proceed to do that?
In regard to this process I hope that wish Bug 389680 - prompt to relocate missing files is incorporated  in digikam 6+

thanks a lot 

stefan

  

2018-03-27 13:33 GMT+02:00 karsten_df <[hidden email]>:
Simon Cropper wrote
> Windows uses Code Page 1252 (i.e. CP-1252 or Windows-1252) not UTF-8.
> Problems will only occur if any unique CP-1252 characters are used in
> any text strings... UTF-8 gets confused otherwise no error occurs.

that's interesting.. from the CP1252 table in Wikipedia, for which
characters would you expect to see problems?
German 'Umlaute' äüö, or the 'ß' character are correctly displayed across
platforms, both in filenames and digikam internal descriptions. Same for the
Euro currency symbol "€".

Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
In reply to this post by Gilles Caulier-4
Gilles Caulier-4 wrote
> It will be a good idea to resume well the experience here in the official
> documentation or a wiki page...
> These kind of information are missing and can be usefull for other users.

I'd be happy to help a little, in exchange for the pleasure of using
digikam..
Where should I go to start?
A good place for the information could be 'digikam configuration' /
'collection settings' in the official documentation, or even a separate
chapter like 'multi-platform considerations'. However I have no experience
with docbook, or generally contributing to the documentation so far.
Another option could be the digikam tutorials in the Wiki?



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

Simon Cropper
In reply to this post by karsten_df


It is usually things like curly brackets and em-dash characters that make it into paths.

If your European characters are coming through your don't had CP-1252, probably using CP-1251 (see potential alternatives here https://en.wikipedia.org/wiki/Windows_code_page).

Here is a thread that can help you determine the code page your system is using https://serverfault.com/questions/80635/how-can-i-manually-determine-the-codepage-and-locale-of-the-current-os


On 27/03/18 22:33, karsten_df wrote:
Simon Cropper wrote
Windows uses Code Page 1252 (i.e. CP-1252 or Windows-1252) not UTF-8.
Problems will only occur if any unique CP-1252 characters are used in 
any text strings... UTF-8 gets confused otherwise no error occurs.
that's interesting.. from the CP1252 table in Wikipedia, for which
characters would you expect to see problems?
German 'Umlaute' äüö, or the 'ß' character are correctly displayed across
platforms, both in filenames and digikam internal descriptions. Same for the
Euro currency symbol "€". 




--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html

--
Cheers Simon

Simon Cropper
Principal Consultant
Botanicus Australia Pty Ltd
M: 0420 531 754.
W: http://www.simonchristophercropper.com



Simon Cropper
Botanicus Australia Pty Ltd
webpage: www.botanicusaustralia.com.au
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

Gilles Caulier-4
In reply to this post by karsten_df
The handbook is an XML based text container. It's not too hard to implemented.

These XML files written in English is later parsed by script in KDE server to extract content strings for translators.

These XML are also used to generate the handbook in different target formats : HTML, RTF, PDF, etc...


But instead to start to write this kind of contents directly in docbook, the best is to write the most important part : the contents in English. For me, a wiki page is the best place. We have one for digiKam here :







2018-03-27 20:17 GMT+02:00 karsten_df <[hidden email]>:
Gilles Caulier-4 wrote
> It will be a good idea to resume well the experience here in the official
> documentation or a wiki page...
> These kind of information are missing and can be usefull for other users.

I'd be happy to help a little, in exchange for the pleasure of using
digikam..
Where should I go to start?
A good place for the information could be 'digikam configuration' /
'collection settings' in the official documentation, or even a separate
chapter like 'multi-platform considerations'. However I have no experience
with docbook, or generally contributing to the documentation so far.
Another option could be the digikam tutorials in the Wiki?

Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

PackElend
answer the question what is the difference between Cp1252 to UTF-8.
According to What characters do not directly map from Cp1252 to UTF-8? on stackoverflow and Wikipedia,   positions 81, 8D, 8F, 90, and 9D are unused; however, the Windows API MultiByteToWideChar maps these to the corresponding C1 control codes.

hope that helps
stefan

2018-03-28 8:21 GMT+02:00 Gilles Caulier <[hidden email]>:
The handbook is an XML based text container. It's not too hard to implemented.

These XML files written in English is later parsed by script in KDE server to extract content strings for translators.

These XML are also used to generate the handbook in different target formats : HTML, RTF, PDF, etc...


But instead to start to write this kind of contents directly in docbook, the best is to write the most important part : the contents in English. For me, a wiki page is the best place. We have one for digiKam here :







2018-03-27 20:17 GMT+02:00 karsten_df <[hidden email]>:
Gilles Caulier-4 wrote
> It will be a good idea to resume well the experience here in the official
> documentation or a wiki page...
> These kind of information are missing and can be usefull for other users.

I'd be happy to help a little, in exchange for the pleasure of using
digikam..
Where should I go to start?
A good place for the information could be 'digikam configuration' /
'collection settings' in the official documentation, or even a separate
chapter like 'multi-platform considerations'. However I have no experience
with docbook, or generally contributing to the documentation so far.
Another option could be the digikam tutorials in the Wiki?


Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
In reply to this post by Simon Cropper
Simon Cropper wrote
> It is usually things like curly brackets and em-dash characters that
> make it into paths.
> If your European characters are coming through your don't had CP-1252,
> probably using CP-1251 (see potential alternatives here
> https://en.wikipedia.org/wiki/Windows_code_page).
> Here is a thread that can help you determine the code page your system
> is using
> https://serverfault.com/questions/80635/how-can-i-manually-determine-the-codepage-and-locale-of-the-current-os


Warning - somehow lengthy text below - should discussion be moved to
different place?

let's start with the WIN10 machine
- chcp on the WIN10 machine says codepage 850 (locale is German)

using a shared folder between WIN10 and a Linux Virtiual Machine (file
system is vboxsf):
- when I create a text file in WIN10 using Notepad, special characters
(µÖÄÜß{}~€) are shown correctly on the linux side
  (only) if I use CP-1252 or 1250 to display the text.
- in the opposite direction, these characters, when entered as utf-8 in
Linux, show correctly at the Windows side in Notepad.  
  A check with a more versatile editor reveals that the encoding actually
still is utf-8 in WIN10.
- all filenames using characters µÖÄÜß{}~€ are transferred correctly between
systems *(!)*

now looking at the target scenario, a linux server, running nfs and samba
servers for one linux & one windows clients resp.
- exactly the same behavior as above

=> my takeaways:
- in my (default) configuration, there are no obvious problem with
filenames, although WIN10 should use utf-16 or 'OEM',
  depending on the file system type, and Linux should use utf-8.
  Some transcoding of filenames seems to be done between the systems.
- on the application level, behavior on WIN side is app specific -
  some programs create text in CP-1252, while others use utf-8.
  Also at least some do interpret utf-8 correctly

==>> so the interesting question is:
Does digikam always (Linux / Windows) use utf-8 encoding for all text that
goes into picture metadata?
If so, any issues would be restricted to the filenames (unfortunately also
the most critical part ;-),
which, at least in my setup, seem to be handled correctly across WIN10 and
Linux for reasons not yet fully understood..



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
In reply to this post by Gilles Caulier-4
Gilles Caulier-4 wrote
> But instead to start to write this kind of contents directly in docbook,
> the best is to write the most important part : the contents in English.
> For
> me, a wiki page is the best place. We have one for digiKam here :
> https://userbase.kde.org/Digikam/Tutorials

will do, once I've understood the character encoding issue a little better..




--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices

karsten_df
In reply to this post by PackElend
PackElend wrote

> answer the question what is the difference between Cp1252 to UTF-8.
> According to What characters do not directly map from Cp1252 to UTF-8? on
> stackoverflow
> &lt;https://stackoverflow.com/questions/26324622/what-characters-do-not-directly-map-from-cp1252-to-utf-8&gt;
> and
> Wikipedia
> &lt;https://en.wikipedia.org/wiki/Windows-1252#Code_page_layout&gt;,
>   positions
> 81, 8D, 8F, 90, and 9D are unused; however, the Windows API
> MultiByteToWideChar maps these to the corresponding C1 control codes
> &lt;https://en.wikipedia.org/wiki/C0_and_C1_control_codes&gt;.

my favorite test character was the Euro-sign (€) -
completely different encoding between utf-8 (0xE282AC), CP.1252 (0x80) or
CP-850 (not included at all..)



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: DigiKam and multiple computers -- best practices WARNING

karsten_df
In reply to this post by karsten_df
For all who are experimenting with sharing a digikam mysql database between
Linux and Windows:
I've come across a nasty issue with this setup.

if a picture is deleted (to trash) on the Linux machine, and one tries to
undelete it from the windows machine, the data base gets seriously messed up
- in my case, in the end, the database appeared completely empty apart from
the restored picture.
A complete re-scan brings back the pictures, however information stored in
the database only is gone.

Fortunately I had a backup copy of the mysql data directory (/var/lib/mysql
in my case), which allowed a successful recovery.




--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
12