#!/bin/bash
# Retention + prune for the azkaban restic repo. Separate from the backup job
# because prune is far more API- and CPU-expensive than backing up ~50 MB.
set -euo pipefail

source /root/.restic-env
export HOME=/root

exec restic \
    --password-file /root/.resticpwd \
    forget \
    --keep-within 30d \
    --prune
