# Memory Log: Backup System for Computer Reset Date: 2026-01-19 --- ## What Was Done Created comprehensive backup and restore system to protect all work from computer reset. --- ## Files Created | File | Purpose | |------|---------| | `backup_before_reset.sh` | Creates backup of all critical data | | `restore_after_reset.sh` | Restores all critical data | | `RESET-IMPACT-ANALYSIS.md` | Detailed analysis of what's at risk | | `BACKUP-RESTORE-QUICK-REF.md` | Quick reference guide | --- ## What's Protected ### 🔴 Critical (Lost on Reset - Must Restore) - **Cron jobs** (6 jobs) - Daily pickle motivation to Stevan (5:45 PM) - Daily anus fact (9:00 AM) - Daily Remix Sniper scan (9:00 AM) - Weekly remix stats update (Sundays 10:00 AM) - Weekly validation report (Sundays 11:00 AM) - Daily text to Jake Smith (9:10 PM) - **Launchd service** (Remi bot auto-restart) - **PostgreSQL database** (remix_sniper schema) - **Tracking data** - `predictions.json` (8 predictions) - `remixes.json` (1 remix outcome) - `snapshots/` (daily chart snapshots) - **Environment files** - `DISCORD_BOT_TOKEN` - `DATABASE_URL` ### 🟡 Important (May Survive - But Backed Up) - Project code (`~/projects/remix-sniper/`) - Clawdbot workspace (`~/.clawdbot/workspace/`) - Custom scripts (`pickle_motivation.sh`, `daily-anus-fact.sh`) --- ## Usage ### Before Reset ```bash # 1. Run backup ~/.clawdbot/workspace/backup_before_reset.sh # 2. Copy to external storage rsync -av ~/.clawdbot/workspace/backup-before-reset-* /Volumes/ExternalDrive/ ``` ### After Reset ```bash # 1. Copy from external storage rsync -av /Volumes/ExternalDrive/backup-before-reset-* ~/.clawdbot/workspace/ # 2. Run restore ~/.clawdbot/workspace/restore_after_reset.sh ~/.clawdbot/workspace/backup-before-reset-YYYYMMDD-HHMMSS ``` --- ## Backup Contents ``` backup-before-reset-YYYYMMDD-HHMMSS/ ├── crontab-backup.txt # 6 cron jobs ├── launchd/ # plist files │ └── com.jakeshore.remix-sniper.plist ├── remix_sniper-db.sql # Full DB dump ├── remix-sniper/ │ └── tracking/ │ ├── predictions.json # 8 predictions │ ├── remixes.json # 1 remix outcome │ └── snapshots/ # Daily snapshots ├── env-files/ │ └── .env # API tokens, DB URL ├── clawdbot-workspace/ # All workspace files ├── scripts/ # Custom shell scripts └── sha256-checksums.txt # File integrity ``` --- ## Verification Commands ```bash # Check cron jobs (should have 6) crontab -l # Check launchd service launchctl list | grep remix-sniper # Check database psql -d remix_sniper -c "\dt" # Check tracking data ls -la ~/.remix-sniper/tracking/ # Check bot logs tail -f ~/projects/remix-sniper/bot.log ``` --- ## Next Steps 1. **Run backup** before reset 2. **Copy to external storage** 3. **Verify backup contents** 4. **After reset, run restore script** 5. **Run verification commands** 6. **Test Remi bot in Discord** --- ## Notes - Backup scripts are executable - SHA256 checksums verify file integrity - Restore script verifies checksums before restoring - PostgreSQL database is currently empty (schema exists, no data) - All important data is in JSON files (predictions, remixes) --- ## Questions? If anything goes wrong: 1. Check backup directory exists 2. Verify checksums: `shasum -c sha256-checksums.txt` 3. Manually restore specific items if script fails 4. Tag Buba in Discord