[mythtv-users] Problem installing mythtv package on Ubuntu 24.04.1 LTS
David Hampton
mythtv at love2code.net
Fri Nov 22 13:03:39 UTC 2024
On Fri, 2024-11-22 at 23:49 +1300, Stephen Worthington wrote:
> On Fri, 22 Nov 2024 09:49:14 +0000, you wrote:
>
> > Now I'm working through the backend setup with
> > http://localhost:6544 and
> > it is progressing. However, I have a recent mythconverg DB backup
> > written by the mythconverg_backup.pl script which I got in 2020
> > from
> > https://www.mythtv.org/wiki/Database_Backup_and_Restore.
> >
> > # Script info
> > $NAME = 'MythTV Database Backup Script';
> > $VERSION = '1.0.12';
> >
> >
> > Is there any mileage in trying to restore it, or is it too old /
> > incompatible?
> >
> > % zcat mythconverg-1361-20241021010001.sql.gz | head
> > -- MySQL dump 10.19 Distrib 10.3.39-MariaDB, for debian-linux-
> > gnu
> > (x86_64)
> > --
> > -- Host: localhost Database: mythconverg
> > -- ------------------------------------------------------
> > -- Server version 10.3.39-MariaDB-0ubuntu0.20.04.2
> >
> > /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT
> > */;
> > /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS
> > */;
> > /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION
> > */;
> > /*!40101 SET NAMES utf8mb4 */;
> >
> >
> > Thanks again,
> >
> > Chris
>
> The version of mythconverg_backup.pl used to create a backup does not
> matter. You should use the latest version of mythconverg_restore.pl
> to restore a backed up database to a new MythTV install. You should
> use the version of mythconverg_backup.pl that came with that MythTV
> version to create backups on that MythTV version. On Ubuntu, you
> find
> these scripts in /usr/share/mythtv. They use mysqldump to dump the
> database.
>
> The only problem with restoring old MythTV databases in new MythTV
> versions is if the schema version of the database in the backup is
> too
> old. The code that upgrades the database schemas only goes back so
> far. If your backup is from a version that is older than supported
> by
> the current MythTV version, then you need to create a virtual PC with
> an older version of MythTV that will be able to upgrade the schema
> and
> then dump that version. Then restore this intermediate database
> version into your new MythTV setup and let it upgrade the schema.
> The
> release notes tell you what each MythTV version can upgrade from.
>
> So, what version of MythTV is the backed up database? More
> particularly, what is the database schema version?
>
> The database schema version be found in the settings table of the
> mythconverg database:
>
> sudo mysql mythconverg
> select * from settings where value='DBSchemaVer';
> exit
>
> For an existing backup file, the schema version is in the filename:
>
> mythconverg-1379-20241118053505.sql.gz
>
> The 1379 is the schema version.
With a 2020 database you shouldn't have a problem. Any recent MythTV
should be able to update from MythTV 0.25 (schema version 1244, from
the year 2012) or later.
David
More information about the mythtv-users
mailing list