Copying a geodatabase using geodatabase XML workspaces

You can use geodatabase XML workspace documents to copy and move a geodatabase. This option creates a readable XML document of the geodatabase contents.

Note:

The resulting geodatabase XML document can be very large when you copy both the data as well as the schema. Generally, this tool is not recommended for copying geodatabase data. Alternatives for making a geodatabase copy include the use of the Copy or Export tools within the context menu or the geoprocessing tools available in the To Geodatabase toolset to copy subsets of the information.

XML workspace documents are very useful for copying geodatabase schemas (empty geodatabases) from one type to another. You can use the Export XML Workspace Document tool in conjunction with the Import XML Workspace Document tool to copy a geodatabase schema.

Export an XML workspace document

You can use the Export XML Workspace Document geoprocessing tool to create a readable XML document of the geodatabase contents. If the input is a geodatabase or feature dataset, all data elements contained within that workspace are exported.

  1. Open the Export XML Workspace Document geoprocessing tool. You can open the tool by searching for it in the search box in the Geoprocessing pane, or by navigating to the tool in the Workspace toolset of the Data Management toolbox.
  2. For the Input Data parameter, browse to the geodatabase or feature dataset you want to export.
  3. Specify a location for the XML workspace document in the Output File parameter.
  4. Next, you may choose to export the data or just the schema, select a storage type, and whether to export metadata.
  5. Click Run to execute the tool.

    An XML workspace document will be created.

Import an XML workspace document

If you have already created an XML workspace document by using the Export XML Workspace Document tool, you can use the output XML file as input to the Import XML Workspace Document tool.

  1. Open the Import XML Workspace Document geoprocessing tool. You can open the tool by searching for it in the search box in the Geoprocessing pane, or by navigating to the tool in the Workspace toolset of the Data Management toolbox.
  2. For the Target Geodatabase, browse to the geodatabase where you want to import your data.
  3. Choose your XML workspace document for the Import File parameter.
  4. Select whether to import data and schema, or schema only. If you did not include the data when you exported the XML workspace document, you will only be able to import the schema. You can also use the Configuration Keyword parameter to specify a specific configuration keyword if desired.
  5. Click Run to execute the tool.

    The data in the XML workspace document will be imported into the target geodatabase.