[mythtv-users] Merging data from two mythbackend servers
gary.holmlund at gmail.com
Sat Sep 13 05:26:59 UTC 2008
Nick Morrott wrote:
> On 13/09/2008, Gary Holmlund <gary.holmlund at gmail.com> wrote:
>> I have had two independent mythbackend servers. I just built a new
>> computer with lots of disk space and I would like to move the recorded
>> files from the old servers to the new. The documentation has a great
>> procedure for moving data from one server to a new one.
>> This does not work for the second server's data because of duplication
>> of keys in the database. Specifically I get the following error:
>> ERROR 1062 (23000) at line 1: Duplicate entry '81' for key 1
>> Does anyone know of a procedure that would allow me to load the second
>> server's data onto the new server?
> It'll probably have to be a manual procedure. First task is to check
> the SQL backup file from the second server, and determine which table,
> and which entry has the value '81'. It's likely a recording rule with
> recordid=81. As recordid is the primary key (PK) in the record table,
> you can't have duplicates, hence the error.
> What I would do is check the tables you are trying to import, and see
> whether there are any other duplicates for the primary keys on the
> imported tables (you can check the structure from the mysql command
> line, or using a tool such as phpMyAdmin). You will also need to
> ensure that hostnames are corrected for the new host in the recorded
> table, so that the new installation can find all of the imported
> It's certainly possible, but you'll need to do some careful planning
> for the process to go smoothly.
Yes, it is the recorded table. I suppose there could be more
errors in other tables if I get that one loading.
So, is the requirement for recordid only to be unique? If I
could add 10,000 to the recordid's on the data I am loading,
would that be a reasonable approach to getting the data loaded?
2600 is the highest recordid on the new backend.
More information about the mythtv-users