Skip to content

fabriziosalmi/cloudflare-backup-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Cloudflare json backup via GitHub Actions

Simple scheduled backup of all Cloudflare zones and records via Github Actions.

Zones Records

Features

  • Scheduled backup to json files
  • Backup all account zones
  • Backup all zones records

How to use it

  1. Fork the repository on GitHub
  2. Change repository visibility to private

⚠️ Warning ⚠️ Go to https://github.com/user/repo/settings and change repository visibility to private. If you miss this mandatory step you will make your own Cloudflare zones and records informations public and I'm not responsible for that. If you encounter this case just delete the forked repo as soon as possible.

  1. Enable GitHub Actions if disabled
  2. Create a token on Cloudflare dashboard with "read all resources permissions" (quick way) or create a custom token for a single or more zones you want to backup
  3. Setup CLOUDFLARE_API_TOKEN as GitHub Action repository secret (https://github.com/user/repo/settings/secrets/actions)
  4. Setup scheduled cronjob on the zones.yml file:
on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:
  1. Records backup will be executed only after a successful zones backup
  2. Enjoy automated backups via GitHub Actions 🎉