Skip to content

Simple tool for backing up your CloudFlare hosted DNS records in format acceptable by BIND

Notifications You must be signed in to change notification settings

m-messiah/cloudflaredns-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudFlare DNS to RFC1035 converter

https://img.shields.io/pypi/v/cloudflaredns-backup.svg?style=flat-square https://img.shields.io/pypi/dm/cloudflaredns-backup.svg?style=flat-square

Simple tool for backing up your CloudFlare hosted DNS records in format acceptable by BIND (RFC1035)

Installation

pip install cloudflaredns-backup

Usage

  • get all your CloudFlare zones to console

    cf-backup [email protected] 1234567890 # args
    [email protected] CF_TOKEN=1234567890 cf-backup # env
    echo "[email protected]:1234567890" > credentials.cfg && cf-backup -c credentials.cfg # config file
  • get only example.com and example2.com zones (here and other - just args examples. ENV and cred-file are same)

    cf-backup [email protected] 1234567890 -z example.com -z example2.com

    This example may be simplified as:

    cf-backup [email protected] 1234567890 -z "example1.com example2.com"
  • Get only example.com, create if not exists folder and write zone to ./zones/example.com, and write NS in zone

    cf-backup [email protected] 1234567890 -z example.com -o zones --ns ns.example.com