[mythtv] Upgrade database from command line

Thomas Mashos thomas at mashos.com
Sat Sep 6 05:27:17 UTC 2014


On Fri, Sep 5, 2014 at 6:52 PM, Grant Gardner <grant at lastweekend.com.au> wrote:
> On 5 September 2014 08:10, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
>> On 5 September 2014 01:08, Thomas Mashos <thomas at mashos.com> wrote:
>>
>>> IIRC, patches are always welcome. If you do decide to do this, can you
>>> somehow incorporate a "default db settings" file or something? I'm
>>> working on some packaging issues that we discussed in #mythtv
>>> regarding our (Mythbuntu) default DB, but I really need a way to set
>>> some defaults in the DB (eg. theme, storage group location, etc) and
>>> I'm not finding a non-hacky way to do that.
>>
>> It would be awesome to have a small utility, that can be packaged
>> outside of mythtv so people can easily upgrade from an old version of
>> myth (0.21 and earlier) to 0.24 DB schema, and then 0.27 without
>> having to install a whole system like what is currently being
>> discussed in the mythtv user mailing list
>>
>
> Docker could help with this too.
>
> Create Docker images with mythbackend patched for --bootstrap for
> every step version of mythtv required in the upgrade path.  These are
> stored in docker hub so accessible for everyone (with an lxc or
> libcontainer capable kernel).
>
> Starting with a mysql dump from  0.21 ...
>
> * Starts docker container from mythtv-upgrade-0.21, which
> (automatically) restores from the supplied dump and runs mythbackend
> --bootstrap, runs mysqldump
> * Starts docker container from mythtv-upgrade-0-24, restores from the
> previous dump, runs mythbackend --bootstrap,  runs mysqldump
> * Starts docker container from mythtv-upgrade-0.27, restores from the
> backup, runs mythbackend --bootstrap, runs mysqldump
>
> End up with a mysql dump from 0.27 and away you go.
>
> This assumes MythTV upgrades can be done only on the database without
> caring about the non-existence of the actual recording files etc.
>
> It would pull a few Gb of docker images which may take 10s of minutes,
> while the upgrades themselves will take seconds, but who cares. Its
> all cleaned up and discarded afterwards, and completely independent of
> the host operating system.
>
> If you were really keen you put a service up on one of the cloud
> providers that implements the above in a user accessible way, and
> removes all issues with the user's hardware/OS.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

It seems unnecessary to make the user download a few GB just to upgrade the DB.

Thanks,

Thomas Mashos


More information about the mythtv-dev mailing list