[mythtv-users] db_backup failure after recent update on Master

James Abernathy jfabernathy at gmail.com
Wed Oct 11 13:52:18 UTC 2023


On Wed, Oct 11, 2023 at 8:58 AM James Abernathy <jfabernathy at gmail.com>
wrote:

>
>
> On Wed, Oct 11, 2023 at 8:55 AM James Abernathy <jfabernathy at gmail.com>
> wrote:
>
>>
>>
>> On Wed, Oct 11, 2023 at 8:42 AM David Hampton via mythtv-users <
>> mythtv-users at mythtv.org> wrote:
>>
>>> On Wed, 2023-10-11 at 07:58 -0400, James Abernathy wrote:
>>> >
>>> >
>>> > On Wed, Oct 11, 2023 at 7:51 AM John Pilkington
>>> > <johnpilk222 at gmail.com> wrote:
>>> > > On 11/10/2023 12:42, James Abernathy wrote:
>>> > > >
>>> > > >
>>> > > > On Wed, Oct 11, 2023 at 7:22 AM James Abernathy
>>> > > > <jfabernathy at gmail.com
>>> > > > <mailto:jfabernathy at gmail.com>> wrote:
>>> > > >
>>> > > >      I have my mythconverg backup script running daily and after
>>> > > >      yesterday's update to master it didn't run this morning at
>>> > > > 5:40 as
>>> > > >      it should.  I know because I didn't get the email it usually
>>> > > > sends
>>> > > >      to one of my gmail accounts.
>>> > > >
>>> > > >      I checked the systemctl status and this is what I saw:
>>> > > >
>>> > > >      Oct 11 05:40:02 kubuntu-closet systemd[1]: Starting Backup
>>> > > > MythTV
>>> > > >      Database 'mythconverg'...
>>> > > >      Oct 11 05:40:02 kubuntu-closet mythtv-database-
>>> > > > backup.sh[319303]:
>>> > > >      Database schema 1379 not supported.
>>> > > >      Oct 11 05:40:02 kubuntu-closet mythtv-database-
>>> > > > backup.sh[319303]:
>>> > > >      Bindings support schema version 1378
>>> > > >      Oct 11 05:40:02 kubuntu-closet systemd[1]:
>>> > > >      mythtv-database-backup.service: Main process exited,
>>> > > > code=exited,
>>> > > >      status=1/FAILURE
>>> > > >      Oct 11 05:40:02 kubuntu-closet systemd[1]:
>>> > > >      mythtv-database-backup.service: Failed with result 'exit-
>>> > > > code'.
>>> > > >      Oct 11 05:40:02 kubuntu-closet systemd[1]: Failed to start
>>> > > > Backup
>>> > > >      MythTV Database 'mythconverg'.
>>> > > >
>>> > > >
>>> > > >      Not sure why it's talking about schema 1379??
>>> > > >
>>> > > >      Jim A
>>> > > >
>>> > > >
>>> > > > BTW, the complete script that systemd runs to backup is below:
>>> > > > #!/bin/sh
>>> > > > # /etc/cron.weekly/mythtv-database script - check and backup
>>> > > > mythconverg
>>> > > > tables
>>> > > > # Copyright 2005/12/02 2006/10/08 Paul Andreassen
>>> > > > #                      2010 Mario Limonciello
>>> > > >
>>> > > > set -e -u
>>> > > >
>>> > > > DBNAME="mythconverg"
>>> > > > USER="mythtv"
>>> > > > OPT_MYTHDB='/usr/share/doc/mythtv-
>>> > > > backend/contrib/maintenance/optimize_mythdb.pl
>>> > > > <http://optimize_mythdb.pl>'
>>> > > >
>>> > > > /usr/bin/mysqlcheck -s $DBNAME
>>> > > >
>>> > > > BKUP_LOG=/tmp/backup-mythconverg.log
>>> > > >
>>> > > > export MYTHCONFDIR=/home/mythtv/.mythtv/
>>> > > >
>>> > > > ${OPT_MYTHDB} | grep -v "^Analyzed:" 2>&1 > $BKUP_LOG
>>> > > >
>>> > > > sudo --preserve-env --user=$USER
>>> > > > /usr/share/mythtv/mythconverg_backup.pl
>>> > > > <http://mythconverg_backup.pl> \
>>> > > >       --rotate=5 --verbose 2>&1 >> $BKUP_LOG
>>> > > >
>>> > > > if [ $? -eq 0 ]; then
>>> > > >       MSG="kubuntu-closet $DBNAME Checked and Backed Up, RC=$?"
>>> > > > else
>>> > > >       MSG="kubuntu-closet $DBNAME Back Up Failed, RC=$?"
>>> > > > fi
>>> > > >
>>> > > > cd /data/mythtv/db_backups/
>>> > > > ls -l --directory --block-size=K * | tail -10 >> $BKUP_LOG
>>> > > >
>>> > > > mail -s "$MSG" my.email at gmail.com <mailto:my.email at gmail.com> <
>>> > > > $BKUP_LOG
>>> > > >
>>> > > >    --------------------------
>>> > > >
>>> > > > The actual error I get when it's run from the console is:
>>> > > >
>>> > > > Database schema 1379 not supported.
>>> > > > Bindings support schema version 1378
>>> > > >
>>> > > > Jim A
>>> > > >
>>> > > chema 1379 came with yesterday's commit for gallery images.
>>> > >
>>> > >
>>> > >
>>> https://github.com/MythTV/mythtv/commit/5825b36c97ec742f908845ccd11eee40040c0529
>>> > >
>>> > > ISTR that these updates used to get a bigger flag.  Nowadays they
>>> > > just
>>> > > happen...
>>> > >
>>> > >
>>> >
>>> >
>>> > It seems that normal TV program recording and playback still works
>>> > fine, so I'll  wait for things to just clear up.
>>>
>>> Did your MythTV perl bindings get updated at the same time your backend
>>> was updated?  They should both use schema 1379. What's the output of:
>>>
>>>    grep SCHEMA $(find /usr -name MythTV.pm 2>/dev/null) | head -1
>>>
>>> I was able to run a database backup on my production system (schema
>>> 1379) without a problem.
>>>
>>> David
>>>
>>>
>> jim at kubuntu-closet:~$ grep SCHEMA $(find /usr -name MythTV.pm
>> 2>/dev/null) | head -1
>> /usr/local/share/perl/5.34.0/MythTV.pm:    our $SCHEMA_VERSION = "1378";
>> jim at kubuntu-closet:~$
>>
>>
>> Jim A
>>
>>
> FYI, I tried this on a Debian 12 build and it showed
> jim at debian-mythtv:~$    grep SCHEMA $(find /usr -name MythTV.pm
> 2>/dev/null) | head -1
> /usr/share/perl5/MythTV.pm:    our $SCHEMA_VERSION = "1379";
>
> The previous run was on a Ubuntu 22.04 system using the ppa
>
> Jim A
>

I did some more digging and it is definitely a Ubuntu PPA v34 related
issue.  The Debian 12 backend where I build my own packages did run the
mythconverg optimize and backup just fine this morning and it's stamped as
a 1379 schema.

Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20231011/3729e289/attachment.htm>


More information about the mythtv-users mailing list