LinuxMCE Forums
May 20, 2013, 01:56:23 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Importing KnoppMyth's database  (Read 649 times)
Eirik
Regular Poster
**
Posts: 16


View Profile
« on: May 13, 2007, 06:42:45 am »

I just finished my migration to LinuxMCE and wanted to write this down someplace, hope it helps someone.

Hopefully you did a backup and saved the files from /myth/backup. Smiley

After you have MythTV working (able to watch TV) you can restore parts of the databases you want to keep. For example to import your `oldrecorded` table.

gzip -d mythconverg.sql
grep -n "DROP TABLE" mythconverg.sql
[....]
1186:DROP TABLE IF EXISTS `oldfind`;
1207:DROP TABLE IF EXISTS `oldprogram`;
1228:DROP TABLE IF EXISTS `oldrecorded`;
1271:DROP TABLE IF EXISTS `people`;
1294:DROP TABLE IF EXISTS `phonecallhistory`;
1319:DROP TABLE IF EXISTS `phonedirectory`;
[....]
sed -n '1228,1270 p' mythconverg.sql > oldrecorded.sql
mysql -D mythconverg < oldrecorded.sql

The first sed number (1228) is the line matching the table we want, the second (1270) is -1 of the next table.

Repeat for any other tables you want to import.

If you had any tv shows recorded you can import them as well. Move the files into the /home/public/data/tv_shows_1 (or tv_shows_0 not sure the difference but this worked for me) directory and import the 'recorded' table. Then restart the mythtv-backend.

Not sure if it was needed, but in the logs it yelled at me so I ran:

for each in `ls *.mpg`; do mythcommflag --file $each --rebuild; done

inside the tv_shows_1 directory as well.

oldrecorded = shows recorded in the past
recorded = shows currently recorded
record = shows to record
Logged
darrenmason
Addicted
*
Posts: 529


View Profile
« Reply #1 on: May 14, 2007, 01:22:21 am »

Good work but perhaps this would be better put in the documentation (Wiki) perhaps.

Regards
Darren
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!