https://github.com/pellizzetti/digitalocean-dns-bind-export
Command line tool for getting zone records in BIND format from DigitalOcean
https://github.com/pellizzetti/digitalocean-dns-bind-export
Last synced: 9 months ago
JSON representation
Command line tool for getting zone records in BIND format from DigitalOcean
- Host: GitHub
- URL: https://github.com/pellizzetti/digitalocean-dns-bind-export
- Owner: pellizzetti
- License: mit
- Created: 2020-09-02T22:11:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T13:38:26.000Z (almost 6 years ago)
- Last Synced: 2025-08-31T06:53:27.705Z (10 months ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dobind
CLI for getting zone records in BIND format from DigitalOcean.
### Installation
Grab the latest binary from [releases](https://github.com/pellizzetti/digitalocean-dns-bind-export/releases) page for your architecture and place it somewhere on your `PATH`.
### Usage
Set the access token (get one [here](https://cloud.digitalocean.com/settings/api/tokens)):
```sh
$ export DO_ACCESS_TOKEN="WqvcUVyGEzmMFo28ukKRVFW8rqzAQY9uijSpaPrB8mCXZE6wQ7csNrRa6ZaHHBgo"
```
Extract BIND information for the zone `example.com` and write to file `example.com.zone`:
```sh
$ dobind -z example.com > example.com.zone
```
output:
```bind
$ORIGIN example.com.
@ 3600 SOA ns1.p30.dynect.net. (
zone-admin.dyndns.com. ; address of responsible party
2016072701 ; serial number
3600 ; refresh period
600 ; retry period
604800 ; expire time
1800 ) ; minimum ttl
86400 NS ns1.p30.dynect.net.
86400 NS ns2.p30.dynect.net.
86400 NS ns3.p30.dynect.net.
86400 NS ns4.p30.dynect.net.
3600 MX 10 mail.example.com.
3600 MX 20 vpn.example.com.
3600 MX 30 mail.example.com.
60 A 204.13.248.106
3600 TXT "v=spf1 includespf.dynect.net ~all"
mail 14400 A 204.13.248.106
vpn 60 A 216.146.45.240
webapp 60 A 216.146.46.10
webapp 60 A 216.146.46.11
www 43200 CNAME example.com.
```