Backup before upgrade

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

Backup before upgrade

Ross Gammon
Hi All,

Based on feedback on the Users List when Ubuntu switched to 4.0.x of
Gramps, I am just writing a Debian NEWS file for 4.1. This will warn
users about the database upgrade during the upgrade/install and before
they execute the new Gramps version.

What would be the best instructions? I was going to write that they
should copy their ".gramps" directory to a different place, in case
for some reason they need to go back to their older version of Gramps.

But is there another simple approach to extract gramps xml somehow?

Cheers,

Ross

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

John Ralls-2

On Aug 24, 2014, at 7:57 AM, Ross Gammon <[hidden email]> wrote:

> Hi All,
>
> Based on feedback on the Users List when Ubuntu switched to 4.0.x of
> Gramps, I am just writing a Debian NEWS file for 4.1. This will warn
> users about the database upgrade during the upgrade/install and before
> they execute the new Gramps version.
>
> What would be the best instructions? I was going to write that they
> should copy their ".gramps" directory to a different place, in case
> for some reason they need to go back to their older version of Gramps.
>
> But is there another simple approach to extract gramps xml somehow?
>

It's always wise to have a good backup before upgrading, but that aside there's no worry about ~/.gramps: The version-specific data is kept in separate per-version subdirectories so multiple versions of Gramps can coexist on the same system. There's a database format change between 4.0 and 4.1, so before upgrading users should duplicate each of their family trees, naming one copy foo-40 and the other foo-41. When they run Gramps 4.1.x they should open and upgrade foo-41; foo-40 will still be usable with Gramps34 and Gramps40. The only catch is that they must do everything twice to keep them in sync.

Regards,
John Ralls



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

Ross Gammon
On 08/24/2014 05:13 PM, John Ralls wrote:

[...]

> It's always wise to have a good backup before upgrading, but that
> aside there's no worry about ~/.gramps: The version-specific data
> is kept in separate per-version subdirectories so multiple versions
> of Gramps can coexist on the same system. There's a database format
> change between 4.0 and 4.1, so before upgrading users should
> duplicate each of their family trees, naming one copy foo-40 and
> the other foo-41. When they run Gramps 4.1.x they should open and
> upgrade foo-41; foo-40 will still be usable with Gramps34 and
> Gramps40. The only catch is that they must do everything twice to
> keep them in sync.
>
> Regards, John Ralls
>

Thanks John. Hopefully everyone does a backup before they upgrade, but
it is very likely that some don't :-)

I am trying to come up with some advice for people that do an "apt-get
dist-upgrade" without taking any precautions (e.g. to go from Debian
Wheezy to Jessie in a few months time).

Something similar happened from Ubuntu 13.10 > 14.04:
$ do-release-upgrade
$ gramps
- Get warning about database upgrade, but don't really want to go back
at this stage.
- Open a family tree to see what it looks like anyway.
- Something makes user unhappy and wants to go back to old version
(doesn't have to be a problem with Gramps, could be another part of
Ubuntu that is not satisfying). The user is now stuck.

I wanted to include a NEWS file so that during the upgrade the
user/admin gets a warning before running Gramps for the first time.

Copying .gramps somewhere is simple to describe, and should be safe if
the user rolls back to the old version on the same machine.

Alternatively, is there a way to extract some gramps xml without
having to upgrade the database, or reinstall the old gramps?

Anyway, if there is no useful action in this particular case, and it
is just duplicating the warning they get when they first run gramps,
then maybe I will just drop the extra warning.

Regards,

Ross

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

John Ralls-2

On Aug 25, 2014, at 1:10 PM, Ross Gammon <[hidden email]> wrote:

> On 08/24/2014 05:13 PM, John Ralls wrote:
>
> [...]
>
>> It's always wise to have a good backup before upgrading, but that
>> aside there's no worry about ~/.gramps: The version-specific data
>> is kept in separate per-version subdirectories so multiple versions
>> of Gramps can coexist on the same system. There's a database format
>> change between 4.0 and 4.1, so before upgrading users should
>> duplicate each of their family trees, naming one copy foo-40 and
>> the other foo-41. When they run Gramps 4.1.x they should open and
>> upgrade foo-41; foo-40 will still be usable with Gramps34 and
>> Gramps40. The only catch is that they must do everything twice to
>> keep them in sync.
>>
>> Regards, John Ralls
>>
>
> Thanks John. Hopefully everyone does a backup before they upgrade, but
> it is very likely that some don't :-)
>
> I am trying to come up with some advice for people that do an "apt-get
> dist-upgrade" without taking any precautions (e.g. to go from Debian
> Wheezy to Jessie in a few months time).
>
> Something similar happened from Ubuntu 13.10 > 14.04:
> $ do-release-upgrade
> $ gramps
> - Get warning about database upgrade, but don't really want to go back
> at this stage.
> - Open a family tree to see what it looks like anyway.
> - Something makes user unhappy and wants to go back to old version
> (doesn't have to be a problem with Gramps, could be another part of
> Ubuntu that is not satisfying). The user is now stuck.
>
> I wanted to include a NEWS file so that during the upgrade the
> user/admin gets a warning before running Gramps for the first time.
>
> Copying .gramps somewhere is simple to describe, and should be safe if
> the user rolls back to the old version on the same machine.
>
> Alternatively, is there a way to extract some gramps xml without
> having to upgrade the database, or reinstall the old gramps?
>
> Anyway, if there is no useful action in this particular case, and it
> is just duplicating the warning they get when they first run gramps,
> then maybe I will just drop the extra warning.
>

