Files
mivanchenko 156166b4e5 Add booking stack, client deploys, and back-office updates
- deploy/booking: shared Easy!Appointments stack with brand-matched
  wizard (flatpickr recolor, single-tenant provider hide, iframe
  auto-fit height reporter)
- deploy/clients: per-client isolated nginx compose stacks with
  _template scaffold, new-client.sh, and happynails live site
- deploy/backup: smb-db backup script
- n8n: booking-sync workflow; onboarding tweaks
- playbooks: lead-to-customer lifecycle + outreach
- templates: nail-studio landing previews
- backoffice: app/db/init/compose updates

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 16:10:15 +02:00

18 lines
616 B
Bash

#!/usr/bin/env bash
# Daily backup of smb-db (the CRM Postgres = source of truth). Keeps 14 days.
# Installed on the homelab at /home/mivanchenko/backups/bin/ and run via cron.
set -euo pipefail
DEST=/home/mivanchenko/backups/smb-crm
mkdir -p "$DEST"
TS=$(date +%Y%m%d-%H%M%S)
FILE="$DEST/smbcrm-$TS.sql.gz"
# pg_dump runs inside the container; gzip on the host.
docker exec smb-db pg_dump -U smbcrm -d smbcrm | gzip > "$FILE"
# keep the 14 most recent dumps, delete older
ls -1t "$DEST"/smbcrm-*.sql.gz 2>/dev/null | tail -n +15 | xargs -r rm -f
echo "$(date -Is) backup ok: $FILE ($(du -h "$FILE" | cut -f1))"