View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Nov 15, 2009 7:57 pm 
Offline
Joined: Wed Oct 04, 2006 9:04 pm
Posts: 6
hi all,

i'm trying to upgrade directly from a vanilla r5d1 installation to 6.01. i have set up a test box by copying my installation by rsync'ing root and /myth. i can bring up r5d1 on the copy and it all looks normal so i know it's copied everything. when i run the 6.01 upgrade it all runs through without errors. however after it reboots i find that the db seems to be empty - no program guide, no recordings, no recording rules.

my questions are :

1.

should the upgrade to 6.01 preserve the contents of the db ?

2.

assuming it should keep the db contents :

a.

what upgrade logs can i check to see what has happened that might explain why this did not occur as expected ?

b.

is there something in particular i have to do to make sure it picks up my old db ?

c.

is there a script i can run ( that the upgrade would / should use ) to copy / load my existing db into the new empty db. i presume there are some schema changes between myth 0.19 ( r5d1 ) and 0.21 ( 6.01 ) so that i can't just use the old db.

3.

if i have to, can i just load all the old columns from all my old tables into the new empty db ? if so, is there a mysql command that will generate inserts using column names ?

regards.


Top
 Profile  
 
PostPosted: Mon Nov 16, 2009 10:07 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
backinblack wrote:
1. should the upgrade to 6.01 preserve the contents of the db?

Yes.

backinblack wrote:
2. assuming it should keep the db contents :
a. what upgrade logs can i check to see what has happened that might explain why this did not occur as expected?

The upgrade process actually tells you this itself.

backinblack wrote:
b. is there something in particular i have to do to make sure it picks up my old db?

See my notes here: http://knoppmyth.net/phpBB2/viewtopic.php?t=20302

backinblack wrote:
c. is there a script i can run ( that the upgrade would / should use ) to copy / load my existing db into the new empty db. i presume there are some schema changes between myth 0.19 ( r5d1 ) and 0.21 ( 6.01 ) so that i can't just use the old db.

You can try doing a DB restore using the standard scripts. The BE/FE should then automatically upgrade the schema to the current revision. This may mean that some new settings revert to MythTV (versus KM or LH) defaults.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 17, 2009 6:54 pm 
Offline
Joined: Sat Mar 22, 2008 10:24 pm
Posts: 26
Location: Dsm, IA
I have a similar problem. (no DB after upgrade...)
Should we continue here, or is 'good style' to start a new thread for every problem?


Top
 Profile  
 
PostPosted: Wed Nov 18, 2009 10:34 pm 
Offline
Joined: Wed Oct 04, 2006 9:04 pm
Posts: 6
based on :

Quote:
You can try doing a DB restore using the standard scripts. The BE/FE should then automatically upgrade the schema to the current revision.


what i've now done is :

a.

clean install of linhes 6.01 making sure i use the same host name

b.

after installation, exit straight out of myth-setup and run mythrestore. however, mythrestore fails creating the first table in the dump because it already exists. i suspect that this is what happened when i first tried to run the upgrade. my resolution was to edit mtyhrestore to drop the database immediately before it runs the create database command. since the create database command is already there in mythrestore, i'm hoping that there really shouldn't be a problem dropping the db at this point. the restore then worked successfully.

c.

when mytbackend starts after the restore, i can see from the mythbackend log that it's upgrading the schema automatically. after the schema is up to date mythbackend is available and all my data seems to be there :)





why did my r5d1 dump fail to restore into an already populated database when it tried to create a table that already existed?

after i finished my installation and restore i ran mythbackup. looking at the sql generated i can see that it now includes a 'drop table if exists' before every 'create table' statement. so if you're upgrading from a more up to date version of myth ( that includes the drop statements ) then the upgrade ( or at least mythrestore ) will probably work smoothly.





so it's all looking good. my only concern is if there are any issues with me actually droppping the database before restoring ? e.g. is there anything in the 'mysql' database ( as opposed to 'mythconverg' ) that i need to recreate ? i'll do a dump of the mysql db before and after i drop the mythconverg db next time i run this test and see if that shows any differences.



thanx again for all the help so far.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 20, 2009 8:45 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Well, it used to drop the old tables before restoring. There are several reasons for doing this some having to do with how MythTV does automatic schema updates based on the versions restored into the db.

If it's not doing that anymore someone else must have changed it. I'd have to check the git repository to figure out who and what they were thinking.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu