Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

reverting database schema

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


mwmcmlln at mnsi

Nov 2, 2009, 7:56 AM

Post #1 of 12 (285 views)
Permalink
reverting database schema

I've managed to upgrade my back end database to a schema that even it
does not handle (most likely do a prompt when doing an up grade to 9.10
of ubuntu on a remote system). Is there a simple way of reverting to
the old database schema or should I trash it and redo it all by hand?

_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


richard.e.morton at gmail

Nov 2, 2009, 10:20 AM

Post #2 of 12 (264 views)
Permalink
Re: reverting database schema [In reply to]

2009/11/2 Mike McMullin <mwmcmlln[at]mnsi.net>

> I've managed to upgrade my back end database to a schema that even it
> does not handle (most likely do a prompt when doing an up grade to 9.10
> of ubuntu on a remote system). Is there a simple way of reverting to
> the old database schema or should I trash it and redo it all by hand?
>

Hi Mike,

I take it you haven't got a backup? there is a script to complete sql
backups that many people run daily on their backend to prevent such a
thing... worth knowing for the future - its in the contrib folder, but you
can easily do it from mysql itself or phpmyadmin

I doubt there is an easy undo created - I haven;t heard of one...

R


>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Nov 2, 2009, 11:09 AM

Post #3 of 12 (264 views)
Permalink
Re: reverting database schema [In reply to]

On 11/02/2009 10:56 AM, Mike McMullin wrote:
> I've managed to upgrade my back end database to a schema that even it
> does not handle (most likely do a prompt when doing an up grade to 9.10
> of ubuntu on a remote system). Is there a simple way of reverting to
> the old database schema or should I trash it and redo it all by hand?

Full log output from mythtv-setup run, please:

mythtv-setup 2>&1 | tee mythtv-setup.log

Thanks,
Mike
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Nov 2, 2009, 12:10 PM

Post #4 of 12 (262 views)
Permalink
Re: reverting database schema [In reply to]

2009/11/2 Richard Morton <richard.e.morton[at]gmail.com>:
>
>
> 2009/11/2 Mike McMullin <mwmcmlln[at]mnsi.net>
>>
>> I've managed to upgrade my back end database to a schema that even it
>> does not handle (most likely do a prompt when doing an up grade to 9.10
>> of ubuntu on a remote system).  Is there a simple way of reverting to
>> the old database schema or should I trash it and redo it all by hand?
>
> Hi Mike,
>
> I take it you haven't got a backup? there is a script to complete sql
> backups that many people run daily on their backend to prevent such a
> thing... worth knowing for the future - its in the contrib folder, but you
> can easily do it from mysql itself or phpmyadmin

If it's a recent version of MythTV, the schema upgrade process creates
a pre-upgrade backup of the database (default location is in your
recordings directory).

Nick

--
Nick Morrott

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 2, 2009, 12:34 PM

Post #5 of 12 (264 views)
Permalink
Re: reverting database schema [In reply to]

On 11/02/2009 03:10 PM, Nick Morrott wrote:
> 2009/11/2 Richard Morton:
>
>> 2009/11/2 Mike McMullin
>>
>>> I've managed to upgrade my back end database to a schema that even it
>>> does not handle (most likely do a prompt when doing an up grade to 9.10
>>> of ubuntu on a remote system). Is there a simple way of reverting to
>>> the old database schema or should I trash it and redo it all by hand?
>>>
>> I take it you haven't got a backup? there is a script to complete sql
>> backups that many people run daily on their backend to prevent such a
>> thing... worth knowing for the future - its in the contrib folder, but you
>> can easily do it from mysql itself or phpmyadmin
>>
> If it's a recent version of MythTV, the schema upgrade process creates
> a pre-upgrade backup of the database (default location is in your
> recordings directory).

Though there are rumors that a certain commonly-used distro uses a
script which automatically rotates backups and only keeps the one
most-current (more-specifically, most-recently-created) backup, so
depending on what happened, the pre-upgrade backup may have been
overwritten by a post- or intra-upgrade backup.

And, even the backup script distributed with Myth defaults to keeping
only the last 5 backups, so on a failed upgrade with some
upstart/monit/... loop continually restarting the backend--which will
then attempt to upgrade, which will create a new backup, then the
upgrade will again fail, then mythbackend will shut down, then something
restarts it--you could easily loose your automatic backup.

Always manually backup before upgrade in case someone "helps" you manage
your backups.

I wrote the automatic backup code, and I don't have anything
automatically starting/restarting programs, and I still always
"manually" backup my database before any upgrade. :)

