[cosmo-dev] Cosmo db migration failure/corruption

Randy Letness randy at osafoundation.org
Fri Oct 26 11:55:04 PDT 2007


Mike Dawson wrote:
> I've been backing up the wrong db for the past 6 weeks.  I can read 
> the derby database with ij.  Do you know what exactly would be broke?
>
You can probably fix your db by doing the following:

The database was upgraded to version 10.3.1.4 of derby during migration, 
but the version in the server bundle is 10.2.2.0.  So the first thing to 
do would be to
grab the 10.3.1.4 derby jar and use ij to open the database and execute 
the following sql stmts:

alter table subscription drop column etag
alter table users drop column etag
alter table user_preferences drop column etag
alter table item drop column etag
alter table stamp drop column etag
alter table attribute drop column etag

Then, you should be able to re-run the migration using the updated 
migration in 0.8.1 (not released yet).  You can wait until 0.8.1 is 
released (likely Monday) or checkout the source from the 0.8 branch: 
|http://svn.osafoundation.org/server/cosmo/branches/0.8 
<http://svn.osafoundation.org/server/cosmo/trunk> and build the 
migration component yourself.|


> Is there any migration procedure for moving from derby to mysql?  
> Would dumping all the tables to text and importing them into a clean 
> mysql instance work in theory?
>

Currently there isn't a procedure for this.  In theory its possible but 
it hasn't been attempted.

-Randy



More information about the cosmo-dev mailing list