Proximity lets you export individual attributes and containers for off-line storage or to share with other Proximity users. Care must be taken when importing this data back into Proximity. You must ensure that all relevant identifiers (for objects, links, containers, and subgraphs) in the data file correctly match the corresponding identifiers in the existing database. You cannot import attribute data if that attribute name is already used in the destination database. Similarly, you cannot import a container if that container identifier is already used by the destination database.[1] Importing containers can be problematic if different sets of queries have been run on the source and destination databases.
Exporting a container
exports all the container’s subgraphs, any
attributes on those subgraphs, and any containers nested
within the specified container. Exporting a container does not export
the container’s attributes;
you must export any container attributes
as a separate step using the container-attribute
export type.
Exercise 3.5 walks through the process of exporting the url_server_info object attribute from the ProxWebKB database.
Exercise 3.5. Exporting an attribute to XML:
This exercise walks through the process of exporting an attribute to the Proximity XML data format. Before beginning, make sure that you are serving the ProxWebKB database using Mserver. Data files can only be exported to the same machine as that serving the database.
![]() |
|
|
The export process overwrites any existing data in the output file without warning. Make sure that output file is empty or can be safely overwritten. |
Change to the $PROX_HOME directory.
Export the url_server_info object attribute. (Substitute the appropriate port number if you are using a different port.)
> bin/export-xml.sh localhost:30000 \
$PROX_HOME/doc/user/tutorial/examples/url_server_info_attr.xml \
object-attribute url_server_info
Data files can only be exported to the same machine as that serving the database.
Proximity outputs the following trace (leading information showing elapsed time and execution thread has been omitted from the trace for brevity):
INFO app.ExportXMLApp: * exporting database to: /proximity/doc/user/tutorial/examples/url_server_info_attr.xml INFO app.ExportXMLApp: * saving attribute url_server_info INFO app.ExportXMLApp: * done exporting
[1] These import restrictions can be overridden
by using the noChecks option. See
“Importing XML data using noChecks”for information on using this import
option.