[mythtv-users] Better listings for Schedules Direct users. Free! (was Re: another scheduling strangeness/question)
Michael T. Dean
mtdean at thirdcontact.com
Wed Sep 1 20:56:33 UTC 2010
On 09/01/2010 04:18 PM, Gabe Rubin wrote:
> On Wed, Sep 1, 2010 at 1:07 PM, Michael T. Dean wrote:
>> Also, I highly recommend running optimize_mythdb.pl on a daily basis. It
>> may not help /that/ much, but it shouldn't hurt.
> This brings up another question I have. I have cron jobs to optimize
> and backup the database daily. Does it matter which goes first (i.e.,
> is it possible that optimizing could damage the database so I would
> want a backup prior to that operation)?
That's kind of a chicken-and-egg problem. It's possible that repairing
(which is one of the things optimize_mythdb.pl does) a crashed table
could cause damage or data loss (especially if there's a mysqld crash
while repairing a table, but data loss is actually possible even without
the crash). That said, if you have any crashed tables, those tables
can't be backed up to a SQL-based backup. So, when you have a crashed
table, you can't back up the database because of the crashed table***.
But, if you repair the table, it can cause damage or data loss (though
the likelihood of either is rather small).
So, basically, when you get to the point where data loss is most likely
to occur--when you have a crashed table--the most important backup is
yesterday's backup. The mythconverg_backup.pl script will actually keep
around older backups, rotating them out as new are created. This means
that when you lose a table today, you have yesterday's backup to save you.
That said, I've been running optimize_mythdb.pl daily since it was first
committed and haven't had any problems with it. I do back up the
database with the mythconverg_backup.pl script, so that helps me to
worry less. :)
Mike
***Or, at least, you'd have to tell mysqldump not to back up the crashed
tables--in which case you're not backing up the crashed table, which is
the one most likely to undergo loss.
More information about the mythtv-users
mailing list