473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Shell Script to Dump all Domain Zone Records?

I've been searching the internet for some kind of script that will utilize dig or similar to dump ALL A, CNAME, MX, TXT, etc. records for a given domain. Is there any way to retrieve all of the records and IP addresses without knowing the actual subdomains to query? For example, if I just know "mydomain.com" is there any way to find the A and MX records (and the IPs they point to) for mail.mydomain.com programatically?

My goal is to automate a backup of all the records for a domain before performing a registrar transfer so I can recreate the records identically afterwards.

Does anyone know of an existing tool (or could provide a bit of guidance for a new shell script) that can manage this?

Thanks in advance!
Mar 12 '07 #1
2 5653
What I'm looking to avoid is having to manually log into the registrar's website and write everything down by hand.
Mar 12 '07 #2
What I'm looking to avoid is having to manually log into the registrar's website and write everything down by hand.

using the nslookup command (windows or UNIX) you can get this information.
here is a quick sample script for UNIX (nslookup-dmp.ksh)
usage will be nslookup-dmp.ksh {domain} i.e. yourname.com
Expand|Select|Wrap|Line Numbers
  1. #!/bin/ksh
  2. /bin/echo "The Internet Address of $1..."
  3. /bin/nslookup -q=A $1
  4. /bin/echo "The canonical name for alias for $1..."
  5. /bin/nslookup -q=CNAME $1
  6. /bin/echo "The host CPU and OS Type..."
  7. /bin/nslookup -q=HINFO $1
  8. /bin/echo "The Mail Exchanger for $1..."
  9. /bin/nslookup -q=MX $1
  10. /bin/echo "The Statement of Authority for $1..."
  11. /bin/nslookup -q=SOA $1
  12. /bin/echo "The text information for $1..."
  13. /bin/nslookup -q=TXT $1
  14. /bin/echo "The Well Known Services for $1..."
  15. /bin/nslookup -q=WKS $1 
Mar 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: steve.anon | last post by:
Hi - Any help or pointer on this would be greatly appreciated. I'm working on something similar to blogger.com. Users sign up and they get their own webpage, with a domain name of...
3
by: Tat | last post by:
I wonder if somebody can give me a hint on how to convert an IDC script to asp.net. I have an asp.net application with one idc script. I know .Net, but I've never worked with IDC, so bear with me....
2
by: Thomas W | last post by:
I'm trying to wrap my head around the docs at python.org related to the gettext-module, but I'm having some problem getting it to work. Is there any really simple, step-by-step on how to use this...
10
by: A.M | last post by:
Hi, I am having difficulty with shell scripting in Python. I use the following command to run a DOS command and put the return value in a Python variable:
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
6
by: blackice | last post by:
hello all ..., first i would thank all the people who are in this forums cause they are very helpful ..., By the way i had some posts hers about comment out the named.conf file the script is...
3
by: Okonita via DBMonster.com | last post by:
Hi all, Working on a little shell script to remove specific records from a flat file. I have scanned a one or two script books and googled for answers but have no success. Can someone show me how...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
3
by: regnumber | last post by:
Hi. I am new to Unix. I need to write a Unix Shell Script to extract records from the table and write those extracted datas to a text file. DB using is DB2. Can anyone give me some sample...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.