# Table of contents

- Updating from 1.0 to 1.2
- Updating from 1.2.03 to 1.2.07

# Updating from 1.0 to 1.2

MaraDNS 1.2 has a number of advantages over 1.0, including Y2038 compliance, full support for DNS over TCP, and a new zone file format. While including a number of new features, MaraDNS 1.2 is almost completely compatible with all MaraDNS 1.0 data files. An update from 1.0 to 1.2 will, with very few exceptions, not need any data files to be changed. All MaraDNS 1.0 zone files will work with MaraDNS 1.2, and almost all 1.0 `mararc` configuration files will work with MaraDNS 1.2.

To update a MaraDNS install from 1.0 to 1.2, download the MaraDNS 1.2 tarball, and type in the following command:

    	./configure ; make

This is followed by:

    	make install

No configuration files will be overwritten by the installation of the new MaraDNS 1.2 binaries (making backups of all data files, naturally, is always a good idea).

The only time a 1.0 `mararc` file will not work is when there is a misspelled mararc variable in the mararc file. For example, let us suppose we have a `mararc` file that looks like this:

    bind_address = "127.0.0.1"
    chroot_dir = "/etc/maradns"
    maradns_uid = 99
    maxprocs = 96
    default_rrany_set = 3
    verbose_levul = 1

This will run fine in MaraDNS 1.0. However, when we try to run this file in MaraDNS 1.2, we will get this error message:

    FATAL ERROR: Unknown mararc variable verbose_levul
    Please look for the uncommented string "verbose_levul"
    in your mararc file and remove this line.

    The line this error is on looks like this:
    verbose_levul = 1

This misspelled `mararc` variable needs to either be completely removed from the `mararc` file, or disabled by commenting out. The following `mararc` snippet will work identially in MaraDNS 1.0 as the above snippet, and will parse in MaraDNS 1.2 without a fatal error:

    bind_address = "127.0.0.1"
    chroot_dir = "/etc/maradns"
    maradns_uid = 99
    maxprocs = 96
    default_rrany_set = 3
    # Comment out the misspelled mararc variable
    #verbose_levul = 1

Since MaraDNS 1.2 is usually started with the new `duende` daemonizing program, timestamps are, by default, no longer shown (since otherwise the system logs would have a redundant timestamp in them). If the older behavior of showing a UNIX time stamp is desired, add the following to a MaraDNS 1.2 `mararc` file:

    timestamp_type = 0

# Updating from 1.2.03 to 1.2.07

There are a few minor changes between the 1.2.03 branch and the 1.2.07 branch of MaraDNS:

### The special remote queries have been changed

The special remote queries, which can obtain information about MaraDNS' internal state, have been changed:

- The `admin_acl` variable needs to be set for these variables to work. E.g. `admin_acl = "127.0.0.1, 192.168.116.0/24"`, which only allows 127.0.0.1 (the same machine) or any machine with an IP that starts with 192.168.116 to access this information.
- The TXT query `erre-con-erre-cigarro.maradns.org` is now done with `version.maradns`
- The TXT query `numthreads` (this and all other special queries except `version.maradns` are only enabled when `debug_msg_level` is set) is now `numthreads.maradns`
- The TXT query `cache-elements` is now `cache-elements.maradns`
- The TXT query `memusage` is now `memusage.maradns`
- The TXT query `timestamp` is now `timestamp.maradns`
- The TXT query number`.verbose_level.maradns` has been added, but is only enabled if the `remote_admin` mararc variable is set.

Further information about these queries can be obtained by looking at the mararc man page; in particular, look for `admin_acl`, `debug_msg_level`, and `remote_admin`.

### Zone names are now case-insensitive

Zone names are now case-insensitive. In other words, a line like this in the mararc file:

    csv2["EXAMPLE.COM."] = "DB.EXAMPLE.COM"

Is converted as if the line were:

    csv2["example.com."] = "DB.EXAMPLE.COM"

This affects both csv1 and csv2 zone names. Since hostnames in both csv1 and csv2 host names are converted to lower-case, the impact of this change should be minimal.

### Dictionary variables now must be initialized before being used

MaraDNS 1.2.07 now mandates that dictionary variables must be initialized before being used. This line, by itself, used to parse in a mararc file:

    upstream_servers["."] = "10.1.2.3"

However, this line would do nothing unless the `upstream_servers` dictionary variable was first initialized, e.g:

    upstream_servers = {}
    upstream_servers["."] = "10.1.2.3"

MaraDNS 1.2.07 now mandates the initializion line or exits with a fatal error when parsing a mararc file. The reason for this is to make debugging mararc files easier.