Sync content and data between local and cloud environments.


Check Cloud Status

{ "command": "cloud status" }

Check authentication:

{ "command": "cloud auth whoami" }

Sync Files to Cloud

Dry Run First

{ "command": "cloud sync push --dry-run --verbose" }

Execute Sync

{ "command": "cloud sync push --verbose" }

This syncs files from storage/, not database content.


Sync Down from Cloud

{ "command": "cloud sync pull" }
{ "command": "cloud sync pull --dry-run" }

Sync Up to Cloud

{ "command": "cloud sync push" }
{ "command": "cloud sync push --dry-run" }

Local Content Sync (DB <-> Disk)

View Diff

{ "command": "cloud sync local content --dry-run" }

Export DB to Disk

{ "command": "cloud sync local content --direction to-disk" }

Import Disk to DB

{ "command": "cloud sync local content --direction to-db" }

Sync Specific Source

{ "command": "cloud sync local content --source blog --direction to-disk" }

Skills Sync

View Diff

{ "command": "cloud sync local skills --dry-run" }

Execute Sync

{ "command": "cloud sync local skills" }

Database Comparison

Count Local Content

{ "command": "infra db query \"SELECT COUNT(*) FROM markdown_content\"" }

Count Cloud Content

{ "command": "cloud db query --profile <profile-name> \"SELECT COUNT(*) FROM markdown_content\"" }

Compare Sources

{ "command": "infra db query \"SELECT source, COUNT(*) FROM markdown_content GROUP BY source\"" }
{ "command": "cloud db query --profile <profile-name> \"SELECT source, COUNT(*) FROM markdown_content GROUP BY source\"" }

Troubleshooting

UUID parsing error: Local profile has non-UUID tenant ID. Switch to a cloud profile first with admin session switch <profile-name>.

No content synced (0 items): cloud sync push only syncs files, not database content. Export content to disk first, then sync files.

Cloud DB connection failed: Check profile with cloud profile show <profile-name> and ensure external_db_access: true in tenant config.


Quick Reference

Task Command
Cloud status cloud status
Auth check cloud auth whoami
Push files cloud sync push
Sync down cloud sync pull
Sync up cloud sync push
Export to disk cloud sync local content --direction to-disk
Import to DB cloud sync local content --direction to-db
Sync skills cloud sync local skills
Cloud DB query cloud db query --profile <name> "<SQL>"
Local DB query infra db query "<SQL>"