Back to INDEX

Table of Contents


What is DB? Why we need it?

For domain name service, the name database is needed. As name server receives some query, it consults with that database to find the answer. So, the name database is the source of information for domain name system.

Well, for newbie, the name database is not static one. Old-fasioned bind has ASCII text style zone file(name database), but it was static. For these days, it could be used as dynamic one, but to make ASCII text change dynamically, we need much more cost such as disk access.

To make the name database dynamic, newbie uses DB 1.85 or 1.86 as database engine. Therefore, newbie can't understand old-fasioned ASCII zone file. To understand, it must be converted into DB style database. The converted file is called as `zone DB file' and the converter is zone2db program.

[back to TOC]

How to use zone2db?

To convert ASCII style zone file into zone DB file, use zone2db command as following way.

% zone2db [zonefile] [origin] [zone DB file]

Here, [zonefile] is filename of ASCII style zone file, and [zone DB file] is name of DB style zone file to be created. And [origin] is domain name suffix added after the domain name which has trailing dot (i.e. default domain).

For example, convert zone file named a.sample.zone into zone DB file named a.sample.db, with default domain a.sample., type like following.

% zone2db a.sample.zone a.sample. a.sample.db

To revert ASCII style zone file from DB file, ``-r'' flag is useful.

% zone2db -r [zonefile] [zone DB file]

Following command create a.sample.zone.backup from a.sample.db

% zone2db -r a.sample.zone.backup a.sample.db

or you can just print it to screen using `-'(minus sign) for zonefile name.

[back to TOC]
Yusuke DOI
doi@sfc.wide.ad.jp