Skip to content

neighborhoods/CloudflareBackup

Repository files navigation

Cloudflare Backup

This tool backs up the zones for your account along with their respective dns records and page rules. PRs are welcome.

Usage

Running with Local Python

  • Install pip requirements using: pip install --no-cache-dir -r requirements.txt
  • Set your CF_API_EMAIL AND CF_API_KEY environment variables as per the Cloudflare Python SDK
  • Run the script python cf_backup.py

Running with Docker with image from Docker Hub

  • Run the Docker image, ensuring you set your environment vars: docker run -e "[email protected]" -e "CF_API_KEY=yourapikey" -v "$(pwd)/output:/usr/src/app/output" -it --rm neighborhoods/cf-backup

Building your own image and running with Docker

  • Build the Docker image: docker build -t cf-backup .
  • Run the Docker image you built, ensuring you set your environment vars: docker run -e "[email protected]" -e "CF_API_KEY=yourapikey" -v "$(pwd)/output:/usr/src/app/output" -it --rm --name cf-backup cf-backup

About

A tool for backing up Cloudflare Zones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published