# OneDrive → Health-Agent mirror setup (Hostinger VPS) ## Current state - Rubric Second Brain health-only trial is running against: - `/opt/data/trials/rubric-second-brain-health` - Health mirror path is: - `/opt/data/synced/Health-Agent` - Sync helper script exists: - `/opt/data/synced/Health-Agent/sync.sh` - `rclone` is **not installed yet** on this VPS. ## Recommended rollout 1. Install `rclone` 2. Configure a OneDrive remote named `jacqui-onedrive` 3. Preview the sync with dry-run 4. Run the first live baseline with `--resync` 5. Run later syncs without `--resync` 6. Only after confidence, consider an automated schedule ## 1) Install rclone On this Debian 13 VPS, as a sudo-capable shell user: ```bash sudo apt-get update sudo apt-get install -y rclone ``` Verify: ```bash rclone version ``` ## 2) Configure the OneDrive remote Run: ```bash rclone config ``` Then choose: - `n` = new remote - name = `jacqui-onedrive` - storage = `onedrive` - account type = your personal OneDrive / Microsoft account - complete the browser/device auth flow When finished, verify: ```bash rclone listremotes ``` You should see: ```bash jacqui-onedrive: ``` ## 3) Preview the sync safely The helper script is dry-run by default: ```bash /opt/data/synced/Health-Agent/sync.sh ``` This should show what `rclone bisync` would do **without making changes**. ## 4) First live baseline sync After the dry-run output looks correct: ```bash /opt/data/synced/Health-Agent/sync.sh --resync --live ``` Use `--resync` **only on the first live baseline**. ## 5) Subsequent syncs After the first baseline succeeds: ```bash /opt/data/synced/Health-Agent/sync.sh --live ``` ## 6) Suggested automation (later) Do not automate until the manual runs look correct. Example cron entry for every 6 hours: ```cron 0 */6 * * * /opt/data/synced/Health-Agent/sync.sh --live >> /opt/data/synced/Health-Agent/sync.log 2>&1 ``` ## Safety notes - This sync script refuses to run until the `jacqui-onedrive` remote exists. - It uses `rclone bisync`, not a silent destructive sync by default. - Default mode is `--dry-run`. - The first live sync should be watched manually. - Because this is health data, review the first few syncs before scheduling. ## If you want one-way pull first instead of bisync If you decide you want the safest possible start, use a one-way preview manually: ```bash rclone sync "jacqui-onedrive:Documents/My Cabinets/Personal/Health - Agent" \ "/opt/data/synced/Health-Agent" --dry-run ``` Then live: ```bash rclone sync "jacqui-onedrive:Documents/My Cabinets/Personal/Health - Agent" \ "/opt/data/synced/Health-Agent" ``` That is more conservative than bisync, but it will not push VPS-side changes back to OneDrive.