Database question

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Pavlov
Posts: 5
Joined: Fri Jun 16, 2017 9:02 am

Database question

Post by Pavlov »

Hello,

i creatd a large category database for my images.
It contains categories for thousand images located on my server's mapped drive, called "Z"
I have a mirror of the server and the drive is called "Y".
I need to make a copy of the database based on Y instead of Z, without rebuilding all categories from scratch (it's 15K images).

How could i do ?

Thanks in advance
paolo
User avatar
michel038
XnThusiast
Posts: 1461
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Database question

Post by michel038 »

First, keep a backup copy of your xnview.db file that contains the db, in a safe place.

You can try this :
At the top of the Categories pane, use the drop-down menu and choose "Catalog > Export"
you can check "export rating and color labels"
I don't know what "Export all files..." mean
I hope you don't use tags (not keywords, i mean tags in Metadata>Tag>Current (CtrlT) )
Choose output format in save dialog , say "xml"
wait while export is running

Use a text editor to replace drive name (replace Z:\ by Y:\ or something like this) in the xml file

Use "Catalog > Import" to import the updated xml file...
If needed, clean the db before, by moving away xnview.db file before starting xnviewmp, or using Settings>Catalog>Delete all
Pavlov
Posts: 5
Joined: Fri Jun 16, 2017 9:02 am

Re: Database question

Post by Pavlov »

Hello,

thank you so much, it worked :)

Another question - i reported this long time ago but it seems it's still not solved.
I created my own categories to filter my images.
XNview keeps adding new categories - probably all the categories it finds in any image i browse - and i just do not want them.
I always delete them manually, but i would love if Categories are LOCKED - so it does not add anything alone.
I just need to see only my own categories.

In screenshot you get the idea - the yellow ones are my ones and these should stay, all other ones are garbage which i have to remove from time to time. Is there a way to lock it ? I would avoid making categories file Read only, since this would also lock my own updates.

Thanks in advance,
paolo
You do not have the required permissions to view the files attached to this post.
User avatar
user0
XnThusiast
Posts: 2298
Joined: Sat May 09, 2015 9:37 am

Re: Database question

Post by user0 »

Pavlov wrote: Sun Feb 16, 2025 10:45 am i would love if Categories are LOCKED - so it does not add anything alone.
ucheck Automatically import XMP:Subject and IPTC:Keywords to Catalog's Categories (Settings > Metadata)
User avatar
michel038
XnThusiast
Posts: 1461
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Database question

Post by michel038 »

a first step is to prevent xnview from indexing unnecessary folders:
Settings>Catalog>Excluded/Included> "Add Folder"
(Info : In this list, if you want to make an exception for a sub-folder, add it to the list, and click on the word “excluded” to select “included”.)

Another step is to unmark "Automatically import XMP subject and IPTC Keywords ... " in Settings>Metadata.


info :
Enable this checkbox can be useful when you add keywords without using "categories" , but by using "Edit IPTC or Edit XMP" dialogs ; so that "Import ..." reads the new keyword and adds it in the catalog. But using categories directly is so much more efficient.
This checkbox is also necessary to rebuild (all or part of) the catalog by reading embedded keywords.
Pavlov
Posts: 5
Joined: Fri Jun 16, 2017 9:02 am

Re: Database question

Post by Pavlov »

let me try, in few days i'll be able to see if i have new unwanted categories.

Thanks again :)
Paolo
Pavlov
Posts: 5
Joined: Fri Jun 16, 2017 9:02 am

Re: Database question

Post by Pavlov »

Hello,

another DB / catgory related question.
It looks like the categories are not working on the new server so i did something wrong.

can you confirm that:

- the Categories and its associtations are only found into the XML file ?
- the huge (3GB) file called "XnView.db" only contains the thumbnails and has nothing to do with the category assignment ?

If not, it would be useful for me to understand better what each of them contains.

thanks
Paolo