Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to move 2 web-servers (with German and Russian domain names) from one hoster to another one (where I can create/maintain own DNS zones).

Before changing anything, I'd like to fetch and save the current zone file (sp?) for future reference.

On my CentOS 6 machine (not the web server to be moved) I've installed jwois packet and then I'm trying:

   whois mysite-1.ru

and

   whois mysite-2.de

but it returns some free-formatted (and differently-formatted) text. How do I fetch the zone file or whatever it is called (sorry, I have knowledge gaps there)?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You do not use whois to perform zone transfers.

If zone transfers are permitted on name server for the current domain, then you could use a command like host -t axfr mysite-1.ru ns1.mysite-1.ru where ns1 is an authoritative name servers that permit zone transfers.

share|improve this answer
    
FYI - host is considered obsolete by its authors. –  Alnitak Nov 3 '11 at 18:11
    
@Alnitak, which fork? AFAIK, there are at least two separate forks of host. –  Zoredache Nov 3 '11 at 18:53
    
@Zorecache the official ISC version. Serious DNS heads use 'dig' :) –  Alnitak Nov 4 '11 at 8:22

You likely can't do zone transfers from the current DNS hosts - most don't permit it.

However given that you ought to know what names actually exist in your own zones, why not just ask for them?

 % dig mysite-1.ru. a       ; for 'bare' web site address
 % dig mysite-1.ru. mx      ; for email servers
 % dig www.mysite-1.ru. a   ; for www web site address

Repeat for any other names you happen to have, but the above would cover 99% of configurations.

There'll be SOA and NS records too, but you don't need to copy those - they'd be automatically set up by the new DNS host.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.