Simple scheduled backup of all Cloudflare zones and records via Github Actions.
- Scheduled backup to json files
- Backup all account zones
- Backup all zones records
- Fork the repository on GitHub
- 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.
- Enable GitHub Actions if disabled
- 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
- Setup
CLOUDFLARE_API_TOKEN
as GitHub Action repository secret (https://github.com/user/repo/settings/secrets/actions) - Setup scheduled cronjob on the zones.yml file:
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
- Records backup will be executed only after a successful zones backup
- Enjoy automated backups via GitHub Actions 🎉