Giter Club home page Giter Club logo

export-cloudflare-dns's Introduction

Bulk export Cloudflare DNS records for all domains

Exports DNS records for each domain on a Cloudflare account. Domain DNS records are created as individual domainname.txt files and will be placed in a "domains" subdirectory.

Installation

Fastest way is:

npx degit shaneturner/export-cloudflare-dns#main YOUR-PROJECT-NAME
cd YOUR-PROJECT-NAME
npm install

Configuration

You will need to add your API credentials into a .env file

First create a blank .env file in the base directory or copy the example file .env.example to .env

cp .env.example .env

Then add the appropriate values for your API key and User email address in the new .env file

CLOUDFLARE_API_KEY=[YOUR API KEY HERE]

CLOUDFLARE_USER_EMAIL=[YOUR USER/LOGIN EMAIL HERE]

Change the NULL values to the values supllied in your Cloudlfar account.

Usage

npm run get-domains

Errors explained

Error:Unknown X-Auth-Key or X-Auth-Email

If you get an error message "Error:Unknown X-Auth-Key or X-Auth-Email", this means you haven't supplied a valid API key and email address in your environment file.

License

MIT

export-cloudflare-dns's People

Contributors

dependabot[bot] avatar shaneturner avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kseckinc

export-cloudflare-dns's Issues

Error running getdomains.js

.env file contains username and api key

[email protected] get-domains

node src/getdomains.js "CF.env"

No envirnment ( .env ) file found. Exiting
Getting List of domains from Cloudflare

/usr/local/Homebrew/CF_Inventory/src/getdomains.js:66
error.response.data.errors.forEach((error) => {
^

TypeError: Cannot read property 'data' of undefined
at /usr/local/Homebrew/CF_Inventory/src/getdomains.js:66:22
at processTicksAndRejections (node:internal/process/task_queues:94:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.