LifeMate — Personal, Family & Learning Companion
feat/standalone-weekly-planner
chore/phase1-repository-cleanup
deploy/stable-web-apk
deployment-static
design/mobile-accessibility-v2
design/mobile-navigation-review
docs/child-education-access-decision
docs/offline-data-rescue-options
docs/owner-guide-and-delivery-plan
docs/phase1-policy-options
docs/public-review-live-2026-10-15
feat/aparat-learning-library
feat/child-device-safety
feat/child-identity-schema
feat/flutter-mobile-navigation
feat/learning-content-operations
feat/local-signing-preflight
feat/online-family-stage0
feat/personal-encrypted-recovery
feat/private-planner-series-api
feat/public-review-page
feat/standalone-weekly-planner
feat/weekly-planner-android
final-feature-1/iran-family-school
fix/auth-abuse-expiry-safety
fix/auth-expiry-after-lock
fix/backend-request-safety
fix/lifeguide-bootstrap-naming-ci
fix/lifeguide-pages-qa-base-preflight
fix/lifeguide-qa-pages-env-deployment
fix/local-task-persistence
fix/managed-child-session-boundary
fix/personal-jalali-dates
fix/personal-notification-controls
fix/personal-upgrade-delivery-guard
fix/sms-approval-gates
fix/study-duration-display
infra/cloudflare-neon-migration
infra/lifeguide-cloudflare-qa
infra/lifeguide-github-pages-qa
infra/lifeguide-supabase-qa
main
phase-1/foundation-completion
phase-2/product-foundation-identity
phase-3/planner-school-family-core
phase-4/ai-learning-wellbeing
phase-5/hardening-observability-release
test/android-reminder-acceptance
test/personal-notification-settings
test/personal-recovery-acceptance
test/role-entry-apk
| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | umask 077 |
| 4 | keep_days="${BACKUP_KEEP_DAYS:-14}" |
| 5 | [[ "$keep_days" =~ ^[0-9]+$ && "$keep_days" -ge 1 ]] || { echo 'Invalid backup retention' >&2; exit 1; } |
| 6 | output="$(mktemp "/backups/.LifeGuide-$(date -u +%Y%m%dT%H%M%SZ).XXXXXX")" |
| 7 | trap 'rm -f "$output"' EXIT |
| 8 | /opt/lifeguide/backup.sh "$output" |
| 9 | pg_restore --list "$output" >/dev/null |
| 10 | completed="/backups/LifeGuide-${output##*/.LifeGuide-}.dump" |
| 11 | mv -n "$output" "$completed" |
| 12 | [[ ! -e "$output" ]] || { echo 'Refusing to replace an existing backup' >&2; exit 1; } |
| 13 | date -u +%Y-%m-%dT%H:%M:%SZ >/backups/last-success |
| 14 | find /backups -maxdepth 1 -type f -name 'LifeGuide-*.dump' -mtime +"$keep_days" -delete |