[deepamehta-users] Backup from 4.0.6 and 4.0.7

Jörg Richter jri at deepamehta.de
Fr Jan 20 18:03:52 CET 2012


Hi Asif,

no, without further effort you can't use the 4.0.6 content in 4.0.7.
(DM4 is still considered "unstable" and not ready for production.)

However, you can migrate your content manually by executing the following steps (you'll need a terminal and the curl tool). After migration your content is available in 4.0.7 exactly as created in 4.0.6:


1) Stop all DeepaMehta instances.

2) Copy the deepamehta-db folder from "deepamehta-4.0.6" to "deepamehta-4.0.7"

3) Start DM 4.0.7

4) Your topicmaps do NOT appear and the browser's JavaScipt console shows 2 errors:
   => UnknownCanvasRendererError: canvas renderer "undefined" is not registered
   => GET http://localhost:8080/images/bucket.png 404 (Not Found)
If more than these 2 or other errors appear clean the browser's cache by pressing reload twice or by shift-reload.


Now go to a terminal. You'll need the curl tool to be installed.

5) Find the "Renderer URI" topics of each existing topicmap:
   curl localhost:8080/core/topic/by_type/dm4.topicmaps.topicmap_renderer_uri
Response:
   {"total_count":2,"items":[
   {"id":2569,"uri":"","value":"dm4.webclient.canvas_renderer","type_uri":"dm4.topicmaps.topicmap_renderer_uri","composite":{}},
   {"id":2396,"uri":"","value":"dm4.webclient.canvas_renderer","type_uri":"dm4.topicmaps.topicmap_renderer_uri","composite":{}}
   ]}
Here, 2 topicmaps are found with their "Renderer URI" topic IDs 2569 and 2396.

6) Change values of each "Renderer URI" topic:
   curl -X PUT -H Content-Type:application/json -d '{id: 2569, value: "dm4.webclient.topicmap_renderer"}' localhost:8080/core/topic
   curl -X PUT -H Content-Type:application/json -d '{id: 2396, value: "dm4.webclient.topicmap_renderer"}' localhost:8080/core/topic

7) Find out ID of toic type "dm4.topicmaps.topicmap_renderer_uri":
   curl localhost:8080/core/topic/by_value/uri/dm4.topicmaps.topicmap_renderer_uri
Response:
   {"id":1472,"uri":"dm4.topicmaps.topicmap_renderer_uri","value":"Topicmap Renderer URI","type_uri":"dm4.core.topic_type","composite":{}}
Here, the ID is 1472

8) Change URI and name of that topic type:
   curl -X PUT -H Content-Type:application/json -d '{id: 1472, uri: "dm4.topicmaps.canvas_renderer_uri", value: "Canvas Renderer URI"}' localhost:8080/core/topic


Now a 2nd issue:

9) Find out ID of the "Search" type's "dm4.webclient.icon" config topic:
   curl localhost:8080/core/topictype/dm4.webclient.search
Response:
{"id":518,"uri":"dm4.webclient.search","value":"Search","type_uri":"dm4.core.topic_type","composite":{},"data_type_uri":"dm4.core.composite","index_mode_uris":[],"assoc_defs":[{"id":523,"uri":"dm4.webclient.search_term","assoc_type_uri":"dm4.core.composition_def","whole_topic_type_uri":"dm4.webclient.search","part_topic_type_uri":"dm4.webclient.search_term","whole_role_type_uri":"dm4.core.whole","part_role_type_uri":"dm4.core.part","whole_cardinality_uri":"dm4.core.one","part_cardinality_uri":"dm4.core.one","view_config_topics":[]},{"id":533,"uri":"dm4.webclient.search_result","assoc_type_uri":"dm4.core.composition_def","whole_topic_type_uri":"dm4.webclient.search","part_topic_type_uri":"dm4.webclient.search_result","whole_role_type_uri":"dm4.core.whole","part_role_type_uri":"dm4.core.part","whole_cardinality_uri":"dm4.core.one","part_cardinality_uri":"dm4.core.one","view_config_topics":[]}],"label_config":[],"view_config_topics":[{"id":557,"uri":"","value":"\/images\/bucket.png","type_uri":"dm4.webclient.view_config","composite":{"dm4.webclient.icon":{"id":560,"uri":"","value":"\/images\/bucket.png","type_uri":"dm4.webclient.icon","composite":{}}}}]}

Here, the ID of the "dm4.webclient.icon" config topic is 560 (look from the end)

10) Change the value of that config topic:
   curl -X PUT -H Content-Type:application/json -d '{id: 560, value: "/images/balls.png"}' localhost:8080/core/topic

You're done.


11) Restart DeepaMehta 4.0.7
   That is, stop the DM server by Ctrl-C and then run the usual DM start script.

Now, all your topicmaps and contents should be available exactly as created by DM 4.0.6


Cheers,
Jörg



On Jan 20, 2012, at 5:44, Asif M wrote:

> Hi ,
> 
> Is backup from 4.0.6 and import to 4.0.7 supported?
> 
> By backup I mean does 4.0.7 support the datamodel of 4.0.6 - if i just copy the database folder will it work?
> 
> Regards,
> Asif
> _______________________________________________
> deepamehta-users mailing list
> deepamehta-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/deepamehta-users




Mehr Informationen über die Mailingliste users