Using data file/db between two computers

Is it possible to share a Gramps file/database between two computers (I’m presuming only one can have it open at a time)? Currently my brother shares his Family Tree v7 files betwen an apartment computer during the week and a home computer on the weekends (keeping them synchronized through OneDrive). Now I find FTW7just won’t work under MSWin11, and can’t select/change print settings under Linux (Crossover Office), so it’s time to look at replacements. Gramps has the benefit of being multi-platform but he needs to be able to use the same data on separate machines (hours apart). I’m not so sure Gramps can do that.

I can’t think of a technical reason why not. If you are using the same version of Python, I would think that would work fine. But I admit I don’t have any experience with such a setup.

I ‘share’ my gramps data between two machines, a Win 10 desktop PC and a Win 11 laptop, as follows:

  1. I treat the copy on my desktop PC as the master copy, i.e. I only ever edit the db on that machine.
  2. I export my tree from my master copy as a Gramps XML Package (family tree and media) to a USB stick
  3. I rename the tree on my laptop by adding a suffix in the style _YYMMDD
  4. I create a new / empty tree on my laptop
  5. I import the exported package into that new / empty tree

In principle you could modify that approach to also edit on the second machine, then export the updated tree as a package and import it to a new / empty tree on your first device. Not exactly a slick operation and definitely one that requires strong discipline in always exporting/importing every time you finish a session on which ever machine you are using. Even so it would work.

Others here will probably have ideas for a better approach.

It’s not a problem as long as you are sure you have synced the OneDrive folder properly before you open Gramps on the second computer.

It is a few hick-ups if you use both Windows and Linux though…

I have been doing this for years… I have configured the folder for manual sync on all devices I use, I always run a manual sync before I start Gramps and after I have shut it down, regardless of if I have added or edited anything…
then I check the OneDrive folder to see that the file has got a new timestamp…

If you don’t do the sync manually, you risk getting a lot of sync conflicts in OneDrive and with that a lot of corrupted files filling up OnenDrive.

It is possible to use the same database for Gramps on Linux and Windows to, I have done that with WSL2 installations of Linux on Win 11, but it is a hassle because the connectstring differ as the folder settings for media… so you must either change it every single time you switch system or choose not to use media on one of the systems…
There are some workarounds, but…

PS. I did this on an earlier version of Win 11 and WLS2, I have not checked out if there have been any new features for the latest updates regarding this…

edit: oooh, and I do not use standard folders for the db etc.

Under Linux it is simply a matter of redirecting the path to the DB file.

The DB and its ancillary files for Gramps 6.x are in /home/<user>/.local/share/gramps/grampsdb/ in a directory with a hash-name. You can get this hash name from Family Trees>Manage Family Trees after selecting your tree and pressing Info.

In the remote computer, you can either replace the full directory by a URL-link to the other computer, or only the DB file in this directory by a link. I don’t recommend the latter because the lock file won’t be unique.

It is easy when your computers are on the same LAN. If they are distant, you need a DNS entry for easy access. Of course, you can encode the URL with the IP address but this works only if the IP is fixed.

Pay special attention to security and configure the firewall accordingly.

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