[mythtvnz] Mythbuntu 16.04 user experiences
Stephen Worthington
stephen_agent at jsw.gen.nz
Thu Jul 21 08:29:58 BST 2016
On Thu, 21 Jul 2016 18:35:02 +1200, you wrote:
>> On 21/07/2016, at 5:37 PM, Robert Fisher <robert at fisher.net.nz> wrote:
>>
>> No I do not think that is what I need.
>> The old recordings are still in the location where the new ones are going.
>> MythTV and MythWeb only show the new recordings so I was wondering if there is a way for MythTV to recognise the old ones.
>>
>
>That will identify the files that are not in your recordings list. Useful as part of the cleanup.
>
>I believe the recommended process is to add these orphaned files to MythVideo. You wont have any metadata or the ability to delete them once watched, but you will be able to watch them.
>
>You could restore the database from one of the backups? I know I have mysql backups of mythconverg in one of my recordings storage groups, so maybe you do too and they survived your upgrade.
>
> - Wade
If you still have a backup database with all the old recordings in it,
it is possible to get that data exported to the new system. What you
have to do is install a virtual machine somewhere that is running the
same MythTV version as the old backup database. Then you restore the
old database on that virtual machine, and upgrade the version of
MythTV to match the version on your real MythTV system. Then you
install mythexport and use its On The Go web page to mark all the old
recordings in the database that you still have the files for to be
exported. When it starts an export job, mythexport first stores a
.sql file to the export directory that contains all the data for the
recordings being exported. Then it copies all the recording files to
that directory. But I believe that if the recording files do not
exist (as they will not on the virtual machine), it will still create
the .sql file correctly. So once it has done that, copy the .sql file
to the real MythTV system, and install the mythimport package there,
and then run mythimport on it. All the data in the .sql file will be
imported into your database, and will then automatically match up with
the old recording files.
If your old database does not quite match all the old recording files
you have, you can still do this process, and then manually deal with
the mismatched files. There will be some files still without matching
database entries - find_orphans.py will tell you what the files are.
Those files will need to be moved to a videos directory. Then you
have to manually play each file, and rename it to whatever programme
it contains. For database entries that have no matching file,
find_orphans.py will automatically delete the database entries for you
if you tell it to.
When doing such a large mythimport run, it is possible to have a
problem with the import process, so it can stop in the middle with an
error such as one recording that is in the old database is somehow
matching one already in the new database. If that happens, you can go
back to mythexport and not mark that recording to be exported and try
again. But for that to work, you need all the recordings in the new
database that have already been imported by mythimport to be removed.
The only safe way I know of to do that is to backup the new database
before starting the mythimport run, and doing the mythimport run at a
time when there will be no recordings on the box for long enough for
mythimport to complete successfully, or for it to fail and then for
you to restore the backup database before the next recording.
Having backed up and restored databases many times, I can tell you
that if you follow the instructions, that process is very reliable so
there is no worry about having to do it should there be a problem with
importing the old database. I have also used mythexport and
mythimport extensively, but only so far on MythTV up to 0.27 - I have
not tried it on 0.28 yet.
More information about the mythtvnz
mailing list