Getting a copy of the existing DNS may involve "scraping" it out of a web-based management interface. You can try to perform a zone transfer of the zone using dig
, nslookup
, or a DNS server, but any properly-configured DNS server isn't going to serve up zone transfers to Joe AnybodyTM.
You'll find several questions on Server Fault re: orderly cutover of DNS records between an "old value" and a "new value" (Here's one: How do I smoothly migrate a web server's DNS from one IP address to another?).
The traditional method for performing such a cutover is to place the "old value" in the DNS server (e.g. the pre-cut IP address assigned to the "www" A record) and to turn down the TTL prior to the cut (some people prefer backing-off this value by half until the cut takes place-- 24 hours, 12 hours, 6 hours, etc, right up until the cut). Once you hit the cutover time, you put the new record in place and whatever TTL you'd like. Ideally the pre-cut record had such a short TTL that it quickly ages out of cache on all the recursive resolvers around the 'net that might have been caching it (assuming everybody plays along and doesn't do dumb things like overriding your TTLs).
You can augment this by using URL rewriting or a reverse proxy on the old web host to direct clients to the new host if you're really paranoid (or somebody isn't playing by the rules and ignoring your TTL). Whether you need to go to this level of paranoia or not will depend on your specific circumstance. If the site is static in nature I'd keep the web site running on the old server until you no longer see accesses hitting the logs there.
I'd think that the important records are probably the MX record for the domain, and the A records for the domain, "www", and whatever the MX record points to. I'd play it safe and replicate the entire contents of the zone such that you can, later, examine each record and figure out if they're being used and what they're being used for. (I know that my Customers typically have a record for their user-to-site VPN gateway in the public DNS, for example.)
You've already mentioned DynDNS, it sounds like all you're missing is the client. They mention a couple linux-compatible clients on their website.
Using either of these in combination with a dynamic DNS service should accomplish what you want.
I originally assumed that your shared hosting would provide you with shell access. Without shell access, things get a bit tricky. First, you need some way to run a script periodically. Some web apps implement "fake cron" by calling a routine on every page load, but that won't help when your site isn't accessible. That means you need access to the crontab.
If you have the ability to run a task periodically, you could develop a script that sends the new IP address to another host you control, which is also the authoritative DNS. The receiving host would use the new IP address to update the zone file, then reload the DNS configuration.
TL;DR No, I don't know of any service that already provides this.
Best Answer
If you have a dynamic IP address on your server then you need to have some method of detecting the change and then updating your DNS records with the updated information. During the time between the IP address changing and your update to the DNS your site will be effectively down.
You will need to find out if amen.pt allow and have some method of facilitating an automatic update to your DNS records. Failing that you will probably have to host your DNS with a company that does allow and facilitate automatic updates when IPs change.