Stats
Links
Categories
Help us improve
Share bugs, ideas, or general feedback.
npx claudepluginhub cameronsjo/obsidi-backupVault backup sidecar with AI commit messages and restic cloud storage
Share bugs, ideas, or general feedback.
A lightweight sidecar container that automatically backs up your Obsidian vault with git versioning and cloud storage via restic.
Obsidian Sync is great, but it's not a backup. This container provides:
/health for monitoring and orchestrationservices:
vault-backup:
image: ghcr.io/cameronsjo/obsidi-backup:latest
environment:
TZ: America/Chicago
# Storage backend (Azure example)
AZURE_ACCOUNT_NAME: mystorageaccount
AZURE_ACCOUNT_KEY: ${AZURE_ACCOUNT_KEY}
RESTIC_REPOSITORY: azure:obsidian-backup:/vault
RESTIC_PASSWORD: ${RESTIC_PASSWORD}
# Optional: AI commit messages
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
# Optional: Notifications
DISCORD_WEBHOOK_URL: ${DISCORD_WEBHOOK_URL}
volumes:
- /path/to/your/vault:/vault
ports:
- "8080:8080"
After starting, initialize the restic repository:
docker exec vault-backup restic init
┌─────────────────────────────────────────────────────────────┐
│ Obsidian Vault Backup │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌──────────┐ ┌────────┐ ┌─────────┐ │
│ │ Watchdog│───▶│ Debounce │───▶│ Git │───▶│ Restic │ │
│ │ Monitor │ │ (5 min) │ │ Commit │ │ Backup │ │
│ └─────────┘ └──────────┘ └────────┘ └─────────┘ │
│ │ │ │ │
│ │ ▼ │ │
│ │ ┌──────────┐ │ │
│ │ │ LLM │ │ │
│ │ │ (Haiku) │ │ │
│ │ └──────────┘ │ │
│ │ ▼ │
│ │ ┌──────────┐ ┌───────────┐ │
│ └────────▶│ Health │ │ Notify │ │
│ │ Server │ │ (Discord) │ │
│ └──────────┘ └───────────┘ │
│ │ │
└──────────────────────┼──────────────────────────────────────┘
▼
:8080/health
Flow:
Restic supports many backends. Set RESTIC_REPOSITORY accordingly:
| Backend | Repository Format | Additional Env Vars |
|---|---|---|
| Azure Blob | azure:container:/path | AZURE_ACCOUNT_NAME, AZURE_ACCOUNT_KEY |
| AWS S3 | s3:s3.amazonaws.com/bucket | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
| Backblaze B2 | b2:bucket:/path | B2_ACCOUNT_ID, B2_ACCOUNT_KEY |
| SFTP | sftp:user@host:/path | SSH key or RESTIC_PASSWORD |
| Local | /path/to/backup | - |
| REST Server | rest:http://host:8000/ | - |
See restic documentation for all options.
| Variable | Description |
|---|---|
RESTIC_REPOSITORY | Restic repository URL |
RESTIC_PASSWORD | Restic encryption password |