A DNS backup is a dated copy of the records you would need after an accidental change, deleted zone or provider-access problem. Keep that copy outside the account you may need to recover from. Then verify what it contains and document how you would use it—an export alone does not prove recovery will work.
The short version
- Confirm the zones and DNS account you are authorised to back up.
- Export the records using a supported provider workflow or a reviewed backup tool.
- Store dated copies in a separate, access-controlled location.
- Check the export for completeness and document settings it does not include.
- Rehearse recovery in a test environment before relying on the backup.
Review the Cloudflare DNS backup tool →
Implementation notes
I maintain an open-source Bash script for this: cloudflare-backup. It uses the Cloudflare API, handles zone pagination, and exports records in BIND-compatible format to timestamped .txt files in a /domains directory. Dependencies: bash, curl, and jq. Credentials stay in a .env file, not the script. The tool page has setup and scheduling details.
Manual exports or scheduled backups?
A manual export can capture the state before a planned change. A scheduled process can keep a history of changes between those checkpoints. Either approach needs a named owner, a way to notice failures and a check that the saved records are usable.
What a DNS export does not prove
DNS records are only part of recovery. Registrar access, domain renewal, DNSSEC, delegation, Cloudflare proxy settings and account-level configuration may need separate records or recovery steps. Verify the exact format and fields your chosen tool preserves. Do not assume one exported file is a complete Cloudflare-account backup.
Verify before you need to restore
Inspect a recent backup, compare representative record types with the provider and rehearse the recovery process somewhere that cannot affect production. Before a real change, confirm who can approve it, how mail and other services depend on DNS, and what rollback means for that environment.
Work through the DNS backup and recovery checklist →
DNS recovery is one part of website resilience. The free website baseline checklist also covers access, security headers, WordPress where applicable and recovery evidence. Use the free website security checklist →
Originally published on LinkedIn Pulse.