DNS Archiver
A Simple DNS lookup tool that dumps all records for archiving.
Useful to run on a schedule to monitor DNS changes which can help if a customer modifies their DNS and breaks their site you can quickly debug and tell what the old (correct) records were.
Install
The recommended way to run is with uvx (part of uv):
# Run directly without installing (recommended)
uvx dns-archiver example.com
# Or install persistently
uv tool install dns-archiver
# Alternative: use pipx
pipx install dns-archiver
Usage
% dns-archiver --help
Usage: dns-archiver [OPTIONS] NAME
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * name TEXT DNS name to lookup [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --record [all|a|aaaa|cname|txt|ns|mx|soa] The DNS record to archive [default: ALL] │
│ --ttl --no-ttl Include TTL values or not [default: ttl] │
│ --nameserver -n TEXT DNS nameserver(s) to query (can be specified │
│ multiple times) │
│ --version -v │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to │
│ copy it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Examples
Basic Usage
# Archive all DNS records for a domain
dns-archiver example.com
# Archive only A records
dns-archiver example.com --record A
# Archive without TTL values
dns-archiver example.com --no-ttl
Using Custom Nameservers
# Query using Google's DNS
dns-archiver example.com -n 8.8.8.8
# Query using Cloudflare's DNS
dns-archiver example.com -n 1.1.1.1
# Query with multiple nameservers (uses first available)
dns-archiver example.com -n 8.8.8.8 -n 1.1.1.1
# Check DNS propagation across different providers
dns-archiver example.com -n 8.8.8.8 > google-dns.json
dns-archiver example.com -n 1.1.1.1 > cloudflare-dns.json
diff google-dns.json cloudflare-dns.json
Monitoring and Archiving
# Save DNS snapshot to a file with timestamp
dns-archiver example.com > "dns-$(date +%Y%m%d-%H%M%S).json"
# Query specific record types for monitoring
dns-archiver example.com --record MX -n 8.8.8.8
Metadata
Release files for dns-archiver 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dns_archiver-0.3.0.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dns_archiver-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / dns_archiver-0.3.0.tar.gz
| Download URL | dns_archiver-0.3.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cac83819725cea82bc86526b170dc0a8f413455673ee67e3244ac2040f48f021
|
|
BLAKE2b-256 checksum How to use checksums |
55cbbbc1e383eb2ca65c92b554ee9e613940efcf03cfc1d73bd82138ab01dca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Release files / dns_archiver-0.3.0-py3-none-any.whl
| Download URL | dns_archiver-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e423b148574c2ccba0583b487dd485b576492eb30901475823abb335a25f60cf
|
|
BLAKE2b-256 checksum How to use checksums |
6eada2dd71a79a02c43aceb4ac2db6e80156eb5d700965f52fcba1ac264d4701
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|