git mv all tracked files from the nested padelnomics/ workspace directory to the git repo root. Merged .gitignore files. No code changes — pure path rename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
504 B
Bash
24 lines
504 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Padelnomics Manual Backup Script
|
|
|
|
BACKUP_DIR="./backups"
|
|
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
|
DB_PATH="./data/app.db"
|
|
|
|
mkdir -p "$BACKUP_DIR"
|
|
|
|
# Create backup using SQLite's backup command
|
|
sqlite3 "$DB_PATH" ".backup '$BACKUP_DIR/app_$TIMESTAMP.db'"
|
|
|
|
# Compress
|
|
gzip "$BACKUP_DIR/app_$TIMESTAMP.db"
|
|
|
|
echo "✅ Backup created: $BACKUP_DIR/app_$TIMESTAMP.db.gz"
|
|
|
|
# Clean old backups (keep last 7 days)
|
|
find "$BACKUP_DIR" -name "*.db.gz" -mtime +7 -delete
|
|
|
|
echo "🧹 Old backups cleaned"
|