Error Moving Database to New Host

For discussion of topics specific to MythTV on linux
Post Reply
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Error Moving Database to New Host

Post by kbocek »

I'm moving the database from an old host to a new one running Ubuntu 18.04 and MariaDB 10.1. I did a mysqldump of mythconverg on the old host then excuted:

Code: Select all

pv mythconverg-1346-20200728.sql | mysql -h myth.pvt -u mythtv -p mythconverg
Then I edited config.xml on the frontend to point to myth.pvt and rebooted. But LiveTV fails with:

Code: Select all

Jul 28 11:29:37 pebble mythfrontend.real: mythfrontend[1287]: I CoreContext tv_play.cpp:2277 (HandleStateChange) TV::HandleStateChange(): Attempting to change from None to WatchingLiveTV
Jul 28 11:29:37 pebble mythfrontend.real: mythfrontend[1287]: I CoreContext mythcorecontext.cpp:448 (ConnectCommandSocket) MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 10.0.2.2:6543 (try 1 of 1)
Jul 28 11:29:38 pebble mythfrontend.real: mythfrontend[1287]: E CoreContext livetvchain.cpp:282 (GetEntryAt) GetEntryAt(-1) failed.
Jul 28 11:29:38 pebble mythfrontend.real: mythfrontend[1287]: E CoreContext livetvchain.cpp:289 (GetEntryAt) It appears that your backend may be misconfigured.  Check your backend logs to determine whether your inputs, lineups, channels, or storage configuration are reporting errors.  This issue is commonly caused by failing to complete all setup steps properly.  You may wish to review the documentation for mythtv-setup.
Playing back existing recordings works fine. Just LiveTV. Does anyone have any ideas?
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Error Moving Database to New Host

Post by kbocek »

So, I need to edit /home/mythtv/.mythtv/config.xml on *both* the frontend and the backend. I missed that.

But doing that on the backend causes the backend to fail. I'm missing something here.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Error Moving Database to New Host

Post by kbocek »

I still need some help with this. I've copied mythconverg to the new database host. I stopped mythtv-backend. I edited /etc/mythtv/config.xml. But mythtv-backend refuses to start:

Code: Select all

Aug 03 10:07:32 myth systemd[1]: mythtv-backend.service: Start request repeated too quickly.
Aug 03 10:07:32 myth systemd[1]: mythtv-backend.service: Failed with result 'exit-code'.
Aug 03 10:07:32 myth systemd[1]: Failed to start MythTV Backend.
I've tried "systemctl daemon-reload" as well. When I reset config.xml to the old database host everything runs fine.

What am I doing wrong?
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Error Moving Database to New Host

Post by bill6502 »

"Copying" mythconverg isn't supported or recommended. But the initial post here
says a backup was restored. That's good. Ref:
https://www.mythtv.org/wiki/Database_Backup_and_Restore

Review or pastebin/attach the full backend log. /var/log/mythtv/mythbackend.log .
That will have a line like this: Using configuration directory = /home/mythtv/.mythtv
and config.xml is underneath that. BUT, Ubuntu should have a link to the one in
~mythtv/config.xml to the one in /etc/mythtv. Ref:
https://www.mythtv.org/wiki/Config.xml

If that doesn't help, then let's see a copy of a copy of this command and it's output:
ls -ld /etc/mythtv/config.xml {~,~mythtv/.mythtv}/config.xml

"systemctl daemon-reload" isn't needed unless the mythtv-backend.service file
was changed. The proper way to create an override to an existing service it is
with sudo -E systemctl edit mythtv-backend

The -E will use the editor you normally use (from $EDITOR etc).

That should give you some ideas.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Error Moving Database to New Host

Post by kbocek »

So are you recommending I use mythconverg_[backup, restore] instead of trying to do it manually?

Looking at the list of files installed from PPA on Ubuntu 18.04 I do *not* see these scripts. Are they in another package?
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Error Moving Database to New Host

Post by kbocek »

Nevermind. I see there are direct download links on the wiki page.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Error Moving Database to New Host

Post by bill6502 »

Try: locate mythconverg_backup.pl
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Error Moving Database to New Host

Post by paulh »

The PPA installs them to /usr/share/mythtv/
Post Reply