Question
Where to locate the synced DNS zones from the Master DNS server?
Answer
The location of the DNS zone files depends on the Slave DNS server configuration and OS: the DNS zone files may be stored either in ordinary text files or in a database file.
For example:
- On RedHat/CentOS: if it’s installed the
package on the Slave DNS server, the BIND service will run in the
bind-chroot
environment and all configuration files will be there. As such, zone files can be found in
/var/named/chroot
 path.
/var/named/chroot/var/named -
On Debian/Ubuntu: If it’s installed the bind9 package on the Slave DNS server, the BIND service will create database files in
/var/cache/bind
folder path. For example, to retireve the DNS zone from domain example.com and store its output in the fileexample.com.txt
:# named-compilezone -f raw -F text -o example.com.txt example.com /var/cache/bind/example.com
# cat example.com.txt