Blame SOURCES/README.sdb_pgsql

7a4f84
			PGSQL BIND SDB driver
7a4f84
7a4f84
The postgresql BIND SDB driver is of experimental status and should not be 
7a4f84
used for production systems.
7a4f84
7a4f84
Usage:
7a4f84
7a4f84
o Use the named_sdb process ( put ENABLE_SDB=yes in /etc/sysconfig/named )
7a4f84
7a4f84
o Edit your named.conf to contain a database zone, eg. :
7a4f84
  
7a4f84
zone "pgdb.net." IN {
7a4f84
        type master;
7a4f84
        database "pgsql  bind        pgdb     localhost pguser pgpasswd";
7a4f84
        #                ^- DB name  ^-Table  ^-host    ^-user ^-password
7a4f84
};
7a4f84
7a4f84
o Create the database zone table
7a4f84
  The table must contain the columns "name", "rdtype", and "rdata", and
7a4f84
  is expected to contain a properly constructed zone.  The program "zonetodb"
7a4f84
  creates such a table.
7a4f84
  
7a4f84
  zonetodb usage:
7a4f84
    
7a4f84
    zonetodb origin file dbname dbtable
7a4f84
7a4f84
    where
7a4f84
	origin : zone origin, eg "pgdb.net."
7a4f84
	file   : master zone database file, eg. pgdb.net.db
7a4f84
	dbname : name of postgresql database 
7a4f84
        dbtable: name of table in database
7a4f84
7a4f84
    Eg. to import this zone in the file 'pgdb.net.db' into the 'bind' database 
7a4f84
        'pgdb' table:
7a4f84
7a4f84
---
7a4f84
#pgdb.net.db:
7a4f84
$TTL 1H
7a4f84
@       SOA     localhost.      root.localhost. (       1
7a4f84
                                                3H
7a4f84
                                                1H
7a4f84
                                                1W
7a4f84
                                                1H )
7a4f84
        NS      localhost.
7a4f84
host1   A       192.168.2.1
7a4f84
host2   A       192.168.2.2
7a4f84
host3   A       192.168.2.3
7a4f84
host4   A       192.168.2.4
7a4f84
host5   A       192.168.2.5
7a4f84
host6   A       192.168.2.6
7a4f84
host7   A       192.168.2.7
7a4f84
---
7a4f84
7a4f84
Issue this command as the pgsql user authorized to update the bind database:
7a4f84
 
7a4f84
# zonetodb pgdb.net. pgdb.net.db bind pgdb
7a4f84
7a4f84
will create / update the pgdb table in the 'bind' db:
7a4f84
7a4f84
$ psql -dbind -c 'select * from pgdb;'
7a4f84
      name      | ttl  | rdtype |                        rdata
7a4f84
----------------+------+--------+-----------------------------------------------------
7a4f84
 pgdb.net       | 3600 | SOA    | localhost. root.localhost. 1 10800 3600 604800 3600
7a4f84
 pgdb.net       | 3600 | NS     | localhost.
7a4f84
 host1.pgdb.net | 3600 | A      | 192.168.2.1
7a4f84
 host2.pgdb.net | 3600 | A      | 192.168.2.2
7a4f84
 host3.pgdb.net | 3600 | A      | 192.168.2.3
7a4f84
 host4.pgdb.net | 3600 | A      | 192.168.2.4
7a4f84
 host5.pgdb.net | 3600 | A      | 192.168.2.5
7a4f84
 host6.pgdb.net | 3600 | A      | 192.168.2.6
7a4f84
 host7.pgdb.net | 3600 | A      | 192.168.2.7
7a4f84
(9 rows)
7a4f84
7a4f84
I've tested exactly the above configuration with bind-sdb-9.3.1+ and it works OK.
7a4f84
7a4f84
NOTE: If you use pgsqldb SDB, ensure the postgresql service is started before the named
7a4f84
      service .
7a4f84
7a4f84
USE AT YOUR OWN RISK!