https://github.com/clevyr/docker-cloudflare-borgmatic
Backup your Cloudflare zones with Borg and Borgmatic
https://github.com/clevyr/docker-cloudflare-borgmatic
borgbackup cloudflare
Last synced: 5 months ago
JSON representation
Backup your Cloudflare zones with Borg and Borgmatic
- Host: GitHub
- URL: https://github.com/clevyr/docker-cloudflare-borgmatic
- Owner: clevyr
- Created: 2021-08-10T21:46:12.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-12T13:11:36.000Z (5 months ago)
- Last Synced: 2026-02-12T21:57:34.525Z (5 months ago)
- Topics: borgbackup, cloudflare
- Language: Dockerfile
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-cloudflare-borgmatic
[](https://github.com/clevyr/docker-cloudflare-borgmatic/actions/workflows/docker.yml)
Backup every Cloudflare zone with Borg and Borgmatic.
## Pull Command
```sh
docker pull ghcr.io/clevyr/cloudflare-borgmatic
```
## Config
### Cloudflare Authentication
Each zone is exported by [flarectl](https://github.com/cloudflare/cloudflare-go/tree/master/cmd/flarectl). To authenticate into Cloudflare, generate an [API token](https://dash.cloudflare.com/profile/api-tokens) with `Zone:Read` and `DNS:Read` permission.
| Variable | Description |
|----------------|---------------------------------|
| `CF_API_TOKEN` | Cloudflare API token |
### Borgmatic
All [Borg environment variables](https://borgbackup.readthedocs.io/en/stable/usage/general.html#environment-variables) are supported.
Your [Borgmatic](https://torsion.org/borgmatic/) config should be volume bound to `/etc/borgmatic/config.yaml`
Example Borgmatic config:
```yaml
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
```