> ## Documentation Index
> Fetch the complete documentation index at: https://snapr.seshuk.im/llms.txt
> Use this file to discover all available pages before exploring further.

# bunny.net

> Upload archives to a bunny.net Storage Zone, with optional signed Pull Zone URLs for direct CDN downloads.

`type: bunny` uploads archives to a [bunny.net Storage Zone](https://bunny.net/storage/) through the bunny.net HTTP API. No external binaries required.

You need a Storage Zone with read and write API access. For signed direct download links — recommended for large archives — you also need a Pull Zone connected to the storage, plus its token authentication key.

## Example

```yaml snapr.yaml theme={null}
storages:
  - type: bunny
    name: bunny-cold
    endpoint: storage.bunnycdn.com
    zoneName: my-zone
    accessKey: env:BUNNY_KEY
    path: snapr/postgres
```

## Options

| Option                 | Type    | Required | Default | Description                                                                                                           |
| ---------------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| `type`                 | `bunny` | Yes      | —       |                                                                                                                       |
| `name`                 | string  | Yes      | —       | Identifier; unique within the job.                                                                                    |
| `endpoint`             | string  | Yes      | —       | Storage endpoint, e.g. `storage.bunnycdn.com` or a regional variant.                                                  |
| `zoneName`             | string  | Yes      | —       | Storage Zone name.                                                                                                    |
| `accessKey`            | string  | Yes      | —       | Storage Zone password / API key. Use `env:`.                                                                          |
| `path`                 | string  | No       | —       | Sub-path inside the zone where archives are stored.                                                                   |
| `includeJobName`       | bool    | No       | `true`  | Append the job name under `path`; see [Storages](/configuration/storages/overview#skipping-the-per-job-subdirectory). |
| `pullZoneHostname`     | string  | No       | —       | Pull Zone hostname. Required to enable signed direct downloads.                                                       |
| `pullZoneTokenAuthKey` | string  | No       | —       | Pull Zone Advanced Token Authentication key (use `env:`). Required to enable signed direct downloads.                 |
| `pullZoneTokenTTL`     | int     | No       | `3600`  | Token lifetime in seconds.                                                                                            |

## Download behavior

By default snapr serves downloads by streaming bytes from the bunny.net **Storage API** through its own HTTP server. This works without any Pull Zone setup, but the Storage API has tight per-zone connection limits — bunny.net throttles aggressive parallel reads with `429 Too Many Requests`.

When both `pullZoneHostname` and `pullZoneTokenAuthKey` are set, snapr instead returns a signed Pull Zone URL and the browser fetches directly from the CDN edge. This is the recommended setup for large archives or busy installations:

```yaml snapr.yaml theme={null}
storages:
  - type: bunny
    name: bunny-cold
    endpoint: storage.bunnycdn.com
    zoneName: my-zone
    accessKey: env:BUNNY_KEY
    path: snapr/postgres
    pullZoneHostname: my-zone.b-cdn.net
    pullZoneTokenAuthKey: env:BUNNY_PULLZONE_KEY
    pullZoneTokenTTL: 1800
```

For split snapshots, signed Pull Zone URLs work for **per-part** downloads but not for the "Download full archive" option — one HTTP redirect cannot represent N parts. The UI hides the full-archive option in that case. Drop the Pull Zone settings (or use a different storage as `defaultStorage`) if full-archive streaming matters more than direct CDN delivery.

## Retention and notes

* Retention deletes the oldest files under the job's sub-path once more than `retention.last` backup sets exist; see [Storages → Retention](/configuration/storages/overview#retention).
* The Pull Zone must point at the same Storage Zone you upload to; otherwise signed URLs return 404.
* `pullZoneHostname` accepts both bare hostnames (`my-zone.b-cdn.net`) and `https://...` URLs — snapr strips the scheme.

## Related

* [Storages overview](/configuration/storages/overview)
* [bunny.net as a source](/configuration/sources/bunny)
