[mythtv-users] download datadirect to file

R. G. Newbury newbury at mandamus.org
Fri Aug 10 15:28:24 UTC 2007


Bilge Tutak wrote:
> Thanks,
> This did the trick.
> 
> Bilge.
> 
> On 8/8/07, Tim Gray <tim at p-a-a-i.com> wrote:
>> I have had to do this before,
>> .Due to several problems, I will lose my internet connection at my home for
>> several weeks. I will still be able to use .internet at work. I want to be
>> able to use the MythTV at home. Is there a way I can download the datadirect
>> listings .manually and then insert them using mythfilldatabase --file
>> option?


There is a different (and better?) method if you use zap2it at present.

Provided you have a computer with internet access on which you can run a 
duplicate copy of the Myth version you are running at home (to avoid 
schema differences), then the following scripts will dump and restore 
the listings data *from the mythconverg database*.

So you can use your Zap2it labs account ('til September!!!) exactly as 
at present. And your SchedulesDirect account thereafter...


The backup script creates a mythtv-listings.txt file from the 
mythconverg database. Copy that to a USB memory key and copy to the 
isolated machine and restore. The file path names are arbitrary at 
either end.
The mysql user and password are the 'usual' mythtv.

It does require installing myth on the connected computer. Copy the 
unconnected computer's mythconverg database over. If necessary, change 
the IP address on the mythtv-setup General page to 127.0.0.1 so the 
connected computer refers to itself properly. Backend will complain that 
it cannot find the (supposedly) installed tuning hardware, but will 
continue. Frontend will complain if you try to play any recordings, but 
mythfilldatabase will work...


###########################################################
#!/bin/bash
# mythtv-listings-backup


if [ -x /opt/mythtv ];
then
         mkdir /opt/mythtv;
fi

if [ -x /opt/mythtv/db ];
then
         mkdir /opt/mythtv/db;
fi

if [ -x /opt/mythtv/db/mysql-listings.txt ];
then
         echo "Remove old data file"
         rm -fv /opt/mythtv/db/mythtv-listings.txt;
fi

mysqldump -u mythtv -pmythtv mythconverg --tables credits oldprogram 
people program programgenres programrating > 
/opt/mythtv/db/mythtv-listings.txt

################################################################

################################################################
# mythtv-listings-restore
mysql -u mythtv -pmythtv mythconverg < /opt/mythtv/db/mythtv-listings.txt

################################################################

Geoff


More information about the mythtv-users mailing list