A CLI tool to dump DNS records into an archive
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dns_archiver-0.3.0.tar.gz.
File metadata
- Download URL: dns_archiver-0.3.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cac83819725cea82bc86526b170dc0a8f413455673ee67e3244ac2040f48f021
|
|
| MD5 |
6a5272d095de2b20ea61bc4fce4b411d
|
|
| BLAKE2b-256 |
55cbbbc1e383eb2ca65c92b554ee9e613940efcf03cfc1d73bd82138ab01dca8
|
File details
Details for the file dns_archiver-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dns_archiver-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e423b148574c2ccba0583b487dd485b576492eb30901475823abb335a25f60cf
|
|
| MD5 |
ec0e70f8791a4fd5095d0f56a8106f08
|
|
| BLAKE2b-256 |
6eada2dd71a79a02c43aceb4ac2db6e80156eb5d700965f52fcba1ac264d4701
|