[mythtv-users] I just want to transfer old recordings to new backend

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Jul 15 12:57:22 UTC 2019


On Mon, 15 Jul 2019 21:25:56 +1200, you wrote:

>Hi,
>
>Current system is 0.25 and has been running since about this time in 2011 – so 8 years. Hardware has changed a couple of times and now runs in a VM. Crashed completely and reverted to backups a few times and corrupted tables quite a few times. It done it’s dash 
.
>
>So moving to something that will hopefully be more appliance in nature once I am finished. I want to build a clean system with a clean DB on an O/S with a long shelf life, thus CentOS 7. But I want to keep all the important stuff, all my many Dr Who, Star Trek, Bond stuff along with a bunch of movies.
>
>Done quite a bit of searching and everything seems to say don't just copy tables, it ain't worth it - just try to get your old DB up enough to upgrade. Nah, not my first choice I want a clean DB not one cluttered with rubbish and half recovered tables.
>
>As a test I tried copying a row from the "recorded" table from the old backend to the new one and it worked fine - so this would be the plan, copy the rows from this table from old to new backend. I know I will miss out on stuff like "recordedprogram" and "recordedfile", but I see those as an occasional annoyance not a major. I suspect I need to something about "recorded seek" - not sure but thinking of some script to rebuild this using mythcommflag, maybe ?
>
>I probably have around 600 recordings, so not huge by some peoples standards, but a few.
>
>So any advice, tips or tricks will be appreciated but mostly interested if anything catastrophic is likely happen, like recordings mysteriously disappearing or getting deleted in 6 months.
>
>Also just want to thank people who responded to my earlier questions, I do appreciate the effort.
>
>Thanks again
>
>Tony P

You are in luck, as I have just been developing the software to do
this sort of thing, based on the current mythexport/mythimport.  Or
maybe mythexport/mythimport will do what you want.  Mythexport creates
a web page where you tell it the directory to export to and list of
all your recordings.  You select each recording to be exported, and it
creates a .sql file for it in the export directory and copies the
recording file over to the export directory.  You can have the export
directory be a network connection to the box you want to import the
recordings to, or say an external hard drive you can attach to that
box.  On the import end, you run mythimport and it will read the .sql
files and import each recording's data, and move the recording file to
a storage group directory so MythTV can see it.

The software I have been developing is for moving huge numbers of
recordings between MythTV boxes, typically all the recordings from one
hard drive of the exporting box being exported at once.  It works by
having the recording files for all the recordings you want to export
in one directory on the exporting box.  The software loops through all
the recording files and creates a .sql file for each.  Then it is run
again with different options and will export all of those recordings
over a network connection to the importing box.  Both boxes can be
running in normal use making and playing back recordings, and the
software will detect MythTV activity on either box and pause the
exporting process until the activity goes away.

The big problem you have is that you are running 0.25.  The current
versions of all of this software supports 0.28 and above, as the
database tables for the recordings have not changed in those versions.
I think that 0.27 may also be compatible with the export process, but
I am not exactly sure when the recordings tables were last altered.

The usual way to get around problems like that is to upgrade the
MythTV version.  That can be done using a new VM, and then you set up
the new VM so that its storage groups point to the old recordings, and
do the export from the new VM.  But if you wanted the old system to go
on doing recordings at the same time, it would probably take a little
more effort on my part to make it possible to do that.

Before you start down any of these paths, to export recordings, these
tables are needed:

recorded
recordedseek
recordedrating
recordedmarkup
recordedcredits
recordedprogram

If any of them are corrupt, then that would need to be fixed before
exporting is likely to work.

And when you have exported all the recordings, you will have lost all
the knowledge the old system has about what you have recorded before.
So it will record all the repeats and things you have watched long
ago, should they be broadcast again.  Since that is one of the great
things that MythTV does for you and other recording software usually
does not, you may really want to in fact upgrade your old database to
keep all of that data.


More information about the mythtv-users mailing list