mythconverg_restore.pl Restores Database But Not For mythtv-setup

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
User avatar
webwarriortx
Junior
Posts: 15
Joined: Fri Aug 10, 2018 5:10 am
United States of America

mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by webwarriortx » Tue Oct 22, 2019 6:22 am

I have a strange problem. mythconverg_backup.pl and mythconverg_restore.pl both appear to work correctly, that is I can backup mythconverg from a defunct system and restore it on my new system. When I browse the tables directly on mariaDB, I see all the tables and appropriate data, such as tuner cards, sources, and channel lineup, etc. It's all there!

I used the appropriate form of the restore script that should have provided a fool proof way of restoring:

Code: Select all

mythconverg_restore.pl --verbose --drop_database --create_database --directory . --filename mythconverg-1348-20191012211400.sql.gz
But when I run mythtv-setup, nothing is set up! None of my restored database can be found there. I have to start from the beginning which defeats the purpose of having a backup. The data is there but mythtv-setup just won't load it!

Any ideas? Why isn't mythtv-setup reading the restored mythconverg database?
Really weird! Thank you for any help in advance.

MikeB2013
Senior
Posts: 426
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by MikeB2013 » Tue Oct 22, 2019 7:14 am

Is the Hostname on your new system exactly the same as the defunct system ?

If not check the section "Change the hostname of a MythTV frontend or backend" at https://www.mythtv.org/wiki/Database_Ba ... or_backend


Mike

User avatar
webwarriortx
Junior
Posts: 15
Joined: Fri Aug 10, 2018 5:10 am
United States of America

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by webwarriortx » Tue Oct 22, 2019 8:19 am

Thank you for the for the advice. Sure enough, the OS has a different host name. Like I said before, I have direct access to the mythconverg database so I can search for the correct field and update it with the correct host name. Will try that tomorrow. Again, Thanks

User avatar
webwarriortx
Junior
Posts: 15
Joined: Fri Aug 10, 2018 5:10 am
United States of America

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by webwarriortx » Fri Oct 25, 2019 4:21 am

Hi MikeB2013,
I tried to follow your advice but it didn't work. Turns out something else is going on. I deleted all the tables for mythconverg and ran mythtv-setup for a fresh install and that also failed, so my problem apparently has nothing to do with exporting or importing the database. I did a full fresh install and rebooted the computer and it still failed with a message, "Attempting to connect to master back end." followed by a failure of, "Unable to connect to master back end." As usual, I disabled all software firewall software because I am behind a NAT and don't need the hassle.

I have tried to resolve the hostname issue using the following command but still not working:

Code: Select all

sed -i 's/old-text/new-text/g' input.sql
This is frustrating because I am able to connect to MariaDB with two usernames:
'mythtv'@'localhost' and 'mythtv'@'%' with the same default password of "mythtv" yet the frontend can't seem to connect to the backend database on "localhost" or via my tablet. Both 'mythtv'@'localhost' and 'mythtv'@'%' have full privilages over mythconverg but it just doesn't work, the backend just refuses to start! So it turns out to have nothing to do with my sql file, but mythtv just doesn't want to work on CentOS 7 or the latest version of Ubuntu. I can't figure it out and Christmas movies are coming soon that I want to record OTA and Spectrum cable only allows me to record up to two channels at once

Frustrating !!! I have a beautiful antenna on my roof with 6 network tuners that can provide up to 18 digital streams for recording or watching, pointing directly to TV towers on nearby mountains that I can actually see with my eye. My hardrives burnt out so I have to start all over again, but at least I have db backups that I can't use because mythTV doesn't work even as a fresh install. Ignoring the backup and starting fresh still fails. What is going on?!

MikeB2013 do you have any more suggestions? Or anyone else, help?

Thanks in advance

MikeB2013
Senior
Posts: 426
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by MikeB2013 » Fri Oct 25, 2019 7:14 am

Cannot help with CentOS 7, but I can help with Ubuntu.

There is an issue on Ubuntu based systems, includes Debian and possibly others in that the "mythtv" user is not correctly added to the operating system plus issues with stopping and starting mythbackend, see post viewtopic.php?f=36&t=3114#p15073 for a solution which installs current version of MythTV 30

The version of Ubuntu I and others use is Xubuntu 18.04 LTS, although you can use any of 18.04 flavours. The LTS versions are preferred over say the latest which is Ubuntu 19.10, purely because of the possible hassle of upgrading every 9 months or so for the non LTS versions.

Note that Ubuntu 18.04 default install for MythTV pulls in mysql rather than mariadb. MythTV install will use mariadb if you install mariadb before installing MythTV (sudo apt install mariadb-server).

Edit:
Forgot to mention:
After installing mythtv you can then restore your old database, just make sure mythbackend is not running (sudo systemctl stop mythtv-backend)

Mike

User avatar
webwarriortx
Junior
Posts: 15
Joined: Fri Aug 10, 2018 5:10 am
United States of America

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by webwarriortx » Fri Oct 25, 2019 7:51 pm

Thank you Mike ... will try that.

User avatar
webwarriortx
Junior
Posts: 15
Joined: Fri Aug 10, 2018 5:10 am
United States of America

Re: mythconverg_restore.pl Restores Database But Not For mythtv-setup

Post by webwarriortx » Mon Oct 28, 2019 11:43 pm

Ok Mike,
I resolved the problem but I don't really know how I did it! For anyone who needs help with this issue, I share what happened.

I once again ran mythconverg_restore.pl then ran mythtv-setup and wrote down all the information displayed by the mythtv-setup GUI. Every time I backed out of a settings page, I got a dialog asking about saving settings and I clicked on save. After writing down everything and confirming that I wanted to save changes, the server came up on its own! I was very surprised because I intended to drop mythconverg and redo it from scratch based on what I wrote down.

So ooops, I guess that is the solution!

Post Reply