-
Notifications
You must be signed in to change notification settings - Fork 0
Great Symbol Shift
Markus Sabadello edited this page Apr 24, 2015
·
11 revisions
This page describes how XDI graphs can be migrated through the "Great Symbol Shift" using xdi2-tools. For more information about this shift, see great-symbol-shift on the main XDI2 wiki.
The term "old XDI2" refers to an XDI2 server and/or graph that still uses the old symbols.
The term "new XDI2" refers to an XDI2 server and/or graph that uses the new symbols.
The following links are useful for this process:
- An instance of the "old XDI2" web tools: http://server.xdi2.org/pre-symbol-shift/
- An instance of the "new XDI2" web tools: http://server.xdi2.org/
- A snapshot of the "old XDI2" code base: https://github.com/projectdanube/xdi2/tree/snapshot-0.2-pre-symbol-shift
- The xdi2-tools: https://github.com/projectdanube/xdi2-tools
To convert a single graph, the following process should be used:
- Obtain a serialization of the "old XDI2" graph (either "XDI/JSON" or "XDI DISPLAY" format) in a text file or clipboard.
- For example, the graph can be copied out of an "old XDI2" admin web interface.
- Open the "old XDI2" XDI Converter tool: http://server.xdi2.org/pre-symbol-shift/XDIConverter
- Paste the graph into the tool
- As output format, select "XDI DISPLAY SHIFT", click Go.
- This returns the converted "new XDI2" graph.
- For example, the "new XDI2" graph can then be copied into a "new XDI2" admin web interface.
To convert all graphs known to an XDI2 server, the following process should be used:
- Deploy the xdi2-tools on the "old XDI2" server environment.
- xdi2-tools itself is agnostic to either "old XDI2" or "new XDI2", but make sure it is using the "old XDI2" core code base.
- Make sure xdi2-tools has access to the "old XDI2" server applicationContext.xml configuration file(s), as well as to all the XDI2 plugins used by the server (e.g. xdi2-mongodb, xdi2-connector-facebook, etc).
- Make sure xdi2-tools has access to the persistence layer (e.g. MongoDB).
- Launch xdi2-tools with the following parameters: backup-graphs mybackup.zip text/xdishift [path-to-applicationContext.xml]
- This should output the file mybackup.zip, containing serialized "new XDI2" graphs
- Look into the .zip file, make sure it contains the expected number of graphs, and open a few of them to see if they look good
- Stop the XDI2 server, and migrate the "old XDI2" server environment to "new XDI2".
- Manually clear the contents of the persistence layer (e.g. MongoDB).
- Launch xdi2-tools with the following parameters: restore-graphs mybackup.zip [path-to-applicationContext.xml]
- This should restore all graphs into the "new XDI2" server environment. If individual graphs cannot be restored, xdi2-tools should skip them and print an exception.
- Start the XDI2 server, and make sure everything looks good.