[Opendnssec-user] Re: Migration from 1.3.8 to 1.4.01a

Siôn Lloyd sion at nominet.org.uk
Tue Jun 26 10:57:31 UTC 2012

On 26/06/12 11:42, Fred Zwarts (KVI) wrote:
> "Siôn Lloyd"  wrote in message news:4FE98B02.9090206 at nominet.org.uk...
>> On 26/06/12 10:45, Fred Zwarts (KVI) wrote:
>>> In a separate server we run OpenDNSSEC with a configuration 
>>> mirroring the configuration of our master DNS server for testing 
>>> purposes. In this system we tried to upgrade from version 1.3.8 to 
>>> 1.4.01a. When we try to start OpenDNSSEC, we see the message:
>>> ERROR: database version number incompatible with software; require 
>>> 3, found 2. Please run the migration scripts
>>> I was not able to find the documentation about migration scripts. 
>>> Could someone help me to point to the documentation? Where are these 
>>> migration scripts and how am I supposed to run them?
>> Hi Fred.
>> In the root directory of the tarball there should be a file called 
>> "MIGRATION" which has the instructions for changing the database schema.
>> For the 1.3 to 1.4 migration the instructions are under the section 
>> "Migrating trunk". In short you need to run one of two scripts:
>>      enforcer/utils/migrate_adapters_1.mysql
>> or
>>      enforcer/utils/migrate_adapters_1.sqlite3
>> depending on your database choice.
>> They are just sql statements so can be run in many ways, e.g.:
>> sqlite3 [PATH_TO_DB] < enforcer/utils/migrate_adapters_1.sqlite3
>> Thank you.
>> Sion
> Thanks, Siôn, for your reply.
> I found the MIGRATION document, but there is no section 1.3 to 1.4. 
> (There are only sections about the 1.1 to 1.2 and about 1.2 to 1.3 
> migration.) So I read, as you said, the section about migrationg trunk.
> But, in the enforcer/utils directory, there are no migrate_adapters_1 
> scripts. I see the following scripts:
> migrate_id_mysql.pl
> migrate_keyshare_mysql.pl
> migrate_keyshare_sqlite3.pl
> migrate_to_ng_mysql.pl
> migrate_to_ng_sqlite.pl
> I guess with database, you mean the kasp.db file and if I am correct 
> this is a sqlite3 database file, not a mysql file, so three of the 
> five scripts I do not need.
> Do I need both other scripts? In which order?

Ah, apologies... The required migration scripts were not included in the 
"a1" tarball; they are in the "a2" which is what I was looking at.

There are only 3 lines of SQL required to convert a v1.3 database to 
1.4; they are:

alter table zones add column in_type varchar(512) default "File";
alter table zones add column out_type varchar(512) default "File";
update dbadmin set version = 3;

The easiest thing might be to run:
"sqlite3 [PATH_TO_KASP.DB]"
then cut and paste the above into the terminal.

The scripts that you list above are for earlier versions, or preparation 
for v2.0.

Sorry about that.


More information about the Opendnssec-user mailing list