quorlasocial/deploy/backup.sh
metatroncubeswdev c309581df0 Initial commit: Quorla social media manager
Dashboard (content library, publishing queue with approvals, inbox, team
management, AI runs), Meta connector, branded PDF reports, agent skills,
and Docker packaging (Dockerfile, docker-compose with Caddy HTTPS,
backup and path-relocation scripts).

Client data, live data and secrets are excluded via .gitignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:02:29 -04:00

13 lines
641 B
Bash

#!/usr/bin/env sh
# Back up Quorla's live data (logins, library uploads, queue, client files, reports, branding, .env).
# Run from the project folder: sh deploy/backup.sh → backups/quorla-YYYY-MM-DD-HHMM.tar.gz
# Keeps the newest 14 backups. Schedule daily with cron (see docs/hosting.html, "Backups").
set -eu
cd "$(dirname "$0")/.."
mkdir -p backups
name="backups/quorla-$(date +%Y-%m-%d-%H%M).tar.gz"
tar -czf "$name" --exclude='data/**/*.lock' .env data clients team reports branding
chmod 600 "$name"
ls -1t backups/quorla-*.tar.gz | tail -n +15 | xargs -r rm -f
echo "Backup written: $name ($(du -h "$name" | cut -f1))"