r3 - 19 May 2006 - 12:14:59 - BrianMoseleyYou are here: OSAF >  Documentation Web  >  CosmoAdministrator > CosmoDataMigration
Cosmo web server

0.3 Data Migration



The repository schema changed significantly between 0.2 and 0.3. A tool is provided with the 0.3 release to migrate existing repositories from version 0.2.5 and beyond to the 0.3 schema.

NOTE: There are known bugs with this tool that cause it to fail when migrating calendars. You should not depend on it to work correctly. Migration is not officially supported in the 0.3 release.

The migration tool is distributed in the form of an executable jar. It is run like so:

usage: java -jar cosmo-migrate-0.3.jar [-sourcedata dir] [-targetdata dir]
       [-targetconfig file] [-db dir] [-sourceconfig file] [-help]
 -db <dir>              location of user database directory
 -sourceconfig <file>   location of source repository config file
 -sourcedata <dir>      location of source repository data directory
 -targetconfig <file>   location of target repository config file
 -targetdata <dir>      location of target repository data directory
 -help                  print this message

The source repository is of course the existing 0.2 repository, and the target repository is the 0.3 repository that data will be migrated into.

The tool logs informational messages to STDOUT and errors to STDERR.

Here is an example of using the migration tool to migrate a 0.2 Cosmo installation into a freshly unpacked OSAF server bundle distribution.

It assumes that Cosmo 0.2 is installed into /usr/local/cosmo/0.2 and the 0.3-0.1 version of the server bundle is installed into /usr/local/cosmo/0.3.

$ java -jar cosmo-migrate-0.3.jar \
       -db /usr/local/cosmo/0.2/data/db \
       -sourcedata /usr/local/cosmo/0.2/data/repository \
       -sourceconfig /usr/local/cosmo/0.2/etc/repository.xml \
       -targetdata /usr/local/cosmo/0.3/data \
       -targetconfig /usr/local/cosmo/0.3/etc/repository.xml
Registered namespace dav: DAV:
Registered namespace calendar: http://osafoundation.org/calendar
Registered namespace ticket: http://www.xythos.com/namespaces/StorageServer
Registered namespace cosmo: http://osafoundation.org/cosmo
Registered namespaces icalendar: http://osafoundation.org/icalendar
Registered namespaces _pre141: myapp:ns
Copied overlord in 0.006s
Saved overlord in 0.028s
Copied bcm in 0.043s
Saved bcm in 0.028s
Copied ixjonez in 0.257s
Saved ixjonez in 0.350s
2 users copied in 0h 0m 0s

If the tool is run multiple times against the same repositories, it skips users that have previously been migrated (including the overlord) and does not re-register namespaces. If there is a problem copying an individual user, the tool skips the user, logging the error message, and continues to the next user. The total number of users skipped is logged at the end of the run.

There is currently no repair tool available for the 0.2 repository, so if the migration tool skips a user, that user is effectively lost to the 0.3 repository.

The tool outputs timing info for both the copying and saving stages for each user since users with very large home directories could take several minutes to copy and several more minutes to save. This gives a bit more of a hint that something is actually happening.

GlossaryForm
DisplayName Change Me!
GlossaryTermCategories

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.