Matt Anderson | 26 Nov 16:46 2007

Lost grdb

I did at least two dumb things this past holiday weekend.  One was
delete my grdb file, the other was to not have a back-up of it.
Thankfully I still have it all exported to a website, so no one can tell
that its all gone, but I'd really rather not load that all in by hand
again if I don't have to.  Is there anyway to re-create a gramps
database from a gramps exported website?

-matt

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Benny Malengier | 26 Nov 16:57 2007
Picon

Re: Lost grdb

If you used a recent version of gramps, the directory with your grdb contains a file with .backup extension.
You can open that then.
Otherwise, I think everything is gone.
If you read: http://www.gramps-project.org/wiki/index.php?title=Recover_corrupted_grdb
you see that loosing the environment is recoverable, but loosing the database is, for obvious reasons, not.

Benny

2007/11/26, Matt Anderson <mra <at> malloc.org>:
I did at least two dumb things this past holiday weekend.  One was
delete my grdb file, the other was to not have a back-up of it.
Thankfully I still have it all exported to a website, so no one can tell
that its all gone, but I'd really rather not load that all in by hand
again if I don't have to.  Is there anyway to re-create a gramps
database from a gramps exported website?

-matt


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gramps-users mailing list
Gramps-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gramps-users mailing list
Gramps-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users
Matt Anderson | 26 Nov 17:56 2007

Re: Lost grdb

Unfortunetally, I destroyed the partition, not just rm'ed one file.
Thankfully my webserver is far away and I'm smart enough to not
reinstall that on a whim.

I know all the information isn't in the exported website, but the
relationships are, the locations are, and some of the birthdays are.
Also the pictures are associated with the people already, that's all the
stuff I'm hoping to save.  I don't suppose this is something that could
be done up in a simple script and a Berkeley db module?

-matt

On Mon, Nov 26, 2007 at 04:57:28PM +0100, Benny Malengier wrote:
> If you used a recent version of gramps, the directory with your grdb
> contains a file with .backup extension.
> You can open that then.
> Otherwise, I think everything is gone.
> If you read:
> http://www.gramps-project.org/wiki/index.php?title=Recover_corrupted_grdb
> you see that loosing the environment is recoverable, but loosing the
> database is, for obvious reasons, not.
> 
> Benny
> 
> 2007/11/26, Matt Anderson <mra <at> malloc.org>:
> >
> > I did at least two dumb things this past holiday weekend.  One was
> > delete my grdb file, the other was to not have a back-up of it.
> > Thankfully I still have it all exported to a website, so no one can tell
> > that its all gone, but I'd really rather not load that all in by hand
> > again if I don't have to.  Is there anyway to re-create a gramps
> > database from a gramps exported website?
> >
> > -matt
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gramps-users mailing list
> > Gramps-users <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gramps-users
> >

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Douglas S. Blank | 26 Nov 18:23 2007
Picon

Re: Lost grdb

Matt Anderson wrote:
> Unfortunetally, I destroyed the partition, not just rm'ed one file.
> Thankfully my webserver is far away and I'm smart enough to not
> reinstall that on a whim.
> 
> I know all the information isn't in the exported website, but the
> relationships are, the locations are, and some of the birthdays are.
> Also the pictures are associated with the people already, that's all the
> stuff I'm hoping to save.  I don't suppose this is something that could
> be done up in a simple script and a Berkeley db module?
> 
> -matt

Your data could be retrieved from the website, but you don't need to go 
down to the level of a particular database. Perhaps the easiest way 
might be to work the data into a CSV (comma separated values) file and 
do an import into a new GRAMPS database. See:

http://emergent.brynmawr.edu/emergent/GrampsCSVImport

Is your website public? I'd be glad to take a look at see what a Python 
script might look like.

-Doug

> 
> On Mon, Nov 26, 2007 at 04:57:28PM +0100, Benny Malengier wrote:
>> If you used a recent version of gramps, the directory with your grdb
>> contains a file with .backup extension.
>> You can open that then.
>> Otherwise, I think everything is gone.
>> If you read:
>> http://www.gramps-project.org/wiki/index.php?title=Recover_corrupted_grdb
>> you see that loosing the environment is recoverable, but loosing the
>> database is, for obvious reasons, not.
>>
>> Benny
>>
>> 2007/11/26, Matt Anderson <mra <at> malloc.org>:
>>> I did at least two dumb things this past holiday weekend.  One was
>>> delete my grdb file, the other was to not have a back-up of it.
>>> Thankfully I still have it all exported to a website, so no one can tell
>>> that its all gone, but I'd really rather not load that all in by hand
>>> again if I don't have to.  Is there anyway to re-create a gramps
>>> database from a gramps exported website?
>>>
>>> -matt
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Gramps-users mailing list
>>> Gramps-users <at> lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gramps-users mailing list
> Gramps-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
dsblank | 28 Nov 04:55 2007
Picon

Re: Lost grdb


Matt,

I wrote a quick-n-dirty html scraper that is about 75% of the way there... I
see some obvious errors (looks like a person becomes their own child) and I
didn't handle events (the CSV importer doesn't do events, yet). There are
probably other major things... ran out of time.

Here it is:

http://bubo.brynmawr.edu/~dblank/getnarrative.py

and you run it like:

