Two Gramps directories for media files after reinstallation

Gramps 5.15, Manjaro Linux, XFCE.

Hello everyone,

I’m a newbie on this forum and I have a simple question about relative paths. My OS language is French.

I have been using Gramps since 2020 with no trouble except this one. I pasted by mistake a whole text in the GPS coordinates window for a new place. After that, every time I tried to create a new place, it broke XFCE. To solve the problem, I backuped the whole database (20 Gb with all the medias), erased the hidden Gramps directory, reinstalled Gramps and restored my database. Everything works fine, except that the media are now split in two different Gramps directories.

Arbre familial 1.gpkg.media
└── home
└── jean
├── Arbre familial 1POTTAM_2021-01-05-2021-05-03-09-34-15_2021-07-12.gpkg.media
│ └── home
│ └── jean
│ └── Gramps
└── Gramps

It works fine, but what a mess !

What do you suggest ?

Welcome

The problem was using the backup including media files. Since you were going from your original Gramps database to a new Gramps database on the same machine the standard .gramps (XML) non-media backup would have sufficed. Including the media option should be limited to backups for storage separate from the computer (depending on the number of media files this backup will become very large) and to exporting a branch of your database to give to relatives.

In Gramps, the Media records only point to the raw media files. These files sit in folders in your OS. Gramps does not actually hold any media file, only the path to these files.

To solve your issue…

Look at what you have stored as the base media path in Preferences (menu >> Edit >> Preferences) Base path for relative media paths:

This is the folder Gramps will look for your active media files. FYI: This is a database setting so different family tree databases can have different media folders.

In your Media records, the path field should reference files in the base path folder and any of its subfolders.

The final solution… delete the media folder on your hard drive that is NOT holding the media records referenced in Gramps.

Hello @jean.pottam ,

When I look at the name, that backup file was pretty old, and I assume that you have added new media after 2021. Is that right? And if it’s right, where are they now?

If you’re not sure whether one path is more complete than the other, you may use a duplicate finder to eliminate all files that are exact copies of the others, so that you will not have to fear that you might loose information when you move all to the same path.

Here’s a list of duplicate finders for Linux:

Thank you both DaveSch and ennoborg. I just backuped the whole database with media on an external drive, so I can try to clear this directory mess. If my problem is solved I will post the answer.
As a newbie, during the first 2020 lockdown, I decided to build my genealogical tree from scratch, without previous knowledge. Being a long time Linux user, Gramps was only the logical choice. But for a newbie, Gramps documentation is more or less useless. Without a community, the average user would be lost. So, again, thank you for your time.

This is not an argument about how usable the documents are. (In fact, I have been frustrated when trying to write tutorials because of being continually stymied as I discover items that are missing basic introductory material to cross-reference. So it requires some foundation work first.) But Gramps software and documentation only improve through volunteer efforts.

Perhaps now that you have successfully navigated this problem with help, maybe you could write a newbie document on the process? After a few years, users become unqualified to write for newbies. And when a user becomes experienced enough to be comfortable writing about Gramps processes, they usually lose interest in writing for newbies.

So please help out the next newbie with a useful bit of documentation. Every bit helps.

(Writing using the MediaWiki markup or the Gramps wiki stylesheet isn’t easy either. So writing in a word processer without worrying about those extras is fine… we can reformat if there is good content!)

Hello @jean.pottam ,

Me again. There is another tool, that you can use, that’s somewhere in the tools menu, where it’s called something like Media Verification. I can’t give you the exact name, because I run Gramps in Dutch. You can use that to make fingerprints (checksums) of all media files, and once you’ve done that, you can move them to another place inside your configured media path, and after doing that, you can run it again, and let Gramps use those fingerprints to figure out where they are now. It is a very powerful tool, and a big time saver, also because there is no risk of typing errors, like when you do a search and replace on the media paths yourself. It may need some time to fingerprint those 10 GBs, but it’s worth waiting for.

About the manual, I second @emyoulation 's comments, and hope that you can help us with such a document. I am the type of person that never reads manuals, and learns by exploring, and that makes it hard to write things of people who’s mind works different than mine. Maybe just keeping a log of your actions may work as a start for a guide.

Before everything, I tried to copy the two media directories on a flashrive, so I had to rename a dozen files, with incorrect characters (", |, ?) in their names, delete old links and create new ones. Then I installed dupeGuru on my system, it gives me all the duplicate files. About generating checksums, all I know the command line sha256sum to generate checksums, for Gramps use of these checksums, I must read Gramps manual First.

If you only work with Linux, you can format your flash drive as ext4, to prevent problems with file names. And if you still have that backup, you can restore them from that, with the names as Gramps stored them.

Checksums can and must be generated by Gramps itself, and it can only generate them for media files that it can find, so you must generate them before moving and/or renaming, using the 3rd party add-on described here:

https://gramps-project.org/wiki/index.php/Addon:Media_Verify_Tool

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.