I l@ve RuBoard Previous Section Next Section

2.14 Using Multiple Data Files for a Single Zone

2.14.1 Problem

You want to break a zone into multiple data files, possibly to organize the large number of resource records logically.

2.14.2 Solution

Use the $INCLUDE control statement in your top-level zone data file, which interpolates the contents of another file. For example, to include the contents of the file db.foo.example.hosts into the data file for the zone foo.example, you could use this $INCLUDE control statement:

$INCLUDE db.foo.example.hosts

2.14.3 Discussion

The origin in the included file is, by default, the same as the origin in the file that includes it. If you'd like to change the origin in the included file, specify the new origin as the second argument to the $INCLUDE control statement:

$INCLUDE db.subdomain.foo.example.hosts subdomain.foo.example

On the line after the $INCLUDE statement, the origin reverts to its previous setting.

2.14.4 See Also

Section 2.9, which explains how to create a subdomain within the same zone.

    I l@ve RuBoard Previous Section Next Section