[mythtv-users] DB restore

Daryl McDonald darylangela at gmail.com
Tue Feb 3 23:31:37 UTC 2015


On Tue, Feb 3, 2015 at 12:32 PM, Bill Meek <keemllib at gmail.com> wrote:

> On 02/02/2015 10:50 PM, Daryl McDonald wrote:
>
>> There was definitely something corrupting my database, what got me going
>> again was restoring a database from a few months ago, now I have
>> mega-multiple orphans to deal with. The question now is will any of the
>> testing you've suggested be of any value, with the old database in place?
>> Thanks Bill, Daryl
>>
>>
> Value, probably. Needed, not now. My next response would *probably* have
> included the
> Wiki and steps for restoring the DB, which it sounds like you've done.
>
> I was trying to verify that a DB restore was all that was required, rather
> than the rsync that you had considered.
>
> Knowing your passwords and being able to run mysqlanalyze is probably a
> good thing to know now so if you have future problems, you can get a
> feel for what's wrong.
>
> Doing more frequent DB backups is probably a good idea. I thought that
> Mythbuntu had a cron job that did it for you. I choose to backup weekly,
> and /etc/cron.weekly/mythtv-database does the heavy lifting for me. I
> changed the script to also check the size of the backup and email the
> results to my BE user. That way if the backup runs, but has an unusual
> file size, I'll know to see if the backup is correct or some thing's
> wrong.
>
> I'd still look at the mysql error logs to see if there are any clues about
> why this happened.
>
>
> --
> Bill
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>

I had the DB backups set to daily, keeping the last five, but when I
tried,early on, to restore, MCC didn't recognize any backups as "valid"
which became my big roadblock. The backup I found and used was on a flash
drive and about three months old, so I had to manipulate the settings to
reflect the new HDHR and ended up pruning quite a few recordings that we
might (not now) have watched and others went into "videos". I think I'm in
good shape now, I ran "orphans.py" after rearranging things and after
applying 1 thru 5 I got a strange message:

Are you sure you want to continue?
> yes
Traceback (most recent call last):
  File "./find-orphans.py", line 230, in <module>
    main()
  File "./find-orphans.py", line 214, in main
    opt[1](opt[2])
  File "./find-orphans.py", line 129, in delete_recs
    rec.delete(True, True)
  File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 363, in
delete
    return self.getProgram().delete(force, rerecord)
  File "/usr/lib/python2.7/dist-packages/MythTV/mythproto.py", line 956, in
delete
    res = int(be.deleteRecording(self, force=force))
ValueError: invalid literal for int() with base 10: ''
daryl at daryl-A780L3C:~$ ./find-orphans.py
Traceback (most recent call last):
  File "./find-orphans.py", line 221, in <module>
    DB = MythDB()
  File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 1275, in
__init__
    raise MythDBError(MythError.DB_CREDENTIALS)
MythTV.exceptions.MythDBError: Could not find database login credentials
daryl at daryl-A780L3C:~$

Should this be a new thread?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150203/9839a091/attachment.html>


More information about the mythtv-users mailing list