[mythtv-users] Restore Database from Old Database Files -- No Backup
stephen_agent at jsw.gen.nz
Thu Jan 31 02:43:56 UTC 2019
On Wed, 30 Jan 2019 16:58:18 -0500, you wrote:
>I've got a bit of an odd issue. I had a functioning mythtv system and went
>for a hardware upgrade (motherboard and chip), but not disks. All seemed
>to go well, and I thought "why not upgrade from Fedora 28->29 too?" The
>gods did not smile on my upgrade and I was left with a non-bootable OS. At
>that point, I made a full backup of both the root and home partitions as a
>precaution. I reinstalled Fedora and mythtv, but only then discovered that
>my cron job for backing up mythconverg had died in November and I hadn't
>However, I still have a full set of files in
>/backupdisk/var/lib/mysql/mythconverg (e.g., "recordedprogram.MYD,
>First, is it possible just to move these existing files over to the newly
>created /var/lib/mysql/mythconverg directory? If not, iis it possible to
>point mythconverg_backup.pl at this backup directory to create a backup
>file that mythconverg_restore.pl can work with? And if all of that fails,
>does anyone have any other suggestions?
>FYI, I'm on myth 0.29.
You can just use a copy of those database files, as long as the
version of MySQL or MariaDB is the same as when they were last being
used in your old system. Just copy the entire mythconverg directory.
Check that the ownership of the files is correct after you copy the
directory. Since your new system is a clean install rather than an
upgrade, the ID numbers assigned to the mysql and mysql group may be
different from the old system. So you may need to do a "chown -R
mysql:mysql /var/lib/mysql/mythconverg" command to fix the ownership.
If MySQL or MariaDB is a newer version, then you may still be able to
just copy those files and start MySQL or MariaDB. All going well, the
older version of the files should be automatically detected and the
mythconverg database will be upgraded to the latest version if
necessary. If that does not work, then you will need to create a
virtual PC and install the old system on it, with the matching version
of MySQL or MariaDB, then copy those files onto the virtual PC and run
mythconverg_backup.pl there. There is no need to install MythTV on
the virtual machine.
When I do major upgrades, I always use clonezilla to make an image
backup of my system before doing the upgrade. That way I can always
go back to the old version if anything goes wrong. And I shut down
mythbackend and do a manual run of mythconverg_backup.pl before I do
the clonezilla backup.
More information about the mythtv-users