Some background details about the "media path"

Hi,

I would like to dive a little bit deeper into the meaning of the Family Tree’s data media path in preferences.

My setup is as follow:

  • database location: .../GrampsData/DataDir
  • location of my media (.pdf, .png, .jpg, *.txt): …/GrampsData/documents
  • entry in Preference → Familiytree → Family Tree’s Media Path: <empty>

It appears that all linked documents to people and families are properly stored in the system.

Here are my questions:

  1. What happened with all the links in the system if I’m entering a path in the preferences → -> family Tree → Family tree’s media path?
  2. Is this reference valid only to the FT in the system (currently I have only one FT in the system)?
  3. What is the scenario if I’m adding another FT to the system with it’s own media collection?

I would like to know a little bit more about this feature before adding another FT and possibly messing everything up.

Thanks for any reply.

PS. FT stands for Family Tree

Running Gramps v6.0.7 (flatpak) - Linux Mint v23.2

The media path stored in Preferences is stored with the database. If you had more than one database, each could have its own unique path.

Without a stored path, the path field of each media record will be the full directory pointing to the file.

The ideal, and easiest to backup etc, is to store all your media files for a database in the same media folder. I am on Win10 and my media path is C:\Users\daves\Genealogy\Media. Under the Media folder, I have a number of folders… Birth, Marriage, Death, Census, Church, Military, etc to store the actual files. Other users use a folder system by family name.

When adding a new media record, there is a check box… Convert to a relative path. This has Gramps only store the subfolders and file name in the record’s path field. Gramps knows the base path.

There is the Media Verify addon tool that will use the base media path and the stored checksum for each media file to fix issues.

My Census folder was getting too large so I broke it down into sub-folders by country and state and for the U.S. federal census by year. I moved the records to their knew folders and where appropriate, renamed the files. The file name did not need 1940 when it was now in the 1940 folder. Media verify, using the checksums and the base path found all of the moved and renamed files. It was a simple fix to update all of their path’s in their Gramps record.

I am sure you haver other questions.

If you add the path to Preferences, the Media Manager can be used to fix the individual record paths.

I like the idea, however I fear it is too late for me for that now since I have approx. over 100 documents that are attached to all people in one family tree.

It would have been nice if I would have had this information earlier.

media management tool

There is a tool for managing media paths. Here is the link to a wiki section about the Media Manager tool https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Tools#Media_Manager

I would suggest experimenting with this tool before using it on your main tree. I would personally backup the entire database with media, and then restore it into a different tree. This will duplicate all your media, so that you can freely experiment with moving the media around with your testing tree. Of course there are other ways to do this too.

flatpak specific

Specifically for the flatpak, the Gramps flatpak has full home directory access. It has no root directory access, which includes removable media drives. If you want to access a removable drive (or not recommended due to speed–a network drive) in the flatpak, the easiest method is to install an app named flatseal. Flatseal can change the permissions for any flatpak. https://flathub.org/en/apps/com.github.tchx84.Flatseal

Thanks for the tip. I am using already flatseal.

It is never too late!! (Famous last Words!) But this is why Backups are important!!

You can enter the base media path in Preferences.

Install the Media Verify tool and run the Generate option. This ensures that the checksum of the raw media file agrees with its record in Gramps. This is important because if you ever edited the raw file (resized, cropped, etc) after creating its Gramps record, the checksums will be different.

Now you can create a set of sub-folders and move the files into their new folders.

Now run the MV tool again this time using the Verify option. The tool will find the files in their new folders and present you with a list of the old information and the new information it wants to modify. Use the Fix option to make the changes.

All the changes that would be made are in the media records. Nothing changes to the media record attached to Aunt Mary.

In the earlier post I mentioned doing this with my census records. Currently I have more than 7000 census records and MV handled it with ease.