[mythtv-users] URGENT HELP!!! Where does mythtv-setup put the backup after a schema update? SOLVED?

Marc drayson at net1plus.com
Sun May 11 10:05:07 UTC 2008


On May 10, 2008, at 8:56 PM, Michael Jones wrote:

>
> On May 10, 2008, at 8:51 PM, Michael Jones wrote:
>
>>
>> On May 10, 2008, at 8:29 PM, Michael T. Dean wrote:
>>
>>> On 05/10/2008 10:48 PM, Nick Morrott wrote:
>>>> On 11/05/2008, Michael Jones <michael at michaelandholly.com> wrote:
>>>>> The question is WHERE Is it stored?  and HOW do I get it back?  Is
>>>>> it
>>>>> just a full copy of the mysql/mythconverg folders?  a dump file?
>>>>> etc.
>>>>>
>>>> If you haven't configured a storage directory for the DB
>>>
>>> (specifically, a directory in a "DB Backups" storage group)
>>>
>>>> , check your
>>>> recordings directory.
>>>
>>> If you have were running 0.21-fixes and had multiple directories in
>>> your
>>> Default storage group, the backup could be in any of them.
>>>
>>> Note, though, that since mythtv-setup was run on your friend's
>>> system,
>>> it would have been the one that tried to write the backup to the
>>> directory specified in the (Default or DB Backups) storage group.   
>>> If
>>> that directory(ies) doesn't exist on his system, mythtv-setup would
>>> have
>>> written the backup to /tmp .  So, make sure you talk to your friend
>>> soon
>>> (i.e. before he shuts down his system if he has a "cleanup /tmp
>>> directory" init script like many systems do)
>>>> The compressed file contains a dump of the
>>>> database from MySQL.
>>>>
>>>> Something like
>>>>
>>>> # mysql mythconverg < dumpfile.sql
>>>>
>>>> should repopulate the file contents back into the database.
>>>
>>> See, also, http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 .
>>> Those
>>> instruction apply for restoring the backup.  The only difference is
>>> you
>>> may have to uncompress the backup first (i.e. gunzip
>>> /path/to/backup_file.gz ).
>>>
>>> Mike
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>
>> Ok.. So it seems that he has shut his system down since he left here,
>> the /tmp, /mythtv and any other recordings locations are completely
>> empty..
>>
>> It seems that either.. his system never did make a backup.. or the
>> backup has been lost (or we just can't find it)..
>>
>> He's on the 1220 version of the schema.   Is there ANY way to adjust
>> the database schema on my system manualy (I'm pretty mysql adept.. so
>> structural changes aren't too difficult) so the existing database  
>> will
>> work?
>>
>> Isn't there a "database_schema_version" field or something in the
>> settings table that the backend looks at?
>>
>>
>> Thanks guys,
>>
>> Waiting with baited breath...
>>
>> Michael
>>

Well.. I may have figured out a solution:

I manually changed the mythconverg>settings>DBSchemaVer from 1220 to  
1214

Before, mythbackend would fail to start, this time it started up as if  
it was running normally.  I ran mythtv-setup, everything seemed Ok.. I  
ran the mythtv-setup on the slave frontend, everything seemed Ok. I  
started the frontend.. everything SEEMS fine..

This SEEMS to work, but I'm a little nervous.   What are the  
ramifications of doing this?   What actually gets changed when  
updating to schema version 1220?

Any ideas?

Thanks for all the fast responses to my plea! :-)

- Michael
_______________________________________________

Mike,

If you look at 
http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythtv/dbcheck.cpp?r
ev=
You will be able to see all changes to the database from 1214 to 1220


I don't have the time to look through all the change logs for this file but
here is a brief rundown of the changes I see:
Modifications to the varType's of many columns in many tables. Should not
cause and issue, returned results should be the same.
Modifications to the default for many variables in many tables. Should not
cause and issue, existing data stays the same, new data will have the new
default value.
Deletion of the default character sets in many tables. Unsure of how this
would affect your system.
Dropped (deleted) columns in several tables. Possible severe breakage here.
Unsure if the columns were left over from a much older change and only
recently removed or if they were pulled at the same time the changes were
made to myth that meant that they were no longer needed.
New tables created. There will be no issue here as your version would not
call any data from these tables as it doesn't know they exist.


Also I would seriously recommend that you setup a backup script to run
nightly. I save 7 days worth of backups of my database, zip it, and
overwrite it on the 7th day.

Here is my script.

#! /bin/bash
#
# Created on 3/22/2006 by sdkovacs
# Updated on 9/8/2007 by Marc
# Script: mythbackup
#
#
#
########################################################
BACKFILE="/record/mythbackup.`date +%a`.sql.gz"


mysqldump -u mythtv -pmythtv mythconverg -c | gzip -c > ${BACKFILE}
if [ $? -ne "0" ]
then
        echo "Mythtv database backup failed! Exiting..."
        exit 1
fi




More information about the mythtv-users mailing list