[mythtv-users] Help,
database corrupted after connecting with a newer frontend
myth at ultratux.org
myth at ultratux.org
Sat Apr 2 20:45:47 UTC 2005
On Saturday 02 April 2005 22:16, Donavan Stanley wrote:
> On Apr 2, 2005 3:07 PM, myth at ultratux.org <myth at ultratux.org> wrote:
> > I -stupidly in hindsight- connected to my mythtv backend version 0.14
> > with a frontend 0.16. It didn't work, it complained about different
> > versions.
>
> Would have been stupidly in foresight with a little homework...
Yeah... You know how it is though...
> > Alas, to my amazement that single act fucked up the backend database.
>
> The term you are looking for is "upgraded" not fucked up. New
> versions often call for database changes, so the database structure
> gets changed. Nothing is gone, it's just in a different layout than
> what your .14 backend wants it in.
Yes I know that. I called it fscked-up because nothing works with my current
backend. I did not expect a frontend to do a DB update. Clients do not
usually DO that, you know.
> > Is there a way to repair this? A rollback script? A howto do it manually?
>
> Restore your database from a backup or start running a .16 backend.
As I mentioned a restore is not feasible as I would lose 3 months worth of
programs easily equal to (or greater than) some 300 gigabytes of shows.
But I already started compiling 0.17 on my backend before you answered, I hope
it will compile and run fine without too many tricks & hacks.
> > (I'm not even daring to touch the subject of how in H*LL this can
> > happen... Either the backend disallows access to the incompatible
> > frontend, or it works with it, but corrupting it ?!? That's really bad.
> > Losing everything just by booting a different frontend, for gods sake...)
>
> It has nothing to do with backend vs frontend and everything to do
> with database schema versions between releases. You can't run in a
> mixed enviroment it's been repeated often on the mailing lists.
Uh-huh. However, it would seem prudent if some care had been taken in the
code so that only a BACKend would upgrade the DB, not some loose random
frontend that happens to connect. This is a major denial-of-service
vulnerability now.
(And apart from the ML, it should be in the docs too)
/* oops, we encounter a legacy database scheme... */
if $0 = "mythbackend" do
$(upgrade_database)
else
echo "I don't support this database scheme AND I'M JUST A FRONTEND. Exiting."
exit -255
fi
You get the point...
Greetings,
Mart
More information about the mythtv-users
mailing list