[digiKam-users] Relocate collection; Feature request and/or some hints

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

[digiKam-users] Relocate collection; Feature request and/or some hints

Bengt Månsson
Hi.
After moving my collection to a new NAS drive I really need to tell dk about the new location. Having dk to read everything again is no solution, since it would take a long time and I would loose information in the database.
I can't find the feature I need, so I used some quick bash. Here it is, step by step (with dk off):

mysqldump --all-databases -p >a.sql
sed 's|/oldpath/PictureLibrary|/newpath/PictureLibrary|g' <a.sql >b.sql
cat b.sql | mysql -p

As you can see I am using Linux and MySql. A permanent built-in solution would have to handle all combinations of os and db.

I also found out the best way (for me) to alternate between the linux desktop and the win10 laptop. I run the desktop with Remote Desktop Connection from the laptop. Not for editing but absolutely ok for tagging and other administrative tasks. No need to relocate any more.

/Bengt


Reply | Threaded
Open this post in threaded view
|

Re: Relocate collection; Feature request and/or some hints

woenx
There's an easier solution. You can add more than one path to each library,
so you can add the path for the windows computer and another for the linux
one.

Check this post:
http://digikam.1695700.n4.nabble.com/digiKam-users-DigiKam-and-multiple-computers-best-practices-tp4705570p4705575.html

Basically, you manually edit the database, and in the "AlbumRoots" table you
add a & sign followed by the alternative path:

e.g.:
"networkshareid:?mountpath=/mnt/myserver/data/Pictures&mountpath=U:/Pictures"



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

Re: Relocate collection; Feature request and/or some hints

Bengt Månsson
I’ve seen that post but I don’t see how it can be right.
Last time I looked at least the thumbnails all had absolute path and didn’t use AlbumRoots.
I use a NAS so I don’t want to rescan anything for no reason. So I have to change in many thousands of places.
Or use my little script in my post from 30 sept.


> 2 okt. 2018 kl. 11:47 skrev woenx <[hidden email]>:
>
> There's an easier solution. You can add more than one path to each library,
> so you can add the path for the windows computer and another for the linux
> one.
>
> Check this post:
> http://digikam.1695700.n4.nabble.com/digiKam-users-DigiKam-and-multiple-computers-best-practices-tp4705570p4705575.html
>
> Basically, you manually edit the database, and in the "AlbumRoots" table you
> add a & sign followed by the alternative path:
>
> e.g.:
> "networkshareid:?mountpath=/mnt/myserver/data/Pictures&mountpath=U:/Pictures"
>
>
>
> --
> Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html

smime.p7s (2K) Download Attachment