[mythtv-users] Restore backup?

Michael T. Dean mtdean at thirdcontact.com
Mon Jan 6 19:04:41 UTC 2014


On 01/06/2014 01:17 PM, Daryl McDonald wrote:
> On Mon, Jan 6, 2014 at 11:06 AM, Michael T. Dean wrote:
>> On 01/06/2014 12:21 AM, Stephen P. Villano wrote:
>>> I'm further curious, does MythTV backup verify its backup?
>>> Things can go weird during a backup, resulting in a corrupted backup.
>>> Hence, my question.
>>
>> MythTV never does backups of the database, except it will attempt a backup
>> before a database upgrade (which only happens when you install a new version
>> of MythTV).  If the automatic, pre-upgrade backup fails, it will tell
>> you--which means if you're doing a proper upgrade and have started
>> mythtv-setup to let it do the upgrade, you will be notified with a dialog on
>> screen; but if you start mythbackend on the master backend host and let it
>> do the upgrade, you will be notified in a log message (meaning it's useless
>> to you because you won't have time to back up the database yourself before
>> it starts changing things).
>>
>> So, normally, the mythconverg_backup.pl script is only run when the user
>> runs it, and it reports the results as an exit code , which the user must
>> verify.  So, if using a script to do the backup, have it check for a zero
>> exit code (meaning no errors), or if running interactively, make sure you
>> don't see any error messages in the console.
> I'm confused, if MythTV never does backups why do I have five
> db-backups in a sub directory of the MythTV directory? Prior to Jan
> 5th they were from the five Sundays in December, now four Dec. and one
> Jan.

Your distro/packagers may have set up an automatic backup cron job that 
calls mythconverg_backup.pl or something.

> At this point I haven't restored any backups, and I'm still wondering
> if I need to, to verify their utility?

I'd actually recommend against practicing the restore.  As long as 
you've verified the backup process is working, which you can do by 
simply running mythconverg_backup.pl --verbose in a terminal and 
watching to ensure there are no error messages reported, you should be 
OK.  Because restoring a database can cause all sorts of problems (from 
database access permissions/password changes to data/schema corruption), 
I recommend practicing it only when required (especially since it's not 
$10,000/min downtime data or anything, but just TV--and you won't lose 
the recordings even if you lose the database).

> Do I remember correctly that the BE must be shut down to restore a backup?

Definitely.  You can't just rip the database out from under the MythTV 
system and expect it to handle things properly.  You should shut down 
/all/ MythTV applications on /all/ hosts when doing a restore.

Mike


More information about the mythtv-users mailing list