restoring old gramps databases

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

restoring old gramps databases

Graham Seaman
Hi

I used to use gramps a while ago (I don't remember which version). I
kept the  folder of databases I had at the time. Now I've just installed
gramps on a new system (gramps 5.0.1 on debian), and I can't work out
how to import my old databases. The installation has created a new
folder at ~/.gramps, which is as you would expect empty. I can't find an
option to 'import database' or similar, and it seems to ignore it when I
change the 'family tree database path' in preferences to my old folder.

Any advice?

Thanks

Graham





--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

Brad Rogers
On Fri, 3 Jul 2020 16:56:21 +0100
Graham Seaman <[hidden email]> wrote:

Hello Graham,

>Any advice?

Create a new (i.e. empty) database first.  Now import an old database
into it.  Repeat for as many databases you wish to import.

Sounds easy.

However....

The old database type is likely to be a BSDDB one, which is heavily
version dependent, and the version of Gramps you've installed will
likely complain about the database you try to import.  Consequently, you
might have to install older versions of Gramps to get your databases up
to date.

The easiest thing to do is probably to try to import your databases
(keep those backups!), and report any errors or warnings (please be
specific as to what they say) to this list, and there will be people that
can offer further advice.

--
 Regards  _
         / )           "The blindingly obvious is
        / _)rad        never immediately apparent"
We are the chosen
Changed - Judgement Centre


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org

