View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 7 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: MySQL export to text
PostPosted: Sun Jul 29, 2007 12:24 pm 
Offline
Joined: Wed Apr 28, 2004 12:36 am
Posts: 34
My database is hosed. I have run all the standard fix utilities.
I think I am going to wipe and reload with the latest version.
I would like to keep a few of the tables, but I don't know the name of the tables.

The only table I would like to keep is the "already viewed programs"
Every time I wipe and reload it takes months to teach MYTHBOX that I have already viewed this particular episode of the simpsons, Mythbusters, etc
I see that these tables are the most likely suspects.
recorded
recorded program

What is the way to export to text file?
Then import after rebuild?

TIA


Top
 Profile  
 
 Post subject: Re: MySQL export to text
PostPosted: Sun Jul 29, 2007 2:31 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
flatchmo wrote:
My database is hosed. I have run all the standard fix utilities.
I think I am going to wipe and reload with the latest version.
I would like to keep a few of the tables, but I don't know the name of the tables.

The only table I would like to keep is the "already viewed programs"
Every time I wipe and reload it takes months to teach MYTHBOX that I have already viewed this particular episode of the simpsons, Mythbusters, etc
I see that these tables are the most likely suspects.
recorded
recorded program

What is the way to export to text file?
Then import after rebuild?

TIA


Best way is to go to "Knoppmyth" menu and make a backup. This will back up your database and everything in /etc and /home. Copy this elsewhere for later use. This is what's used for auto upgrades.

Alternatively, "mysqldump -u root mythconverg > 20070730-mythconverg.sql" will just back up the database. You may also want to pipe it through gzip. You can also save individual tables by putting their names after the db name, like "mysqldump -u root mythconverg program channel video".

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Last edited by manicmike on Mon Jul 30, 2007 2:13 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 30, 2007 2:05 pm 
Offline
Joined: Sun Mar 05, 2006 11:27 am
Posts: 44
Location: Edinburgh, Scotland
I think you will be interested in keeping the following tables. These tables have details of old and current recordings.

oldrecorded
people
record
recorded
recordedcredits
recordedmarkup
recordedprogram
recordedrating
recordedseek


There is a pitfall. The tables are linked by the chanid field and if the new install chose a different chanid value for each channel then it might not work too well. Any rules for instance associated with a particular channel will either not work or will be attached to a different channel. I have been in a similar situation and ended up having to go through a fairly convoluted process to get the old imported records in the tables associated with the correct channels.

Babblefish


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 04, 2007 9:30 am 
Offline
Joined: Thu Feb 22, 2007 6:56 pm
Posts: 79
To get a text file:

mysqldump mythconverg > mythconverg.sql

make sure you add:

add-drop-table

to the [mysqldump] section in /etc/mysql/my.cnf

This dumps the DB to a text file. You can then edit manually (if you want), and rebuild with:

mysql mythconverg < mythconverg.sql


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 04, 2007 10:49 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The standard backup actually does a dump to text format. How well that will work _by any means_ when the DB is hosed is an open question.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 04, 2007 1:11 pm 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
Here is a howto

http://www.mythpvr.com/mythtv/tips/migr ... dings.html

Keep in mind the channel ids and hostname either must kept the same or SQL files changed prior to import.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 10:00 pm 
Offline
Joined: Wed Apr 28, 2004 12:36 am
Posts: 34
Thanks Y'all


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 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