Attributes backup

Started by zematima, April 05, 2024, 09:59:36 AM

Previous topic - Next topic

zematima

Hi all:
I have 3 sets in Attributes. Two are Global and one as File.
I tried to do a backup but I didn't manage to do that operation.
So, I choose the file I want (1.jpg), go to settings and choose Export. (2.jpg)

So after that I open a test database , created the directory (3.jpg) and used the Import option. The result is shown in 4.jpg
As you can see, no data was imported and the other fields of the file set weren't imported (see 1.jpg after the field Ficheiro you have other fields that doesn't show on 4.jpg).
What am I doing wrong?
By the way how can I export to CSV? Can't find that option that should be on the Settings of the attributes as explained on the help.
Thanks in advance.,
JRosa


thrinn

Your Export settings look correct to me. You can also open the exported .imas file in any text editor to check was has been exported.

You exported two Global and one File bases attribute set. Did the import work for the Global sets? Because I don't think there is much which can go wrong.
For the File based set, it depends if your test database contains exactly the same file(s) at exactly the same folder (!). If not, make sure to set the "Map files via checksum" option, as described here:  Importing
Thorsten
Win 10 / 64, IMatch 2018, IMA

zematima

Thank you thrinn.
The import works well for the Global sets. If I want to create a new record I have the data to choose from them.
The problem is with the File set:
I have the Attributes witch I want to make the backup in this path (external disk):
G:/Filmes/Natação/Tempos
The test database is on:
C:\Users\JOSE ROSA\Desktop\Natação\Tempos
Even with the  "Map files via checksum" option checked while importing it doesn't work.






Mario

#3
Do you import into the same database or another database?
If you import in another database, does it contain the same files?

The export format is XML, which means you can open it e.g. in Windows Notepad.
Does the export file contain the per-file data you're looking for?

Any warnings or errors reported by IMatch or logged to the log file? Switch to Debug logging via Help menu > Support and then import the Attributes again into your new database.
Close IMatch, ZIP the logfile (see log file) and attach.

I've made a quick check with a small database and a "Notes" per-file Attribute set.

Added some text for some files into the Attributes.
Exported to an .IMAS file.
Deleted the attribute data for the files.
Re-imported the exported attributes. OK.

Deleted the attribute data for the files again.
Imported vie the "Use checksum" option.
Also works, Attributes for the files are back.

There is really not much that can go wrong with that. Maybe the log file will tell us more.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima

Hi Mario:
1 - "Do you import into the same database or another database?"
Another database
2 -  "If you import in another database, does it contain the same files?,"
Yes, just different drives. (G and C)
3 - " Does the export file contain the per-file data you're looking for?"
Yes it does.
4 - The Teste.txt is the data copied from the imas file. It has all the data needed, so the export is correct.
The files to export are on
G:/Filmes/Natação/Tempos  -  external drive where I have the data to export
The test database is on:
C:\Users\JOSE ROSA\Desktop\Natação\Tempos  - where I want to import the data.
Thanks in advance.

thrinn

Just to be clear: G:\Filmes\Natação\Tempos is the directory your pictures are stored, correct? (This is at least what the list of jpgs at the end of teste.txt).
2024-04-05 22_29_31-[T__tmp_Teste.txt] - UltraEdit 64-bit.jpg

Does your test database contain the same files as your original database or a copy of these files? That is, did you add the G:\Filmes\Natação\Tempos folder also to your test database? In this case, the import should be able to match the files just by path+filename (which happens if you don't select the "...via checksum" option). But the files must be present in your test database with exactly the same path as shown in the screenshot above.

If, on the other hand, then JPGs in you test database are just copies of the original JPGs, the "...via checksum" option should still work. One thing to check in this case might be if there pending metadata write-backs in the original database. I am not sure if pending metadata has influence on the CRC checksum for file, but to be on the safe side, I would perform a write-back in the original database, then copy the JPGs to the target directory and let them be imported by the test database.

(As a side note: For your scenario it does not matter where your original and test databases are stored. But it does matter where the pictures that are referenced by both databases are stored.)
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

#6
QuoteI am not sure if pending metadata has influence on the CRC checksum for file, but to be on the safe side,
No. The checksum changes after the write-back. So copying a file with a pending write-back to another location and adding the file to a new database will produce the correct checksum.

I've just tried this.
Filled Attributes for a couple of files.
Copied the files to a folder on a different disk.
Created a new database.
Added the folder to the new database.
This should re-create exactly what the OP did.

Then imported the attributes file using the "Use checksum mode" and all Attributes are created in the new database and all files get their attributes assigned.

Works just fine on my end. I currently have no clue what could go wrong.
The log file looks clean.

Maybe send me two of the images and your Attributes export file?
I can add the images to one of my databases and then import the Attributes to see if it fails here too.


Ps: I've found warnings about invalid hotkes:

Unknown key combination while processing hotkey 'Cursor Esquerdo'.
Unknown key combination while processing hotkey 'Cursor Direito'.
Unknown key combination while processing hotkey 'Casa'.
Unknown key combination while processing hotkey 'Fim'.
Unknown key combination while processing hotkey 'Cursor Cima'
Unknown key combination while processing hotkey 'Cursor Baixo'.

You may want to check your resource file for these hotkeys and update it. No urgency, though.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima

Thanks for your help.
The only difference is that the stored files where I created the export are on: (external drive)
G:\Filmes\Natação\Tempos\
Inside Tempos I have all the jpg files
Then I created the same structure on C:
C:\Filmes\Natação\Tempos\
Inside Tempos I have all the jpg files I copied from G:\Filmes\Natação\Tempos\
So the only difference is the letters G: and C:
As an attachment you can find the files requested by Mario:
The Teste.jpg you must change the extension jpg to imas
The Tempos.jpg  you must change the extension jpg to rar
Thanks in advance.

Mario

I have downloaded and extracted the images to the folder "C:\temp\zematima\Tempos" on my system.
Then added them to a database.
The I imported your Attributes file using these settings:

Image1.jpg

and this worked just fine. The files in my database have the per-file Attributes:

Image2.jpg

I really have no idea why this does not work on your system.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

@zematima: Maybe try to check the CRC of one or some of the JPGs in your test database, just to make sure that the files are really identical to the originals from a technical point of view. You can use Vartoy with the {File.CRC.Hex} to display the CRC. It should be the same as listed at the end of the .imas file.
Thorsten
Win 10 / 64, IMatch 2018, IMA

zematima

Hi Mario and thrinn:
Thank you for your time and help.
The problem was that I was looking (by default) on the 100m livres (see the arrow) that was one first set I created and that I should have deleted it.
When I changed to Provas all the data appeared.
I am sorry for all the time you spent for such a simple thing.
Once again thank you very much.
JRosa



Mario

Quote from: zematima on April 07, 2024, 02:26:59 PMI am sorry for all the time you spent for such a simple thing.
Once again thank you very much.
No problem. Important is that the problem was solved.
It was not possible to tell from your screen shots and the export shows only one file-based Attribute set and two global sets.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook