Page 1 of 1

restore deleted categories

Posted: Tue Nov 02, 2021 8:33 am
by bush.r
Hello everyone, is there a way to restore deleted categories so that the images do not have to be reassigned to the category individually?

Thank you for any helpful tip.

Ron

Re: restore deleted categories

Posted: Tue Nov 02, 2021 10:56 am
by xnview
Categories are stored only incatalog or in the file?

Re: restore deleted categories

Posted: Tue Nov 02, 2021 12:33 pm
by bush.r
How can i find it out?

I mean in the pictures, because the deleted categories are missing in the program (filter), but I can see them, when pictures are shown.

Does that help?

Re: restore deleted categories

Posted: Tue Nov 02, 2021 3:02 pm
by xnview
so you have categories in the file's metadata but no more in catalog, right?
Do you have tried to select some files, and View>Update catalog from files?

Re: restore deleted categories

Posted: Tue Nov 02, 2021 3:43 pm
by bush.r
I'm really not sure, were the data are stored. They are no longer displayed under categories and in the category filter. I therefore think that the categories are in the catalog (xnview.db). When I look at the metadata, I can't find any categories.

I tried both Catalog> File and File from Catalog. Both to no avail.

Re: restore deleted categories

Posted: Tue Nov 02, 2021 4:12 pm
by michel038
1) If "export categories" was enabled ...
cat1.png
cat1.png (13.83 KiB) Viewed 624 times

... categories have been exported as keywords in IPTC or XMP metadata (info pane)
cat2.png
.
.

2) If categories were not exported, the only place where categories are saved is xnview.db file.
So, it is important to copy this file as a backup after having categorized many photos.


For first case, enable the "import" option and update catalog from (selected) files
For 2nd case, stop xnview, and copy your previous xnview.db backup on current xnviex.db.
If no backup has been made, no solution ...

For me, the 1st way is highly recommended, iptc and xmp keywords are standardized on almost all cataloging softwares ...

Re: restore deleted categories

Posted: Wed Nov 03, 2021 7:18 am
by bush.r
OK Pierre, with your kind help, I understood how the database is organized.

Thanks to your backup tips, I realized that I am making a permanent backup in my cloud. I set that up a long time ago, I wasn't even aware of it. A weekly backup is made there so that I can restore the status of xnview.db from October 31, 2021. solution 2 led to success.

I have now activated the options for exporting the categories as met data as described under 1).

Thank you for the quick support.

Re: restore deleted categories

Posted: Wed Nov 03, 2021 1:56 pm
by michel038
bush.r wrote: Wed Nov 03, 2021 7:18 am I have now activated the options for exporting the categories as met data as described under 1).
For all photos previously categorized, you will have to select photos and "update files from catalog" in view menu ...
Use recursive display if necessary

Another way is to select 1 category in Categories filter pane, select all photos (ctrl a) and unmark/mark them in Categories pane , and unselect them
- repeat for each category ...