Scarab has the ability to export XML issues and then import them back in. For now, there are a lot of pre-requirements in order for this to happen successfully (see below). We cannot stress strongly enough that you backup your database before you do this import as the code is in its early alpha stages. One thing that is known to not work entirely is the import of the dependency information. I have also not done a lot of testing of the update-same-db import-type, just the create-same-db import-type.
There are three ways that the import can happen and this is defined by the import-type element in the XML file:
<import-type>create-same-db</import-type> - This means that when doing an import, all issues being imported will be considered new issues, any pre-existing data will be ignored and all data in the XML file will be imported as new data. Right now, this has the same behavior as create-different-db.
<import-type>create-different-db</import-type> - This means that when doing an import, all issues being imported will be considered new issues, any pre-existing data will be ignored and all data in the XML file will be imported as new data. Right now, this has the same behavior as create-same-db.
<import-type>update-same-db</import-type> - This means that the system will try to find existing data in the database (such as an ActivitySet id) and will overwrite the pre-existing data with what is in the XML file. If it can't find the data, it will create new data.
The current pre-requirements for a successful import are that all of the modules, usernames, issue/artifact types, attributes, attribute options referenced in the XML file must already exist in the system. If they cannot be found, the import will fail.
Importing can be done via the UI into a running scarab or via an ImportIssues ant task.
The import issues screen can be found under Admin->Modules in the navigation bar. The import issues UI can be asked to give back the issue import results as xml by setting the value of the form input 'format' field to 'xml'. Such a feature might be used scripting a mass import of issues via HTTP POST.
To perform the import via ant, one needs to setup some properties and then execute the scarab/build/import.xml file. The properties can be defined in a ~/build.properties file (or ~/scarab.build.properties, scarab/build.properties, etc. Look at the top of the import.xml file for the various locations which can be used.)
The important properties to define are:
The best thing to do in the early stages of this development phase is to cd into the build directory and first make sure that Scarab is built (type: ant). Then, type the following: ant -f import.xml
You should then see the debugging output sent to the screen. If you see an exception, please make sure to send it to me so that I can look into fixing it.
See also this explaination of the Scarab XML Format, and the xml import FAQ to learn more.