<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).&nbsp; 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.&nbsp; 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?&nbsp; Can I use the old mythconverg
database and just copy it over - how do I do that?&nbsp; How do I
preserve my mysql settings? (is there a config file I should copy
over?)&nbsp; Any easy way to get my apache config files for mythweb
copied over?<br><br>
Any advise on getting smoothly back online?&nbsp; I've been using Myth
for a few years now - but never had to recover from anything like this
and&nbsp; in that respects still a bit of a noob,&nbsp; 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>
&nbsp;&nbsp;&nbsp; daily<br>
&nbsp;&nbsp;&nbsp; rotate 28<br>
&nbsp;&nbsp;&nbsp; extension .bz2<br>
&nbsp;&nbsp;&nbsp; ifempty<br>
&nbsp;&nbsp;&nbsp; missingok<br>
&nbsp;&nbsp;&nbsp; firstaction<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/home/mythtv/myth-optimize<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/mythtv/myth-backup<br>
&nbsp;&nbsp;&nbsp; endscript<br>
&nbsp;&nbsp;&nbsp; lastaction<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; touch
/opt/mythdb/mythdb_backup.bz2<br>
&nbsp;&nbsp;&nbsp; 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 &quot;Started ${OPT_MYTHDB} on `date`&quot; &gt;&gt; ${LOG}<br>
${OPT_MYTHDB} &gt;&gt; ${LOG}<br>
echo &quot;Finished ${OPT_MYTHDB} on `date`&quot; &gt;&gt;
${LOG}<br><br>
# more ~mythtv/myth-backup<br>
#!/bin/sh<br>
#Dumps the mythconverg database - daily backup<br>
DUMPFILE=&quot;mythdb_backup.bz2&quot;<br>
/usr/bin/mysqldump -u mythtv -pmythtv mythconverg -c | /usr/bin/bzip2
-cq9 &gt; /opt/mythdb/$DUMPFILE<br>
exit 0<br><br>
Restoring from the backup is the best way to maintain your mythconverg
database.&nbsp; <br><br>
Alternatively you can generate a backup copy from your old partition and
then install that backup into a new partition.&nbsp; <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.&nbsp; <br>
2. Get a dump of the old database. <br><br>
$ /usr/bin/mysqldump -u mythtv -pmythtv mythconverg -c &gt;
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.&nbsp; <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&gt; drop database mythconverg;<br>
mysql&gt; create database mythconverg;<br>
mysql&gt; flush privileges;<br>
mysql&gt; exit<br>
$ mysql -u mythtv -pmythtv mythconverg &lt; mythtv_backup.sql<br><br>
You should be good to go.<br><br>
-- Mache</font></body>
</html>