[mythtv-users] Cleaning up database
Michael T. Dean
mtdean at thirdcontact.com
Mon Oct 13 02:12:57 UTC 2014
On 10/12/2014 09:53 PM, Mike Carron wrote:
> On 10/12/2014 06:27 PM, Thomas Mashos wrote:
>> On Sun, Oct 12, 2014 at 4:55 PM, Mike Carron wrote:
>>> On 10/12/2014 03:41 PM, Mark Perkins wrote:
>>>>
>>>>> On 13 Oct 2014, at 7:49 am, "Mike Carron" wrote:
>>>>>
>>>>> Over multiple iterations of installing different FE configurations
>>>>> I have
>>>>> a lot of obsolete configuration data in the database. Is there a
>>>>> simple way
>>>>> of cleaning it out? I don't do MySQL and I don't trust myself to
>>>>> mess with
>>>>> the contents directly.
>>>>>
>>>> Short answer: no. Long answer: even directly manipulating the
>>>> database to
>>>> do this is strongly discouraged by the devs but if you really
>>>> really wanted
>>>> to someone can probably give you some mysql commands to run.
>>>> Recommend you
>>>> back up first.
>>>>
>>> I'm not going to directly manipulate the database. Backup idea: Is it
>>> possible to export recording rules from an existing database to a
>>> new one?
Yes, but it doesn't do anything useful.
>>> I
>>> don't mind creating a fresh database on a new MBE but I don't want
>>> to lose
>>> my recording rules, reconstructing them is a pain.
>>>
>> This might just sound crazy, but why the need to go clean up anything
>> in the DB? Is it hurting something?
>
> Maybe it's just feel-good. It's been my experience that obsolete
> content that's occupying space eventually causes a problem.
Each host's configuration takes up approximately 8kB of HDD space and
isn't used by anything other than that host (which, if you're no longer
using that host, means it's not used at all) and doesn't slow down any
of the things that are actually in use, so there's no real reason you
need to do any cleanup. MythTV automatically cleans up those things
that actually do need to be cleaned up (and the lack of need to clean up
old host configuration is why there is no way to do so).
However, if you really want your placebo:
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Partial_restore_of_a_backup
It's just a simple matter of creating a full backup of your database
(something you should be doing, regularly, anyway, so no additional work
there); then dropping your database; creating a brand new database in
MySQL (without breaking/messing up your mythtv
account/permissions/authentication); running mythtv-setup to create a
brand new, empty database schema; then exiting mythtv-setup; then doing
a partial restore; then starting mythtv-setup and reconfiguring your
master backend (making sure you get everything configured correctly);
then starting mythbackend; then starting mythfrontend and going into
settings and reconfiguring mythfrontend correctly; then reconfiguring
all your plugins correctly; then doing the same (configuring
mythbackend/mythfrontend/plugins) for all the other hosts in your MythTV
system. So, if you're certain that you can reconfigure your entire
system correctly, it's just a matter of spending some hours (8+?)
redoing all your configuration, then fixing all the things that aren't
quite right as you notice them over the next days/weeks/months of use.
IMHO, quite a risk for a process that has no tangible benefits.
Mike
More information about the mythtv-users
mailing list