This info is, obviously, for anyone else reading the thread--those for
whom it may not be too late. :)

http://www.mythtv.org/wiki/Database_Backup_and_Restore

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mwmcmlln at mnsi

Nov 2, 2009, 9:30 PM

Post #6 of 12 (243 views)
Permalink
Re: reverting database schema [In reply to]

On Mon, 2009-11-02 at 18:20 +0000, Richard Morton wrote:
>
>
> 2009/11/2 Mike McMullin <mwmcmlln[at]mnsi.net>
> I've managed to upgrade my back end database to a schema that
> even it
> does not handle (most likely do a prompt when doing an up
> grade to 9.10
> of ubuntu on a remote system). Is there a simple way of
> reverting to
> the old database schema or should I trash it and redo it all
> by hand?
>
> Hi Mike,
>
> I take it you haven't got a backup? there is a script to complete sql
> backups that many people run daily on their backend to prevent such a
> thing... worth knowing for the future - its in the contrib folder, but
> you can easily do it from mysql itself or phpmyadmin
>
> I doubt there is an easy undo created - I haven;t heard of one...

I didn't know about the scripts until after ward, at which point I
figured I ought to bite the bullet and upgrade to the latest stable
release, even if it means compiling it. But I'm stuck with an error
stating that configure cannot find the freetype libraries on my SuSE
11.1 system.
>

_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mwmcmlln at mnsi

Nov 2, 2009, 9:49 PM

Post #7 of 12 (243 views)
Permalink
Re: reverting database schema [In reply to]

On Mon, 2009-11-02 at 14:09 -0500, Michael T. Dean wrote:
> On 11/02/2009 10:56 AM, Mike McMullin wrote:
> > I've managed to upgrade my back end database to a schema that even it
> > does not handle (most likely do a prompt when doing an up grade to 9.10
> > of ubuntu on a remote system). Is there a simple way of reverting to
> > the old database schema or should I trash it and redo it all by hand?
>
> Full log output from mythtv-setup run, please:
>
> mythtv-setup 2>&1 | tee mythtv-setup.log

2009-11-03 00:46:55.410 XScreenSaver support enabled
2009-11-03 00:46:55.411 DPMS is active.
2009-11-03 00:46:55.411 Empty LocalHostName.
2009-11-03 00:46:55.411 Using localhost value of P-733-Lin
2009-11-03 00:46:55.419 New DB connection, total: 1
2009-11-03 00:46:55.425 Connected to database 'mythconverg' at host:
localhost
2009-11-03 00:46:55.427 Closing DB connection named 'DBManager0'
2009-11-03 00:46:55.429 Primary screen 0.
2009-11-03 00:46:55.430 Connected to database 'mythconverg' at host:
localhost
2009-11-03 00:46:55.431 Running in a window
2009-11-03 00:46:55.432 Using screen 0, 1680x1010 at 0,0
2009-11-03 00:46:55.453 New DB connection, total: 2
2009-11-03 00:46:55.454 Connected to database 'mythconverg' at host:
localhost
2009-11-03 00:46:55.456 The schema version of your existing database is
newer than this version of MythTV understands. Please ensure that you
have selected the proper database server or upgrade this and all other
frontends and backends to the same MythTV version and revision.


_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Nov 2, 2009, 10:54 PM

Post #8 of 12 (239 views)
Permalink
Re: reverting database schema [In reply to]

2009/11/3 Mike McMullin <mwmcmlln[at]mnsi.net>:

> 2009-11-03 00:46:55.454 Connected to database 'mythconverg' at host:
> localhost
> 2009-11-03 00:46:55.456 The schema version of your existing database is
> newer than this version of MythTV understands. Please ensure that you
> have selected the proper database server or upgrade this and all other
> frontends and backends to the same MythTV version and revision.

How many different versions of MythTV have you (tried to) run?

What is the output of `mythbackend --version` ?

Do you have any mythconverg*.sql.gz files in your recordings directory?

Nick

--
Nick Morrott

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mwmcmlln at mnsi

Nov 3, 2009, 8:26 AM

Post #9 of 12 (219 views)
Permalink
Re: reverting database schema [In reply to]

On Tue, 2009-11-03 at 06:54 +0000, Nick Morrott wrote:
> 2009/11/3 Mike McMullin <mwmcmlln[at]mnsi.net>:
>
> > 2009-11-03 00:46:55.454 Connected to database 'mythconverg' at host:
> > localhost
> > 2009-11-03 00:46:55.456 The schema version of your existing database is
> > newer than this version of MythTV understands. Please ensure that you
> > have selected the proper database server or upgrade this and all other
> > frontends and backends to the same MythTV version and revision.
>
> How many different versions of MythTV have you (tried to) run?

