<html>
<body>
<font size=3>At 03:58 AM 7/20/2008, Nick F wrote:<br>
<blockquote type=cite class=cite cite="">Help!<br><br>
Something hosed my backend (I've got builders in and I think they were
cycling the power in the house on and off when installing something - I
unfortunately wasn't home - and I think it's messed with my system
drive). The computer wouldn't boot (got stuck at the grub menu) and
the 'recovery installation' option in the Fedora DVD couldn't fix
it.<br><br>
My data is all fine (on a separate 5-disk RAID-5 array on the
machine).<br><br>
I have installed a fresh instance of Fedora 9 on a new partition on free
space on the system drive. I can mount my old partitions to get to
my old /etc files, etc. Using my old mdadm.conf I can get my RAID back
just fine.<br><br>
Unfortunately my last backup of my myth database is dated the 4th of July
- so I'm at least 2 weeks behind (which is better than 2 1/2
years).<br><br>
What's the best way to recover? Can I use the old mythconverg
database and just copy it over - how do I do that? How do I
preserve my mysql settings? (is there a config file I should copy
over?) Any easy way to get my apache config files for mythweb
copied over?<br><br>
Any advise on getting smoothly back online? I've been using Myth
for a few years now - but never had to recover from anything like this
and in that respects still a bit of a noob, Myth has become
the only way to watch any TV or listen to music in the house and my wife
is getting annoyed!<br><br>
Thanks<br>
Nick<br>
_______________________________________________<br>
mythtv-users mailing list<br>
mythtv-users@mythtv.org<br>
<a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" eudora="autourl">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a></font>
</blockquote><font size=3><br>
If it were me and I were sure that the media was OK, I would just upgrade
the entire old partition to Fedora 9 making sure to preserve all the
earlier data. That would be the cleanest approach. Then backup the
database via cron job religiously. I use this script in my
/etc/logrotate.conf<br><br>
/opt/mythdb/mythdb_backup.bz2 {<br>
daily<br>
rotate 28<br>
extension .bz2<br>
ifempty<br>
missingok<br>
firstaction<br>
/home/mythtv/myth-optimize<br>
/home/mythtv/myth-backup<br>
endscript<br>
lastaction<br>
touch
/opt/mythdb/mythdb_backup.bz2<br>
endscript<br>
}<br><br>
# more ~mythtv/myth-optimize<br>
#!/bin/sh<br>
# Optimize the database<br>
OPT_MYTHDB='/usr/share/doc/mythtv-docs-0.21/contrib/optimize_mythdb.pl'<br>
LOG='/var/log/mythtv/optimize_mythdb.log'<br>
echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}<br>
${OPT_MYTHDB} >> ${LOG}<br>
echo "Finished ${OPT_MYTHDB} on `date`" >>
${LOG}<br><br>
# more ~mythtv/myth-backup<br>
#!/bin/sh<br>
#Dumps the mythconverg database - daily backup<br>
DUMPFILE="mythdb_backup.bz2"<br>
/usr/bin/mysqldump -u mythtv -pmythtv mythconverg -c | /usr/bin/bzip2
-cq9 > /opt/mythdb/$DUMPFILE<br>
exit 0<br><br>
Restoring from the backup is the best way to maintain your mythconverg
database. <br><br>
Alternatively you can generate a backup copy from your old partition and
then install that backup into a new partition. <br>
You cannot just copy it over. To reinstall mythconverg in a new myth
installation,<br><br>
1. Get mysql working and make it think it is working with your old
/var/lib/mysql that has your old data in it. <br>
2. Get a dump of the old database. <br><br>
$ /usr/bin/mysqldump -u mythtv -pmythtv mythconverg -c >
mythtv_backup.sql<br><br>
3. Once you have the dump of mythconverg in mythtv_backup.sql, do a full
reinstall of mythtv in accordance with
<a href="http://www.wilsonet.com/mythtv/fcmyth.php" eudora="autourl">
http://www.wilsonet.com/mythtv/fcmyth.php</a>. Make sure you install the
empty database that is part of the clean install. <br><br>
4. Then with an empty new mythconverg in place, follow the instructions
here
(<a href="http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5" eudora="autourl">
http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5</a>)<br><br>
$ mysql -u root -p<br>
mysql> drop database mythconverg;<br>
mysql> create database mythconverg;<br>
mysql> flush privileges;<br>
mysql> exit<br>
$ mysql -u mythtv -pmythtv mythconverg < mythtv_backup.sql<br><br>
You should be good to go.<br><br>
-- Mache</font></body>
</html>