[mythtv-users] Migration of recordings database to different / newer system
wdormann at gmail.com
Sun Jan 2 01:59:52 UTC 2011
On 12/31/10 7:14 PM, Michael T. Dean wrote:
> You want to do a full restore of your old database to your new system (
> ). In the event that the new system has a new host name, you must then
> immediately after restoring the database--and /definitely/ before
> starting any MythTV program on the new system.
Ok, i was able to get this technique to work. I exported the database
from the old machine using mythconverg_backup.pl and imported on the new
machine using mythconverg_restore.pl --drop_database --create_database
At this point, mythbackend attempts to update the database schema, but
2011-01-01 15:56:55.830 Database corruption detected. Unable to proceed
with database upgrade. (Table: people, Warnings: 8)
2011-01-01 15:56:55.904 Your database must be fixed before you can
upgrade beyond 0.21-fixes. Please see
information on fixing your database.
The database that I've got is over 7 years old and has gone through a
number of different operating system versions and mysql configurations,
so I couldn't really say if the instructions on the mythtv wiki would
have fixed it. The "applying the procedure outlined below will further
corrupt your database" statement scared me a bit, so I did a manual fix.
The number of warnings was reasonable to just fix manually. If it
were a large number, it wouldn't really scale well.
1) Run mythbackend -v database (to report all database operations)
2) Look at the SQL commands that lead up to the error
3) Execute the commands manually using the mysql client
4) When I got the 8 warnings, I could run: SHOW WARNINGS;
and it would indicate the row numbers of the offending entries
5) Rename each name value to an ASCII value. The mysql row numbers
aren't the same as the person number, but they seem to be within 5 or so.
This allowed the database schema to update properly. I re-ran
mythbackend setup to configure the backend capture devices and set the
master backend value to 127.0.0.1, as it seems to have defaulted to the
IP address of my old mythtv box.
For some reason at this point, mythfrontend would just exit when
attempting to update the mythvideo schema, with this in the log:
ICE default IO error handler doing an exit(), pid = 1845, errno = 32
I deleted ~/.ICEAuthority and then rather than exiting, it would prompt
me whether I wanted to update the mythvideo schema. I was able to
proceed through that fine.
At this point, the database is updated, and it has my old recordings in
it. All I needed to do was to reconfigure the other settings in the
frontend setup that are different than my old box. (e.g. vdpau vs. xv
for playback, etc.)
Things seem to be working fine now, as far as I can tell.
> There is no concept of "migrating" recordings or databases in
> MythTV--that's just a "myth" propogated by Google's leaving a bad,
> outdated (and wrong) link as #1 result for the search "migrate mythtv
Yeah, that's exactly how I found that page.
More information about the mythtv-users