Page 1 of 1

Completely removing MythTV 0.28 from MacPorts build

Posted: Wed Nov 15, 2017 12:32 am
by tvdave
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

Re: Completely removing MythTV 0.28 from MacPorts build

Posted: Wed Nov 15, 2017 2:28 am
by pvr4me
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

Re: Completely removing MythTV 0.28 from MacPorts build

Posted: Wed Nov 15, 2017 5:04 am
by tvdave
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

Re: Completely removing MythTV 0.28 from MacPorts build

Posted: Wed Nov 15, 2017 1:21 pm
by pvr4me
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

Re: Completely removing MythTV 0.28 from MacPorts build

Posted: Tue Dec 26, 2017 10:17 am
by tvdave
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.

Re: Completely removing MythTV 0.28 from MacPorts build

Posted: Tue Dec 26, 2017 2:01 pm
by pvr4me
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