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

# Full example

> A complete annotated snapr.yaml covering logs, server, auth, and three jobs with S3, SFTP, encryption, splitting, and Telegram notifications.

This page shows a complete `snapr.yaml` that exercises the most common features: file logging, the web UI with auth, a file backup to S3, an encrypted PostgreSQL backup with Telegram notifications, and a large archive split into 1 GB parts. A working dev variant lives at [`examples/dev/snapr.yaml`](https://github.com/maximseshuk/snapr/blob/main/examples/dev/snapr.yaml).

```yaml snapr.yaml theme={null}
# File logging: JSON-line events, rotated by snapr.
logs:
  path: /var/log/snapr
  system: true
  perJob: true
  maxSizeMB: 100
  maxBackups: 7
  maxAgeDays: 30
  compress: true

# HTTP API and web UI. Secrets come from the environment via `env:`.
server:
  enabled: true
  address: '0.0.0.0:8080'
  secret: env:SNAPR_JWT_SECRET
  defaultLanguage: en
  auth:
    enabled: true
    username: admin
    password: env:SNAPR_ADMIN_PASSWORD
    tokenExpiration: 60
  permissions:
    allowBackupDownload: true
    allowManualRun: true
    showConfig: true
  ui:
    enabled: true

jobs:
  # Nightly file backup to S3, keeping one week of archives.
  - name: files-to-s3
    schedule: '0 2 * * *'
    compression: tar.gz
    sources:
      - type: local
        path: /var/data
        excludes: ['*.tmp', '*.log']
    storages:
      - name: s3-primary
        type: s3
        bucket: backups
        region: us-east-1
        accessKeyId: env:S3_KEY
        secretAccessKey: env:S3_SECRET
        storageClass: STANDARD_IA
    retention:
      last: 7

  # Encrypted PostgreSQL dump to local disk and offsite SFTP,
  # with a Telegram message on failure.
  - name: postgres-nightly
    schedule: '0 3 * * *'
    compression: tar.gz
    sources:
      - type: postgresql
        host: db.internal
        port: 5432
        username: postgres
        password: env:PG_PASSWORD
        database: app
    storages:
      - name: local-disk
        type: local
        path: /var/backups
      - name: offsite-sftp
        type: sftp
        host: offsite.example.com
        username: backup
        privateKey: /etc/snapr/keys/sftp_id_ed25519
        path: /snapr
    retention:
      last: 30
    encryption:
      type: openssl
      cipher: aes-256-cbc
      password: env:BACKUP_ENC_PASSWORD
    notifiers:
      - type: telegram
        botToken: env:TG_BOT_TOKEN
        chatId: '-1001234567890'
        onFailure: true

  # Weekly large archive, encrypted and split into 1 GB parts.
  - name: huge-archive-split
    schedule: '0 4 * * 0'
    compression: tar.gz
    sources:
      - type: local
        path: /var/lib/bigdata
    storages:
      - name: offsite-sftp
        type: sftp
        host: offsite.example.com
        username: backup
        privateKey: /etc/snapr/keys/sftp_id_ed25519
        path: /snapr/big
    retention:
      last: 4
    encryption:
      type: openssl
      password: env:BACKUP_ENC_PASSWORD
    split:
      chunkSize: 1GB
```

A few things to note:

* Every secret uses an [`env:` reference](/configuration/overview#environment-references), so the file itself contains nothing sensitive.
* `huge-archive-split` omits `cipher`; encryption falls back to the default `aes-256-cbc`. See [Encryption](/configuration/encryption).
* Splitting happens after compression and encryption; retention treats the whole part set as one backup. See [Splitter](/configuration/splitter).
* Each option is covered in detail on its own page: [Jobs](/configuration/jobs), [Sources](/configuration/sources/overview), [Storages](/configuration/storages/overview), [Notifiers](/configuration/notifiers/overview), [Server](/configuration/server/overview), and [Logs](/configuration/logs).