python getnarrative.py http://somewebsite.com/myfamily/ > import.csv

Then, in GRAMPS you should be able to import the file "import.csv" into a
blank database.

If you (or any one else) fix up the script, please share it back with us.

Good luck,

-Doug

dsblank wrote:
> 
> Matt Anderson wrote:
>> Unfortunetally, I destroyed the partition, not just rm'ed one file.
>> Thankfully my webserver is far away and I'm smart enough to not
>> reinstall that on a whim.
>> 
>> I know all the information isn't in the exported website, but the
>> relationships are, the locations are, and some of the birthdays are.
>> Also the pictures are associated with the people already, that's all the
>> stuff I'm hoping to save.  I don't suppose this is something that could
>> be done up in a simple script and a Berkeley db module?
>> 
>> -matt
> 
> Your data could be retrieved from the website, but you don't need to go 
> down to the level of a particular database. Perhaps the easiest way 
> might be to work the data into a CSV (comma separated values) file and 
> do an import into a new GRAMPS database. See:
> 
> http://emergent.brynmawr.edu/emergent/GrampsCSVImport
> 
> Is your website public? I'd be glad to take a look at see what a Python 
> script might look like.
> 
> -Doug
> 
>> 
>> On Mon, Nov 26, 2007 at 04:57:28PM +0100, Benny Malengier wrote:
>>> If you used a recent version of gramps, the directory with your grdb
>>> contains a file with .backup extension.
>>> You can open that then.
>>> Otherwise, I think everything is gone.
>>> If you read:
>>> http://www.gramps-project.org/wiki/index.php?title=Recover_corrupted_grdb
>>> you see that loosing the environment is recoverable, but loosing the
>>> database is, for obvious reasons, not.
>>>
>>> Benny
>>>
>>> 2007/11/26, Matt Anderson <mra <at> malloc.org>:
>>>> I did at least two dumb things this past holiday weekend.  One was
>>>> delete my grdb file, the other was to not have a back-up of it.
>>>> Thankfully I still have it all exported to a website, so no one can
>>>> tell
>>>> that its all gone, but I'd really rather not load that all in by hand
>>>> again if I don't have to.  Is there anyway to re-create a gramps
>>>> database from a gramps exported website?
>>>>
>>>> -matt
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by: Microsoft
>>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>> _______________________________________________
>>>> Gramps-users mailing list
>>>> Gramps-users <at> lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>>>>
>> 
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Gramps-users mailing list
>> Gramps-users <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gramps-users mailing list
> Gramps-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Lost-grdb-tf4875942.html#a13985469
Sent from the GRAMPS - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Matt Anderson | 1 Dec 22:22 2007

Re: Lost grdb

Hey Doug, Thanks again for this, it was just what I was looking for and
got me nearly there, simplifying all the really tedious work out.  So
far I haven't added too much to it, but if I do I'll be sure and post it
back to the list.

On Tue, Nov 27, 2007 at 07:55:20PM -0800, dsblank wrote:
> I wrote a quick-n-dirty html scraper that is about 75% of the way there... I
> Here it is:
> 
> http://bubo.brynmawr.edu/~dblank/getnarrative.py
> 
> and you run it like:
> 
> python getnarrative.py http://somewebsite.com/myfamily/ > import.csv
> 
> Then, in GRAMPS you should be able to import the file "import.csv" into a
> blank database.

I actually uncovered a bug around this (filing it now)  Apparently
auto-detect doesn't yet know that it knows how to import a csv file.
Nothing terrible, and hopefully it will be easy to fix.

> If you (or any one else) fix up the script, please share it back with us.
...
> see some obvious errors (looks like a person becomes their own child)

This one was actually a bit of a problem.  Gramps apparently doesn't
like it at all if a person is their own parent.  Thankfully I was able
to just add this line and it took care of that issue:

$ diff -u getnarrative.py.orig getnarrative.py
--- getnarrative.py.orig        2007-11-27 22:54:22.000000000 -0500
+++ getnarrative.py     2007-12-01 16:02:19.000000000 -0500
 <at>  <at>  -189,4 +189,5  <at>  <at> 
     kids = family[pair]
     kids = set(kids)
     for kid in kids:
-        print '"%s","%s"' % (marriage[pair], kid)
+        if (kid != pair[0]) or (kid != pair[1]):
+             print '"%s","%s"' % (marriage[pair], kid)

-matt

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Benny Malengier | 2 Dec 23:26 2007
Picon

Re: Lost grdb



2007/12/1, Matt Anderson <mra <at> malloc.org>:
This one was actually a bit of a problem.  Gramps apparently doesn't
like it at all if a person is their own parent.  Thankfully I was able
to just add this line and it took care of that issue:

I wonder why.....

Benny
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Gramps-users mailing list
Gramps-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users
Shane Killian | 3 Dec 01:28 2007

Re: Lost grdb

Benny Malengier wrote:
> 
> 2007/12/1, Matt Anderson <mra <at> malloc.org <mailto:mra <at> malloc.org>>:
> 
>     This one was actually a bit of a problem.  Gramps apparently doesn't
>     like it at all if a person is their own parent.  Thankfully I was able
>     to just add this line and it took care of that issue:
> 
> I wonder why.....
> 
I think this bug definitely needs to be fixed sometime before the
development of time travel.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

Gmane