Before this started only the one. I have tried to upgrade figuring,
well if the database is toast, then bite the bullet and do an upgrade,
as the version that I had been using had a bug in the archive path
setting.

> What is the output of `mythbackend --version` ?

Mike[at]P-733-Lin:~> mythbackend --version
Please include all output in bug reports.
MythTV Version : Unknown
MythTV Branch : branches/release-0-21-fixes
Network Protocol : 40
Library API : 0.21.20080304-1
Options compiled in:
linux release using_oss using_alsa using_pulse using_arts using_jack
using_back
end using_dbox2 using_dvb using_firewire using_frontend using_hdhomerun
using_ip
tv using_ivtv using_joystick_menu using_lirc using_opengl_vsync
using_opengl_vid
eo using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmcw
using_xvmc_v
ld using_glx_proc_addr_arb using_bindings_perl using_bindings_python
using_openg
l using_ffmpeg_threads using_libavc_5_3 using_live
Mike[at]P-733-Lin:~>

Mike[at]P-733-Lin:~> rpm -qa | grep mythtv
mythtv-doc-0.21-22
mythtv-frontend-0.21-28.pm.33.1
mythtv-setup-0.21-28.pm.32.11
mythtv-themes-0.21-22
mythtv-backend-0.21-28.pm.33.1
mythtv-transcode-0.21-22



> Do you have any mythconverg*.sql.gz files in your recordings directory?

None, but I did shut mysql down, copy the /var/lib/mysql/mythconverg
directory, and then reinitialized the database as if it was a clean
install.

Frankly at this point I'd prefer to just run the latest release dl'ed
from the mythtv web site, then try and deal with a lost database, but it
seems that configure fails because it cannot locate the required
freetype files though freetype is installed on the system. Googling
isn't much help, and the mythtv-users channel on IRC was looking at a
problem with mysql.

_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


myth at robinhill

Nov 3, 2009, 8:38 AM

Post #10 of 12 (221 views)
Permalink
Re: reverting database schema [In reply to]

On Tue Nov 03, 2009 at 11:26:05AM -0500, Mike McMullin wrote:

> Frankly at this point I'd prefer to just run the latest release dl'ed
> from the mythtv web site, then try and deal with a lost database, but it
> seems that configure fails because it cannot locate the required
> freetype files though freetype is installed on the system. Googling
> isn't much help, and the mythtv-users channel on IRC was looking at a
> problem with mysql.
>
You mentioned SUSE 11.1 earlier, in which case you'll need freetype2 and
freetype2-devel installed.

HTH,
Robin
--
___
( ' } | Robin Hill <myth[at]robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |


mwmcmlln at mnsi

Nov 3, 2009, 9:24 AM

Post #11 of 12 (219 views)
Permalink
Re: reverting database schema [In reply to]

On Tue, 2009-11-03 at 16:38 +0000, Robin Hill wrote:
> On Tue Nov 03, 2009 at 11:26:05AM -0500, Mike McMullin wrote:
>
> > Frankly at this point I'd prefer to just run the latest release dl'ed
> > from the mythtv web site, then try and deal with a lost database, but it
> > seems that configure fails because it cannot locate the required
> > freetype files though freetype is installed on the system. Googling
> > isn't much help, and the mythtv-users channel on IRC was looking at a
> > problem with mysql.
> >
> You mentioned SUSE 11.1 earlier, in which case you'll need freetype2 and
> freetype2-devel installed.

Mike[at]P-733-Lin:/var/lib/mysql> rpm -qa | grep freetype2
freetype2-devel-2.3.7-24.2.1
freetype2-2.3.7-24.2.1



_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 3, 2009, 10:31 AM

Post #12 of 12 (207 views)
Permalink
Re: reverting database schema [In reply to]

On 11/03/2009 11:26 AM, Mike McMullin wrote:
>> Do you have any mythconverg*.sql.gz files in your recordings directory?
>>
> None, but I did shut mysql down, copy the /var/lib/mysql/mythconverg
> directory, and then reinitialized the database as if it was a clean
> install.

If you're copying 0.21-fixes DB schema data files on top of a 0.22
"blank" database (like those provided by a package), this will fail.
You need to DROP the database first.

http://www.gossamer-threads.com/lists/mythtv/users/405443#405443

Just mentioning since I'm not sure exactly what approach you took.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.