[EP-tech] Migrating data from 3.2 to 3.3

M.D.Mcfarlane at lse.ac.uk M.D.Mcfarlane at lse.ac.uk
Tue Mar 13 17:06:51 GMT 2012


Hi All,

We're attempting to migrate (web_import) from a 3.2.5 instance to 3.3.8
instance of eprints.

We have a couple of issues - one is trying to migrate items which are
not publicly available - Tim has made a suggestion about this and we
will look at this in due course. The other is a bit more tricky -when we
try to import the whole repository some items that have documents
attached do not import. They fail with the following error:

Failed to create subdataobj on eprint.documents at
/usr/share/eprints3/bin/../perl_lib/EPrints/DataSet.pm line 1009

We tracked this down to the following sql:

Database execute debug: INSERT INTO `document` (`docid`) VALUES (?)

It seems that documents in 3.3 need more docids. In 3.2 we have a
document with the following:

+-------+----------+-----------------+----------------------------------
----------------------------------------+
| docid | eprintid | format          | formatdesc
|
+-------+----------+-----------------+----------------------------------
----------------------------------------+
| 16221 |    27861 | application/pdf | NULL
|
| 16222 |    27861 | image/jpeg      | Thumbnail Documents conversion
from application/pdf to thumbnail_preview |
| 16223 |    27861 | indexcodes      | Generate index codes conversion
from application/pdf to indexcodes       |
+-------+----------+-----------------+----------------------------------
----------------------------------------+

Whereas in 3.3 there is extra docs:

+-------+----------+-----------------+----------------------------------
----------------------------------+
| docid | eprintid | format          | formatdesc
|
+-------+----------+-----------------+----------------------------------
----------------------------------+
| 16221 |    27861 | application/pdf | NULL
|
| 16222 |    27861 | other           | Thumbnails conversion from
application/pdf to thumbnail_lightbox   |
| 16223 |    27861 | other           | Thumbnails conversion from
application/pdf to thumbnail_preview    |
| 16224 |    27861 | other           | Thumbnails conversion from
application/pdf to thumbnail_medium     |
| 16225 |    27861 | other           | Thumbnails conversion from
application/pdf to thumbnail_small      |
| 16226 |    27861 | other           | Generate index codes conversion
from application/pdf to indexcodes |
+-------+----------+-----------------+----------------------------------
----------------------------------+

 So documents are failing because they are duplicates.

Is there a simple way around this for importing records from a 3.2
repository into a 3.3? Also is there a best practice for the migrating
and upgrading instead of upgrading the live repo? 

Cheers

Mike

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer



More information about the Eprints-tech mailing list