attachment0 (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

Ron Johnson
In reply to this post by Graham Seaman
On 7/3/20 10:56 AM, Graham Seaman wrote:
Hi

I used to use gramps a while ago (I don't remember which version). I kept the  folder of databases I had at the time. Now I've just installed gramps on a new system (gramps 5.0.1 on debian), and I can't work out how to import my old databases. The installation has created a new folder at ~/.gramps, which is as you would expect empty. I can't find an option to 'import database' or similar, and it seems to ignore it when I change the 'family tree database path' in preferences to my old folder.

Are you referring to old database backup files (with extension ".gramps" or ".gpkg"), or the actual trees themselves (which should have been in ~/.gramps)?


--
Angular momentum makes the world go 'round.


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

enno
In reply to this post by Graham Seaman

Hello Graham,

I used to use gramps a while ago (I don't remember which version). I kept the  folder of databases I had at the time. Now I've just installed gramps on a new system (gramps 5.0.1 on debian), and I can't work out how to import my old databases. The installation has created a new folder at ~/.gramps, which is as you would expect empty. I can't find an option to 'import database' or similar, and it seems to ignore it when I change the 'family tree database path' in preferences to my old folder.

If you mean that you have a grampsdb folder, with several numbered folders inside, you can move that grampsdb folder into ~/.gramps, start Gramps, and see what happens. It should have no problem reading databases from version 3.4 or later, and converting to 5.0.1.

You may want to make a backup of that grampsdb folder first.

Note that you can also install the latest 5.1.x from our site.

Regards,

Enno




--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

GRAMPS - User mailing list
Enno's approach is right... assuming you don't already have a *.gramps export file or *.gpkg archive. (Both of these already contain stable XML backups without any database dependency.)

And doubly right to recommend backing up the old 'working' database folder to a USB thumb drive FIRST. Those folders would contain old BSDDB Berkeley database files for any Gramps before July 2019 -- when the 5.x versions came out with an SQLite database engine option.  

Trying to open those active database files immediately CHANGES the file. (That's true of any modern database application, not just Gramps.) So you want to work with the 'safety net' of an offline OS folder backup.

Once you're in, MAKE AN XML BACKUP. You'll want to convert from BSDDB to the new preferred SQLite database engine:

Importing info a .gramps export file or .gpkg compressed archive into a fresh SQLite Tree will give you a clean re-starting point.
https://www.gramps-project.org/wiki/index.php/How_to_restore_a_backup

-Brian

On Fri, Jul 3, 2020 at 14:01, Enno Borgsteede

Hello Graham,

If you mean that you have a grampsdb folder, with several numbered folders inside, you can move that grampsdb folder into ~/.gramps, start Gramps, and see what happens. It should have no problem reading databases from version 3.4 or later, and converting to 5.0.1.

You may want to make a backup of that grampsdb folder first.

Note that you can also install the latest 5.1.x from our site.

Regards,

Enno



--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

Graham Seaman
Thanks to Emyoulation and everybody who advised on this. I had 9
different family trees, last used in 2017, and have managed to load 8
old .gramps backups, convert to the new format, and back up again. I'm a
little puzzled that you say .gramps files are XML, when they appear to
be binaries: is it some kind of compressed XML?

The last problem is one family tree I don't seem to have backed up
properly: I have no .gramps or .gpkg file for this, just a .zip file,
which if I unpack contains a number of .db files. I don't remember how I
created this! Is it a standard type of backup I can restore from too?

Thanks again

Graham


On 03/07/2020 21:35, Emyoulation--- via Gramps-users wrote:

> Enno's approach is right... assuming you don't already have a *.gramps
> export file or *.gpkg archive. (Both of these already contain stable XML
> backups without any database dependency.)
>
> And doubly right to recommend backing up the old 'working' database
> folder to a USB thumb drive FIRST. Those folders would contain old BSDDB
> Berkeley database files for any Gramps before July 2019 -- when the
> 5.x versions came out with an SQLite database engine option.  
> https://www.gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_What%27s_new%3F#Primary_changes
>
> Trying to open those active database files immediately CHANGES the file.
> (That's true of any modern database application, not just Gramps.) So
> you want to work with the 'safety net' of an offline OS folder backup.
>
> Once you're in, MAKE AN XML BACKUP. You'll want to convert from BSDDB to
> the new preferred SQLite database engine:
> https://www.gramps-project.org/wiki/index.php/How_to_make_a_backup
>
> Importing info a .gramps export file or .gpkg compressed archive into a
> fresh SQLite Tree will give you a clean re-starting point.
> https://www.gramps-project.org/wiki/index.php/How_to_restore_a_backup
>
> -Brian
>
>     On Fri, Jul 3, 2020 at 14:01, Enno Borgsteede
>     <[hidden email]> wrote:
>
>     Hello Graham,
>
>     If you mean that you have a grampsdb folder, with several numbered
>     folders inside, you can move that grampsdb folder into ~/.gramps,
>     start Gramps, and see what happens. It should have no problem
>     reading databases from version 3.4 or later, and converting to 5.0.1.
>
>     You may want to make a backup of that grampsdb folder first.
>
>     Note that you can also install the latest 5.1.x from our site.
>
>     Regards,
>
>     Enno
>
>
>


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

Ron Johnson
On 8/1/20 12:42 PM, Graham Seaman wrote:
> Thanks to Emyoulation and everybody who advised on this. I had 9
> different family trees, last used in 2017, and have managed to load 8
> old .gramps backups, convert to the new format, and back up again. I'm a
> little puzzled that you say .gramps files are XML, when they appear to
> be binaries: is it some kind of compressed XML?

Yes, ".gramps" files are gzipped XML files.  Decompress it and you get
another .gramps file, but this time it's XML.

$ file Johnson-Lyle_v22.gramps
Johnson-Lyle_v22.gramps: gzip compressed data, was
"Johnson-Lyle_v22.gramps", last modified: Fri Feb 12 18:28:22 2016, max
compression


> The last problem is one family tree I don't seem to have backed up
> properly: I have no .gramps or .gpkg file for this, just a .zip file,
> which if I unpack contains a number of .db files. I don't remember how I
> created this! Is it a standard type of backup I can restore from too?
>
> Thanks again
>
> Graham
>
>
> On 03/07/2020 21:35, Emyoulation--- via Gramps-users wrote:
>> Enno's approach is right... assuming you don't already have a *.gramps
>> export file or *.gpkg archive. (Both of these already contain stable XML
>> backups without any database dependency.)
>>
>> And doubly right to recommend backing up the old 'working' database
>> folder to a USB thumb drive FIRST. Those folders would contain old BSDDB
>> Berkeley database files for any Gramps before July 2019 -- when the
>> 5.x versions came out with an SQLite database engine option.
>> https://www.gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_What%27s_new%3F#Primary_changes
>>
>> Trying to open those active database files immediately CHANGES the file.
>> (That's true of any modern database application, not just Gramps.) So
>> you want to work with the 'safety net' of an offline OS folder backup.
>>
>> Once you're in, MAKE AN XML BACKUP. You'll want to convert from BSDDB to
>> the new preferred SQLite database engine:
>> https://www.gramps-project.org/wiki/index.php/How_to_make_a_backup
>>
>> Importing info a .gramps export file or .gpkg compressed archive into a
>> fresh SQLite Tree will give you a clean re-starting point.
>> https://www.gramps-project.org/wiki/index.php/How_to_restore_a_backup
>>
>> -Brian
>>
>>      On Fri, Jul 3, 2020 at 14:01, Enno Borgsteede
>>      <[hidden email]> wrote:
>>
>>      Hello Graham,
>>
>>      If you mean that you have a grampsdb folder, with several numbered
>>      folders inside, you can move that grampsdb folder into ~/.gramps,
>>      start Gramps, and see what happens. It should have no problem
>>      reading databases from version 3.4 or later, and converting to 5.0.1.
>>
>>      You may want to make a backup of that grampsdb folder first.
>>
>>      Note that you can also install the latest 5.1.x from our site.
>>
>>      Regards,
>>
>>      Enno

--
Angular momentum makes the world go 'round.


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: restoring old gramps databases

GRAMPS - User mailing list
In reply to this post by Graham Seaman
The binary .gramps and .gpkg files are both compressed archives. (7-zip is mentioned repeatedly in the wiki. See https://www.7-zip.org/download.html ) Gramps automatically recognizes the possibilty of any .gramps file might be be a compressed or a plain-text XML. If you open a binary .gramps archive file with 7zip, you'll find a plain XML file will an identical name to the archive.

As to that other files. You might have ZIPped up your working directory of .db format Trees.  They're probably all in the pre-version5.1 BSDDB database format.  So, instead of a single Tree, you might say it is a forest. That forest was an elegant short-term workaround to the hassle of backing up each Tree individually! 

Before 5.0, all the extra files in the hex-numbered folders (other than the .db files) were implicit. It wasn't necessary to have subfolders. 

It was only with the Advent of 5.0's database API that we needed to include identifiers for WHICH database format (BSDDB, SQLite, MongoDB, postgreSQL , etc) the .db file used.

-Brian

On Sat, Aug 1, 2020 at 12:55, Graham Seaman
Thanks to Emyoulation and everybody who advised on this. I had 9
different family trees, last used in 2017, and have managed to load 8
old .gramps backups, convert to the new format, and back up again. I'm a
little puzzled that you say .gramps files are XML, when they appear to
be binaries: is it some kind of compressed XML?

The last problem is one family tree I don't seem to have backed up
properly: I have no .gramps or .gpkg file for this, just a .zip file,
which if I unpack contains a number of .db files. I don't remember how I
created this! Is it a standard type of backup I can restore from too?

Thanks again

Graham


On 03/07/2020 21:35, Emyoulation--- via Gramps-users wrote:

> Enno's approach is right... assuming you don't already have a *.gramps
> export file or *.gpkg archive. (Both of these already contain stable XML
> backups without any database dependency.)
>
> And doubly right to recommend backing up the old 'working' database
> folder to a USB thumb drive FIRST. Those folders would contain old BSDDB
> Berkeley database files for any Gramps before July 2019 -- when the
> 5.x versions came out with an SQLite database engine option.  
> https://www.gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_What%27s_new%3F#Primary_changes
>
> Trying to open those active database files immediately CHANGES the file.
> (That's true of any modern database application, not just Gramps.) So
> you want to work with the 'safety net' of an offline OS folder backup.
>
> Once you're in, MAKE AN XML BACKUP. You'll want to convert from BSDDB to
> the new preferred SQLite database engine:
> https://www.gramps-project.org/wiki/index.php/How_to_make_a_backup
>
> Importing info a .gramps export file or .gpkg compressed archive into a
> fresh SQLite Tree will give you a clean re-starting point.
> https://www.gramps-project.org/wiki/index.php/How_to_restore_a_backup
>
> -Brian
>
>    On Fri, Jul 3, 2020 at 14:01, Enno Borgsteede
>    <[hidden email]> wrote:
>
>    Hello Graham,
>
>    If you mean that you have a grampsdb folder, with several numbered
>    folders inside, you can move that grampsdb folder into ~/.gramps,
>    start Gramps, and see what happens. It should have no problem
>    reading databases from version 3.4 or later, and converting to 5.0.1.
>
>    You may want to make a backup of that grampsdb folder first.
>
>    Note that you can also install the latest 5.1.x from our site.
>
>    Regards,
>
>    Enno

>
>
>


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org