[mythtv-users] REMINDER: Back Up Your Database.
Paul Gardiner
lists at glidos.net
Thu Jan 2 16:18:23 UTC 2014
On 02/01/2014 14:58, Michael T. Dean wrote:
> On 01/02/2014 09:53 AM, Karl Newman wrote:
>> On Thu, Jan 2, 2014 at 6:31 AM, Jeff Breitner wrote:
>>
>>> On Wed, Jan 1, 2014 at 6:20 PM, Mike McMullin wrote:
>>>
>>>> Deciding to force a backup just in case, I found out that I no
>>>> longer
>>>> have the mythconverg_backup.pl for 0.27. Any ideas as to where this
>>>> can
>>>> be dl'ed from?
>>>>
>>>>
>>> You can always try this:
>>>
>>> #!/bin/bash
>>> time=`date +"%m%d%Y%H%M"`
>>> mysqldump -u root --password=<password> mythconverg>
>>> /var/lib/mythconverge-$time.dump
>>>
>>> No, please don't do this. mythconverg_backup.pl uses specific
>> command-line arguments to mysqldump to prevent a corrupted backup (or
>> restore). That's why the script was created--for a reliable, supported
>> method of backup and restore.
>
> Exactly. The given mysqldump command line /will/ create a backup with a
> corrupt schema, so if you ever restored that backup, you will have a
> corrupt schema (which could break functionality of the running system
> and/or prevent proper upgrades of the database in the future).
Although I very much trust your knowledge of MythTV and generally follow
your advice, I should probably point out that this whole discussion has
been started by my experiences that have in fact been the exact
opposite. Before first seeing you advise against the use of mysqldump,
I had been using it for years, about twice a year, to copy all my
databases between servers. I have two servers that I alternate, so that
I can keep updating opensuse without having to risk my currently live
machine. A combination of mysqldump and rsync pull all my important
files across. I've never *knowingly* had a database problem on those
machines.
This current problem was my girlfriend's mythtv system, and it was using
mythconverg_backup on that which led to her lost database. Admittedly, I
was probably unknowingly using a 0.24 version of mythconverg_backup on
a 0.25 system (that seems the most likely explanation from what others
have said). Also, I should probably have been suspicious that it ran so
quickly and have checked the result. But I remember thinking "I'm being
safer than usual because I'm doing it the way I'm supposed to" :-) That
sort of lulled me into a false sense of security.
Anyway, just out of interest, what is the corruption? I think you said
before, but I can't remember. I thought it was to do with the charset,
but default for mysqldump is to have the --set-charset option.
Cheers,
Paul.
More information about the mythtv-users
mailing list