AFAIK once one has upgraded gramps via the package manager one is stuck as far as using Gramps on the existing database unless one is expert enough to install an older version off to the side somewhere.

Copying .gramps only backs up the databases if the user hasn’t set the Family Trees folder to somewhere else using Preferences.

Regards,
John Ralls



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

Ross Gammon
[..]

> Copying .gramps only backs up the databases if the user hasn’t set
> the Family Trees folder to somewhere else using Preferences.
>
> Regards, John Ralls
>

Thanks - careful wording of the message is required.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

Tim Lyons
Administrator
When Gramps issues the warning about being sure to back-up the database before doing the upgrade of a specific family tree, if you ask for the tree upgrade, I implemented code in the tree upgrade to create a zip file of the database for that particular family tree before the upgrade (because users wouldn't actually create a back-up however vigorously we told them). It doesn't tell you in the dialogue box, but if you run gramps from the console, there is a message that says a back-up has been created, and that it could be deleted if all goes well.

I intentionally kept this rather quiet, because if 'lusers' (sorry) know about the back-up zip file, they might just unthinkingly and immediately delete it. My intention was that if they reported (e.g. through the mailing list) that they had upgraded and things had gone wrong, we could tell them where their automatic back-up was stored, and we/they could try to recover from that.

Of course, this doesn't help in rolling back to an old version of the Gramps application itself (which is a separate problem).

John's advice about "before upgrading users should duplicate each of their family trees, naming one copy foo-40 and the other foo-41. When they run Gramps 4.1.x they should open and upgrade foo-41; foo-40 will still be usable with Gramps34 and Gramps40. The only catch is that they must do everything twice to keep them in sync. " is still good.

(BTW, I think John's comment about "there's no worry about ~/.gramps: The version-specific data is kept in separate per-version subdirectories so multiple versions of Gramps can coexist on the same system." might be a bit misleading. This is about the per-version copies of things like ini files and plugins - the family tree databases are indeed stored in ~/.gramps, but these are NOT kept in version specific sub directories and hence do not support multiple versions.)
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

John Ralls-2

On Aug 25, 2014, at 2:44 PM, Tim Lyons <[hidden email]> wrote:

>
> (BTW, I think John's comment about "there's no worry about ~/.gramps: The
> version-specific data is kept in separate per-version subdirectories so
> multiple versions of Gramps can coexist on the same system." might be a bit
> misleading. This is about the per-version copies of things like ini files
> and plugins - the family tree databases are indeed stored in ~/.gramps, but
> these are NOT kept in version specific sub directories and hence do not
> support multiple versions.)
>

True. I keep my databases in my GoogleDrive directory, so I tend to forget that the default is in .gramps/grampsdb.

Maybe instead of the stealth zip file we should just upgrade to a new database and mark the original with a modified name.

Regards,
John Ralls


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

Tim Lyons
Administrator
In reply to this post by Ross Gammon
John, your message didn't seem to make it to the list, so I am  
including it all in this reply.


The message you got (below) is peculiar, in fact odd, because it says  
you are trying to _downgrade_ the bsddb version. Normally, you would  
be upgrading. I suppose in this case, you took the Family Tree you had  
created in your brand shiny new Debian and tried to load it into a  
Windows AIO that apparently uses an older version of bsddb.

In this case, there is no automatic upgrade path, and you have to go  
back to you shiny new Debian environment, and dump the Family tree in  
XML format. There should be no possibility in this case of corrupting  
the database, and hence no need to do a backup.

In the more normal case, there might be a bsddb upgrade when you would  
get a warning like:

         return _('The Family Tree you are trying to load is in the  
Bsddb '
                  'version %(env_version)s format. This version of  
Gramps uses '
                  'Bsddb version %(bdb_version)s. Therefore you cannot  
load '
                  'this Family Tree without upgrading the Bsddb  
version of the '
                  'Family Tree.\n\n'
                  'Opening the Family Tree with this version of Gramps  
might '
                  'irretrievably corrupt your Family Tree. You are  
strongly '
                  'advised to backup your Family Tree.\n\n'
                  'If you have not already made a backup of your  
Family Tree, '
                  'then you should start your <b>old</b> version of  
Gramps and '
                  '<a href="http://www.gramps-project.org/wiki/index.php?title=How_to_make_a_backup 
">'
                  'make a backup</a> of your Family Tree.') % \


If you then do this upgrade, you may then possibly get a rather  
similar warning about upgrading the schema version.

Tim.


On 26 Aug 2014, at 11:04, John Doorty wrote:

> Hi Tim
>
> As a newbie to everything Gramps but not to doing backups.
>
> I installed GrampsAIO-4.1.1-86bfff_win32_py27 and I created a new  
> blank
> database. Noticed that this created a new subdirectory in the
> ~/.gramps/grampsdb directory. Now I intend to import from the Gramps  
> 3.4.8
> db into the Gramps 4.1.1 version.
>
> The GUI versions Family Tree drop-down shows both Trees, so I think I
> understand what you mean when you say, " these are NOT kept in version
> specific sub directories and hence do not support multiple versions"  
> as the
> older version thinks it can load the newer version, when it really  
> can't?
> The warning that conversion to the newer version being irreversible  
> is very
> clear, and if I try to open it the warning is:
>
> "The Family Tree you are trying to load is in the Bsddb version (6.  
> 0, 30)
> format. This version of Gramps uses Bsddb version (4, 7. 25). So you  
> are
> trying to load data created in a newer Format into an older program,  
> and
> this is bound to fail. You should start your newer version of Gramps  
> and
> make a backup of your Family Tree. You can then import this backup  
> into this
> version of Gramps. "
>
> I think this is ok.
>
> John
>
> -----Original Message-----
> From: Tim Lyons [mailto:[hidden email]]
> Sent: 25 August 2014 22:44
> To: [hidden email]
> Subject: Re: [Gramps-devel] Backup before upgrade
>
> When Gramps issues the warning about being sure to back-up the  
> database
> before doing the upgrade of a specific family tree, if you ask for  
> the tree
> upgrade, I implemented code in the tree upgrade to create a zip file  
> of the
> database for that particular family tree before the upgrade (because  
> users
> wouldn't actually create a back-up however vigorously we told them).  
> It
> doesn't tell you in the dialogue box, but if you run gramps from the
> console, there is a message that says a back-up has been created,  
> and that
> it could be deleted if all goes well.
>
> I intentionally kept this rather quiet, because if 'lusers' (sorry)  
> know
> about the back-up zip file, they might just unthinkingly and  
> immediately
> delete it. My intention was that if they reported (e.g. through the  
> mailing
> list) that they had upgraded and things had gone wrong, we could  
> tell them
> where their automatic back-up was stored, and we/they could try to  
> recover
> from that.
>
> Of course, this doesn't help in rolling back to an old version of  
> the Gramps
> application itself (which is a separate problem).
>
> John's advice about "before upgrading users should duplicate each of  
> their
> family trees, naming one copy foo-40 and the other foo-41. When they  
> run
> Gramps 4.1.x they should open and upgrade foo-41; foo-40 will still be
> usable with Gramps34 and Gramps40. The only catch is that they must do
> everything twice to keep them in sync. " is still good.
>
> (BTW, I think John's comment about "there's no worry about  
> ~/.gramps: The
> version-specific data is kept in separate per-version subdirectories  
> so
> multiple versions of Gramps can coexist on the same system." might  
> be a bit
> misleading. This is about the per-version copies of things like ini  
> files
> and plugins - the family tree databases are indeed stored in  
> ~/.gramps, but
> these are NOT kept in version specific sub directories and hence do  
> not
> support multiple versions.)
>
>
>
> --
> View this message in context:
> http://gramps.1791082.n4.nabble.com/Backup-before-upgrade-tp4666917p4666955 
> .
> html
> Sent from the GRAMPS - Dev mailing list archive at Nabble.com.
>
> ----------------------------------------------------------------------------
> --
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Backup before upgrade

enno
Tim,
> The message you got (below) is peculiar, in fact odd, because it says
> you are trying to _downgrade_ the bsddb version. Normally, you would
> be upgrading. I suppose in this case, you took the Family Tree you had
> created in your brand shiny new Debian and tried to load it into a
> Windows AIO that apparently uses an older version of bsddb.
I can confirm that. On Windows 3.4.8 and 4.1.1 use the same bsddb, which
is 4.7.25, where on Linux, most of use have 5.x I guess.
> In this case, there is no automatic upgrade path, and you have to go
> back to you shiny new Debian environment, and dump the Family tree in
> XML format. There should be no possibility in this case of corrupting
> the database, and hence no need to do a backup.
I'd rather reverse that, in that sense that creating a backup without
media creates the XML file right away, without a need to go through all
sorts of export options. I use that all the time when I want to export
my 3.4.8 tree from my Linux working environment to my laptop that runs
Windows 8.1.

regards,

Enno


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel