Backup every Cloudflare zone with Borg and Borgmatic.
docker pull ghcr.io/clevyr/cloudflare-borgmatic
Each zone is exported by flarectl. To authenticate into Cloudflare, generate an API token with Zone:Read
and DNS:Read
permission.
Variable | Description |
---|---|
CF_API_TOKEN |
Cloudflare API token |
All Borg environment variables are supported.
Your Borgmatic config should be volume bound to /etc/borgmatic/config.yaml
Example Borgmatic config:
repositories:
- path: /out/borg # Borg repo goes here
label: example
source_directories:
- /data
archive_name_format: "cloudflare-{now:%Y-%m-%d-%H%M%S}"
keep_hourly: 168
keep_daily: 31
keep_monthly: 24
keep_yearly: 2
check_last: 3