Skip to content

my_backup: Project Restructure + Email Fix

Section titled “my_backup: Project Restructure + Email Fix”

Date: 2026-03-30 Project: D:\FSS\Software\Utils\PythonUtils\my_backup


1. Project Restructured to World-Class Python Layout

Section titled “1. Project Restructured to World-Class Python Layout”

All standalone scripts moved from root into src/my_backup/ as a proper Python package. Shell wrappers (run_*.sh) deleted. All utilities registered as uv run <command> entry points in pyproject.toml. Non-code files organized into docs/, config/, and tests/.

Weekly status report emails had silently failed since ~2026-03-22. Root cause: Google App Password expired. Fixed by regenerating App Password. Also fixed a silent failure vulnerability — send_status_report.py now exits non-zero when email delivery fails, so cron captures it as an error.

check_backups was incorrectly added to WSL cron (uses Windows paths + Windows Kopia binary). Removed from WSL crontab; runs from Windows PowerShell / Task Scheduler instead.

WSL cron jobs now use UV_PROJECT_ENVIRONMENT=/home/ta/.venvs/my_backup (Linux-only path). Windows uv run creates its own .venv in the project directory. No more conflicts.

5. Backblaze B2 Mirror Added (replaces pCloud as primary cloud mirror)

Section titled “5. Backblaze B2 Mirror Added (replaces pCloud as primary cloud mirror)”

pCloud proved unreliable as a required cloud mirror (app must be running and P: drive mounted). Replaced with Backblaze B2 via rclone as the primary required: true cloud mirror for the Active Kopia repository. pCloud demoted to required: false — still syncs opportunistically but does not block or fail the backup run.

What changed:

  • config.yaml: B2 mirror entry added (engine: rclone, credentials from .env); pCloud set to required: false; pCloud removed from health_checks required paths
  • src/my_backup/tasks.py: rclone branch added in mirrors() — detects engine: rclone, calls rclone sync with credentials from .env, no rclone config file required
  • .env: B2_KEY_ID, B2_APP_KEY, B2_BUCKET added (not committed)
  • README.md: updated mirror section, architecture diagram, config docs, and .env reference to reflect B2 as primary cloud mirror

Why rclone: B2 is a cloud API — Robocopy only works against Windows drive letters. rclone is the cloud-native equivalent with chunked uploads, retries, and B2 API support. No config file needed — credentials passed directly from .env.


Full change log with lessons: D:\FSS\Software\Utils\PythonUtils\my_backup\logs\2026-03-29_project-restructure.md


Review then delete: D:\FSS\Software\Utils\PythonUtils\my_backup\docs\superpowers\

  • specs/2026-03-29-project-restructure-design.md — superpowers planning artifact
  • plans/2026-03-29-project-restructure.md — superpowers planning artifact

All outcomes are documented in README.md and the log above. These files serve no ongoing purpose.