Completely removing MythTV 0.28 from MacPorts build

For discussion of topics specific to MythTV on OSX
Post Reply
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Completely removing MythTV 0.28 from MacPorts build

Post by tvdave » Wed Nov 15, 2017 12:32 am

Is there a way to completely remove MythTV 0.28 including the database, Maria DB software and all support files?

My build became completely corrupt over time and as a result the upgrade to 0.29 is failing spectacularly! I have save the recordings I want and am happy to start from scratch.

The other option is to wipe the Mac and reinstall OSX baremetal but that seems overkill.

Thanks

User avatar
pvr4me
Senior
Posts: 641
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Completely removing MythTV 0.28 from MacPorts build

Post by pvr4me » Wed Nov 15, 2017 2:28 am

I believe you installed from the all-in-one dmg installer, no? Are you sure you don't want to back up your database first? If so,

1) If you are running MythWeb, stop the web server:

Code: Select all

sudo launchctl unload /Library/LaunchDaemons/org.macports.apache2.plist
2) Stop mythbackend with Myth_Stop_Start

3) Stop the database server:

Code: Select all

sudo launchctl unload /Library/LaunchDaemons/org.macports.mariadb-server.plist
3) Delete everything under /opt/dvr

4) Delete /Applications/MacPorts/MythTV

Craig
The MacPorts guy.

tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Completely removing MythTV 0.28 from MacPorts build

Post by tvdave » Wed Nov 15, 2017 5:04 am

Thanks Craig,

I have used the all in one installer (thanks I couldn't have done it without you :D )

The reason I to start from scratch is because the database is incredibly corrupt - so I definitely do not want to back it up. It is has lost over 400Gb of files (files on the hard disk that the backend has lost track of) and when I tried upgrading to 0.29 from the installer it failed to come up.

The backend is unstable - slow to start and resume (probably because the database is corrupt).

Better to start again.

Dave

User avatar
pvr4me
Senior
Posts: 641
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Completely removing MythTV 0.28 from MacPorts build

Post by pvr4me » Wed Nov 15, 2017 1:21 pm

If you are OK with starting from scratch again, that might be the simplest route.

Note, however, that there is a script that might help with the database problems. The docs do say that the database should be optimized periodically:

https://www.mythtv.org/wiki/User_Manual ... e_Database

On your version the script should be at:

Code: Select all

/opt/dvr/share/mythtv/contrib/optimize_mythdb.pl
Craig
The MacPorts guy.

tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Completely removing MythTV 0.28 from MacPorts build

Post by tvdave » Tue Dec 26, 2017 10:17 am

Hi Craig,

I have tried what you have suggested and optimised the database. I have also manually cleared out the directories and found that MythTV actually lost track of the directories. This would explain what is going wrong.

So far so good.

User avatar
pvr4me
Senior
Posts: 641
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Completely removing MythTV 0.28 from MacPorts build

Post by pvr4me » Tue Dec 26, 2017 2:01 pm

If anything in the path to the storage directories changes, then Myth will no longer be able to find them. However, if you supply the new path via mythtv-setup, Myth will resume normal operations. Remember that the path should not have any spaces in it anywhere. ("Big Disk" is bad; "Big_Disk" is OK.)

When you say you "manually cleared out the directories" do you mean you deleted the 400GB of 'lost' recordings? If so, that would be too bad since they likely could be reunited with their metadata by fixing the path.

If you did delete the recordings, you probably want to run the find_orphans.py script:

https://www.mythtv.org/wiki/Find_orphans.py

I can't remember right now if I supply a copy of it with the all-in-one installer or not. If I did, it should be at '/opt/dvr/share/mythtv/contrib/find_orphans.py'.

If not, use the version from the wiki but change the first line from

{{{#!/usr/bin/env python2
}}}

to
{{{#!/opt/local/bin/python2.7
}}}

Craig
The MacPorts guy.

Post Reply