Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabriziosalmi/cloudflare-backup-actions

Cloudflare zones and records backup via Github Actions
https://github.com/fabriziosalmi/cloudflare-backup-actions

backup backup-dns-data cloudflare cloudflare-api cloudflare-backup cloudflare-dns dns-backup dns-record dns-records domain domain-name-service domain-name-system domains domains-list github-action github-actions records zones

Last synced: 14 days ago
JSON representation

Cloudflare zones and records backup via Github Actions

Awesome Lists containing this project

README

        

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

[![Zones](https://github.com/fabriziosalmi/cloudflare/actions/workflows/zones.yml/badge.svg)](https://github.com/fabriziosalmi/cloudflare/actions/workflows/zones.yml) [![Records](https://github.com/fabriziosalmi/cloudflare/actions/workflows/records.yml/badge.svg)](https://github.com/fabriziosalmi/cloudflare/actions/workflows/records.yml)

## 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.

3. Enable GitHub Actions if disabled
4. Create a token on [Cloudflare dashboard](https://dash.cloudflare.com/profile/api-tokens) with "read all resources permissions" (quick way) or create a custom token for a single or more zones you want to backup
5. Setup `CLOUDFLARE_API_TOKEN` as GitHub Action repository secret (https://github.com/user/repo/settings/secrets/actions)
6. Setup scheduled cronjob on the zones.yml file:

```
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
```

6. Records backup will be executed only after a successful zones backup
7. Enjoy automated backups via GitHub Actions 🎉