Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Hover.com "Zone file import/export" has been *Planned* since 2011
// https://help.hover.com/entries/471066-Zone-file-import-export
// Here's a brittle approximation of export.
//
// 1. login to your account: https://www.hover.com/domains
// 2. run the following in your browser's JavaScript console, changing the first line
// to your domain
// 3. copy the text logged to the console.
// 4. manually correct FQDNs, these have to end with a period "."
//
// If things go wrong a noisy error should appear in the console; JavaScript debugger might
// stop on the offending code.
var domain = 'tool-man.org'
$.ajax({ type:"GET", url:"/api/dns", success:function(response){
if (response.succeeded) {
var entries = response.domains.filter(function(d) { return d.domain_name == domain })[0].entries
var records = entries.map(function(e) { return [e.name, 'IN', e.type, e.content].join(' ') })
var result = "$TTL 900\n" + records.join("\n")
console.log(result)
}
}})
$TTL 900
@ IN TXT v=spf1 include:_spf.google.com ~all
@ IN MX 1 ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ASPMX2.GOOGLEMAIL.COM.
@ IN MX 10 ASPMX3.GOOGLEMAIL.COM.
blog IN CNAME toolbear74.wordpress.com.
mail IN CNAME ghs.google.com.
sites IN CNAME ghs.google.com.
docs IN CNAME ghs.google.com.
calendar IN CNAME ghs.google.com.
smtp IN CNAME smtp.gmail.com.
tim IN CNAME toolbear.github.io.
boxen IN CNAME toolbear-boxen.herokuapp.com.
@ IN A 192.30.252.153
@ IN A 192.30.252.154
@ IN TXT keybase-site-verification=pcgVuIGYAkz2Nu5_YeDbzsvG-YiWgi3Ryz9RMlsWMsU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment