[Archivesspace_Users_Group] Transfer/export to another repository on another server ?
Steven Majewski
sdm7g at virginia.edu
Mon Sep 22 12:39:39 EDT 2014
On Sep 22, 2014, at 10:20 AM, Nathan Stevens <ns96 at nyu.edu> wrote:
> Copying resource records from one ASpace instance to an other, using JSON
> could be problematic. Those JSON resource records may have links to related records (Subjects, Agents, Accessions, Locations, Digital Objects) which won't be valid on the other ASpace instance. Is this situation, you would either get an error, or the record would transfer, but it would be link to the wrong set related records.
>
That’s what I was afraid of. :-(
> The solution for this problem is very challenging, and I think the safest way to do this for now is by using EAD import/export once the importers are improved in the next ASpace release.
>
>
My understanding, so far:
GET/POST repositories/:repo/resources/:id returns or takes a JSONModel(:resource)
POST /repositories/:repo_id/batch_imports takes a JSON array of, in the example I’ve dumped,
jsonmodel_type:resource and several jsonmodel_type:archival_object
and possibly other types as well.
These nodes are linked by temporary URIs like, for example:
"uri" : "/repositories/import/archival_objects/import_9155986b-6520-45cc-ba43-d06e29d925e4",
"resource" : {
"ref" : "/repositories/import/resources/import_d04f091f-9611-4128-bb9c-91d7c4843db1"
},
I assume those URI’s have to match up like id/idref’s and that the batch import creates those temporary URIs
and then converts them to the permanent ids.
It would be nice if there were a matching API call to output the entire resource tree in that format.
I saw that there was a: GET /repositories/:repo_id/resources/:id/tree in the API, which I hoped would do that.
It appears to return the tree of archival_objects attached to the resource, but in a different format: it appears
to be a single resource tree with embedded child nodes. ( I don’t yet know if those child nodes are complete,
or if they just represent the structure and require additional API GET calls to retrieve the children. )
So, it would appear that I need either an external program to convert the output of a GET…/tree into the
input of a POST…/batch_imports, or else add the missing API methods to the backend.
Although the fact that those API methods are missing makes me think there are even more complications
that aren’t yet obvious to me.
— Steve Majewski / UVA Alderman Library
[ P.S. Is the an ETA for the next AS release ? ]
>
> On Fri, Sep 12, 2014 at 4:24 PM, Steven Majewski <sdm7g at virginia.edu> wrote:
>
> I know I can transfer a resource from one repository to another on the same server.
> I there a way to easily move a resource from one ArchivesSpace server instance to another ?
>
> I know I can export to EAD and reload that again, but we’ve been having enough problems with
> EAD import and export that I’ld rather not do it this way.
>
> I tried what I thought was the obvious API method:
>
>
> ./curl_as_osx admin [pwd] -O http://archives-test.lib.virginia.edu:8089/repositories/9/resources/3964
>
> ./curl_as_osx admin [pwd] -d @3964 http://localhost:8089/repositories/2/batch_imports
>
> But I get this error:
>
> [
> {"status":[{"id":1,"label":"Reading JSON records","type":"started"},{"id":1,"label":"Reading JSON records","type":"done"},{"id":2,"label":"Validating records and checking links","type":"started"}]},
> {"saved":[],"errors":["Server error: Can not deserialize instance of java.util.LinkedHashMap out of VALUE_STRING token\n at [Source: java.io.FileReader at 51d866d9; line: 1, column: 1]"]}
>
> ]
>
>
> Is that something that should theoretically work ? Or am I trying to feed it the wrong JSON schema ?
>
> I only want to move selected records, so a database dump is not a simple way to do it either.
>
> Are there any other migration tools to help with this problem ?
>
>
>
>
> — Steve Majewski / UVA Alderman Library
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
>
>
> --
> Nathan Stevens
> Programmer/Analyst
> Digital Library Technology Services
> New York University
>
> 1212-998-2653
> ns96 at nyu.edu
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140922/62642242/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4943 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140922/62642242/attachment.bin>
More information about the Archivesspace_Users_Group
mailing list