[mythtv-users] upgrading MySQL

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 3 15:26:55 UTC 2009


On 04/03/2009 11:09 AM, Greg Woods wrote:
> On Fri, 2009-04-03 at 10:15 -0400, Michael T. Dean wrote:
>   
>> On 04/03/2009 02:09 AM, David Brodbeck wrote:
>>> If it's a backup made with mysqldump, yes, you should be able to 
>>> restore it on a different version of MySQL.  A mysqldump backup is 
>>> just a series of SQL statements that will recreate the database; it 
>>> doesn't care about versions or word size or endianness.
>>>
>>> It's only the binary files you have to be careful about moving.
>>>       
>> Right, and the easiest way to get a good backup is 
>> http://www.mythtv.org/wiki/Database_Backup_and_Restore 
>>     
> It turns out the answer with regard to moving binary files is: "it
> depends". I finally got a good mythconverg database from my old dead
> system to a new system, but I got it because I found some
> mysqldump-style backups buried in the recordings directory. Apparently
> mythbackend (or mythfilldatabase?) is making periodic backups.

mythbackend (or mythtv-setup--or, if you allow it to upgrade the 
schema--mythfrontend) does a backup before any database upgrade.  As a 
matter of fact, in trunk, it does this using the /exact/ same scripts 
that are linked from the wiki article above.  (In 0.21-fixes, it uses a 
much less robust mechanism to do so.)

> I have some other single-table databases on the same server, where the
> binary files read in just fine despite being 64-bits vs. 32-bits and
> different MySQL versions.
>   
..
> So the bottom line on copying binary databases is: Maybe. But the
> standard advice of making backups with mysqldump definitely holds. You
> certainly cannot count on being able to read binary database files from
> a system backup, as I have learned the hard way at the cost of several
> evenings' worth of effort.

And, IMHO, why waste the time trying (and not being /absolutely/ certain 
all your data is good) when all it takes for peace of mind is a simple 
backup and restore?  (Where the backup and restore are both easy with 
the backup/restore scripts. :)

Mike


More information about the mythtv-users mailing list