How to get DNS zone files of my domains

Linode Staff
How to get DNS zone files of my domains

1 Reply

The best way to retrieve DNS zone files is through the CLI and utilizing the Linode APIv4..

The following command will give a list of the domain IDs:

curl -sH "Authorization: Bearer $TOKEN"  https://api.linode.com/v4/domains | jq | grep -i 'id\|domain' | grep 1 | awk -F':' '{print $2}' | tr ',' ' '

The following loop can be used to read in all the of domain IDs:

for i in ID1 ID2 IDN; do linode-cli domain records-view $i; done

The above portion can be modified to echo the IDs to a .txt file or really whatever file you'd like.

I would also recommend taking a look at this Community Questions Site post regarding DNS zones: How to retrieve/save all DNS records?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct