Prd/deploy/helpdesk-pg-backup.sh
Lucy Doupalů be9f14ce34 Helpdesk - operator console + patched GrapheneOS Dialer for call handling
A small helpdesk system: an office Pixel running a patched GrapheneOS Dialer
answers technician calls, records both call legs as separate channels, and a
Ruby backend transcribes them through Whisper and files an AI summary against
the caller.

Squashed to a single commit for sharing. No credentials are included; secrets
live outside the repo in /etc/helpdesk/env on the server or a gitignored
.claude/env.local locally. See .claude/env.local.example for the shape.

Start at README.md, then docs/architecture.md.
2026-07-27 18:50:32 +02:00

10 lines
463 B
Bash

#!/bin/bash
# Installed at /usr/local/sbin/helpdesk-pg-backup.sh, run nightly by helpdesk-pg-backup.timer as the
# postgres user. Custom-format dump of the helpdesk DB with 14-day retention.
# Restore: pg_restore --no-owner -d <target_db> /var/backups/helpdesk/helpdesk-<ts>.dump
set -euo pipefail
DIR=/var/backups/helpdesk
ts=$(date +%Y%m%d-%H%M%S)
umask 077
pg_dump -Fc helpdesk > "$DIR/helpdesk-$ts.dump"
find "$DIR" -name 'helpdesk-*.dump' -mtime +14 -delete