[mythtv-users] How to dump BE and FE settings?

Jerome Yuzyk jerome at supernet.ab.ca
Sat Jan 4 19:08:48 UTC 2020


On Thursday, January 2, 2020 9:33:32 PM MST Bill Meek wrote:
> On 1/2/20 8:53 PM, Jerome Yuzyk wrote:
> > Having just recovered my FE/BE, which included an OS upgrade and MythTV
> > 
> > upgrade, I wonder:
> >    Is there any way to dump BE and FE settings to review them?
> > 
> > Any pointers to a script or how to make one?
> 
> Easier to just do it with SQL, but this works:
> 
> #!/usr/bin/python2
> ''' Sample that gets all settings '''
> 
> from __future__ import print_function
> import json
> from MythTV.services_api import send as api
> 
> BACKEND = api.Send(host='localhost')
> 
> RESPONSE = BACKEND.send(endpoint='Myth/GetSettingList')
> print(json.dumps(RESPONSE, indent=4, sort_keys=True, separators=(',', ':
> ')))
> 
> RESPONSE = BACKEND.send(endpoint='Myth/GetHosts')
> HOSTS_LIST = RESPONSE['StringList']
> 
> for host in HOSTS_LIST:
>      RESPONSE = BACKEND.send(endpoint='Myth/GetSettingList',
> rest='HostName={}' .format(host))
>      print(json.dumps(RESPONSE, indent=4, sort_keys=True,
>                       separators=(',', ': ')))

Thanks. I can tinker with that.

To Stephen's comment: I thought of this while I was changing things to get my 
box working again, to answer questions like "What is my setting for that thing 
I'm reading about while Googling?" The ability to snapshot and then diff would 
be a bonus to snap-shotting.

-- 
A little of Jerome's MythTV World: http://mythtv.bss.ab.ca




More information about the mythtv-users mailing list