/flares

Flares 🔥is a CloudFlare DNS backup tool

Primary LanguageGoMIT LicenseMIT

Flares 🔥

Flares is a CloudFlare DNS backup tool: every time it runs, dumps your DNS table to the screen.

Optionally exports the data into (BIND formatted) zone files.

MIT License Go Report Card FOSSA Status

flaredns_demo

Quick Start - docker (painless)

# CloudFlare API key is here:
# https://dash.cloudflare.com/profile -> Global API Key -> View
$ export CF_API_KEY=abcdef1234567890
$ export CF_API_EMAIL=someone@example.com
$ docker run -it --rm \
-e CF_API_KEY="$CF_API_KEY" \
-e CF_API_EMAIL="$CF_API_EMAIL" \
lfaoro/flares domain1.tld domain2.tld

Quick Start - compile (full control)

Golang must be installed: https://golang.org/dl/

# flaredns
$ go get -u github.com/lfaoro/flares/cmd/flaredns
$ cd $GOPATH/src/github.com/lfaoro/flares/
# flarelogs (TODO: coming soon)
# $ go get -u github.com/lfaoro/flares/cmd/flarelogs

Set the CF_API_KEY and CF_API_EMAIL

$ flaredns auth # (TODO: coming soon) opens the dashboard at https://dash.cloudflare.com/profile
$ export CF_API_KEY=abcdef1234567890
$ export CF_API_EMAIL=someone@example.com

Run the app

$ make install
$ flaredns -h
$ flaredns domain.tld
$ flaredns domain.tld --export /tmp/tables

Run backup with Gitlab-CI

Contributing

Any help and suggestions are very welcome and appreciated. Start by opening an issue.

  • Fork the project
  • Create your feature branch git checkout -b my-new-feature
  • Commit your changes git commit -am 'Add my feature'
  • Push to the branch git push origin my-new-feature
  • Create a new pull request against the master branch

TODO

  • use https://github.com/spf13/cobra for the CLI interface
  • add all keyword to export all the domains available in the account
  • add auth command, automatically opens CloudFlare dashboard
  • add the flarelogs command

License

FOSSA Status