[mythtv-users] Mythsqlhotcopy restore

stan stanlist at cox.net
Fri Oct 27 21:37:07 UTC 2006


> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org 
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of stan
> Sent: Monday, October 23, 2006 11:36 AM
> To: mythtv-users at mythtv.org
> Subject: [mythtv-users] Mythsqlhotcopy restore
> 
> I'm using the mythsqlhotcopy script to back up the mythTV 
> database. How do
> you do a restore?
> 
> The comments say to copy the files back, run a few mySQL 
> utilities for fix
> up, and tell mySQL to use the restored files. Do you really 
> need to tell
> mySQL to use the restored files, or is this done 
> automatically assuming you
> stop the daemon before replacing the current files with the 
> backup versions?
> 
> --stan
> 

Hi Stan!

Another good question, as usual.

Here's a url that verifies that the restore requires only stopping mysql,
replacement of the files that were backed up, and the few fix up utilities
mention in the original mysqlhotcopy_script file.

http://www.vbulletin.com/forum/showthread.php?t=134821

I'm not sure if you need to restore the files in both the mysql directory as
well as the mythconverg directory.  Maybe SOMEONE ELSE has the answer.

Also, you didn't ask about the error message returned from the call to
mysqlhotcopy about "disconnect invalidating one active statement handle".
This url indicates it's a harmless bug in the mysqlhotcopy perl script, I
think.

http://forums.mysql.com/read.php?28,97812,99028

And one last thing you didn't mention.  The hotcopy backup script for myth
always complains it can't find the directory information_schema.  This is a
virtual database whose name is returned by the "show databases;" statement,
and it should have been ignored by the backup script.

I changed the script by editing the line 

for x in `$MYSQL -uroot -pmythtv -e "show databases;" | awk -F "|" '{print
$1}' | grep -v "Database"`

to read

for x in `$MYSQL -uroot -pmythtv -e "show databases;" | awk -F "|" '{print
$1}' | grep -vE "Database|information\_schema"`

And the line

for y in `$MYSQL -uroot -pmythtv -e "show databases;" | awk -F "|" '{print
$1}' | grep -v "Database"`

to read

for y in `$MYSQL -uroot -pmythtv -e "show databases;" | awk -F "|" '{print
$1}' | grep -vE "Database|information\_schema"`

Any comments from SOMEONE ELSE would be appreciated.

--stan


	




More information about the mythtv-users mailing list