cflare backup & restore

Disaster Recovery Backup & Restore

Snapshots

Create atomic JSON snapshots of DNS, SSL, WAF, and Page Rules, with full point-in-time restoration.

$ cflare backup <domain> [options] cflare restore <domain> <file> [options]

📖 Full Explanation

Accidental record deletions, human error, or rogue scripts can corrupt production DNS and edge rules. \1 exports the complete state of a zone into an encrypted, versioned JSON snapshot. \1 reconstructs the entire domain configuration with atomic precision.

⚙️ Command Options & Flags

Option / Flag Description Default
-o, --output <file> Destination backup file path ./cflare-backup-<domain>-<date>.json
--include-dns Include all DNS records in backup/restore true
--include-rules Include Page Rules and Custom WAF rules true
--include-settings Include SSL, Cache, and Zone settings true
--dry-run Simulate restore operations without applying changes false

🔬 Technical Corollary & Edge Mechanics

The backup engine performs paginated fetches of \1, \1, \1, and \1. The resulting snapshot includes cryptographic SHA-256 checksums of all records to ensure configuration integrity prior to restoration.

🎯 Real-World DevOps Use Cases

Automated Daily Cloud Backups

Execute automated cron backups of mission-critical domains to local storage or Git repositories.

$ cflare backup namishkumar.in -o backups/namish-$(date +%F).json

Disaster Recovery Rollback

Instantly restore an entire zone configuration after an erroneous Terraform deployment.

$ cflare restore namishkumar.in backups/namish-2026-10-15.json --confirm

💻 Live Output Simulation

$ cflare backup namishkumar.in -o backup.json
✔ Exported 24 DNS records
✔ Exported 3 Page Rules
✔ Exported 8 WAF Access Rules
✔ Exported Zone Settings (SSL, Min TLS, HSTS, Cache)
💾 Snapshot written to backup.json (Checksum: a4f8c2e9...)