vault backup: 2026-08-21 08:23:36

This commit is contained in:
2026-08-21 08:23:36 -04:00
parent 193105482b
commit 2f39288102
+291 -124
View File
@@ -79,41 +79,28 @@ For the README, Id use something like this:
# SecondBrain # SecondBrain
Personal work and leadership knowledge system built with Obsidian. Personal work and leadership knowledge system built with Obsidian.
The vault is backed up through Git and a private Gitea repository. The vault is backed up through Git and a private Gitea repository.
The goal is to make the environment easy to restore on a new computer with minimal manual reconstruction. The goal is to make the environment easy to restore on a new computer with minimal manual reconstruction.
--- ---
# Quick Restore # Quick Restore
## 1. Clone the vault ## 1. Clone the vault
```bash ```bash
git clone <GITEA_REPOSITORY_URL> git clone <GITEA_REPOSITORY_URL>
cd SecondBrain cd SecondBrain
```
## 2. Restore the folder structure ## 2. Restore the folder structure
```bash
./scripts/bootstrap-vault.sh ./scripts/bootstrap-vault.sh
```
## 3. Open the vault in Obsidian ## 3. Open the vault in Obsidian
@@ -123,87 +110,141 @@ Open Obsidian and choose:
Select the cloned `SecondBrain` directory. Select the cloned `SecondBrain` directory.
## 4. Restore plugins
Enable Community Plugins in Obsidian and install the plugins listed below.
Some plugin configuration is stored in `.obsidian/` and may already be restored by Git depending on what is tracked.
Machine-specific workspace state is intentionally excluded.
--- ---
# Required Obsidian Plugins # Obsidian Plugins
Install and enable: ## Core Workflow
- Templater These plugins are important to the functionality of SecondBrain.
- Dataview
- Obsidian Git
Check `10 Knowledge/Templates` for the templates used by the system. ### Templater
Important machine-specific Obsidian files such as `workspace.json` are intentionally not synchronized. Used for dynamic note creation, automatic file naming, folder creation, dates, and structured templates.
Templates are stored in:
```text
10 Knowledge/Templates/
```
Important: YAML/frontmatter must remain at the very beginning of templates. Do not place Templater JavaScript before the YAML block.
### Dataview
Used to generate dynamic lists and views from note properties and metadata.
### Obsidian Git
Provides Git integration and automatic backup from the desktop vault.
Repository synchronization is done against a private Gitea repository.
### Auto GitKeep
Automatically creates `.gitkeep` files inside empty directories so the vault structure can be preserved by Git.
This is particularly useful because Git does not normally track empty directories.
---
# Navigation and Editing
These plugins improve the Obsidian interface but are not required for the underlying vault structure.
### Notebook Navigator
Replaces the standard Obsidian file explorer with a two-pane navigation interface.
### Folder Links
Allows folder links to reveal the corresponding folder in the navigation interface.
### Editing Toolbar
Provides a more visual editing toolbar with commonly used Markdown commands.
### Iconic
Adds custom icons to folders, files, properties, bookmarks, and other Obsidian interface elements.
### Omnisearch
Provides enhanced full-vault search.
---
# Integration
### Local REST API with MCP
Provides a local REST API and MCP interface for interacting with the vault from external tools and local automation.
This is an advanced integration and is not required for basic vault operation.
Do not expose the REST API directly to the public Internet.
---
# Optional / Disabled Plugins
### Settings Search
Provides search across Obsidian settings.
Currently installed but disabled.
--- ---
# Vault Structure # Vault Structure
```text
00 Inbox/ 00 Inbox/
└── MeetMic/ └── MeetMic/
10 Knowledge/ 10 Knowledge/
├── CTO Academy/ ├── CTO Academy/
├── Quotes/ ├── Quotes/
├── Templates/ ├── Templates/
└── Principles.md └── Principles.md
20 Work/ 20 Work/
├── Contracts/ ├── Contracts/
│ ├── Active/ │ ├── Active/
│ └── Archive/ │ └── Archive/
├── Decisions/ ├── Decisions/
├── Ideas/ ├── Ideas/
├── Journal/ ├── Journal/
├── KPIs/ ├── KPIs/
├── Meetings/ ├── Meetings/
│ ├── Internal/ │ ├── Internal/
│ └── Vendors/ │ └── Vendors/
├── Projects/ ├── Projects/
├── Team/ ├── Team/
├── Tracking/ ├── Tracking/
└── Weekly Review/ └── Weekly Review/
90 Archives/ 90 Archives/
```
Employee and monthly 1-1 folders are created dynamically by Templater. Employee and monthly 1-1 folders are created dynamically by Templater.
Example: Example:
```text
20 Work/Team/ 20 Work/Team/
└── Employee Name/ └── Employee Name/
└── 1-1/ └── 1-1/
└── 08/ └── 08/
```
--- ---
@@ -213,80 +254,92 @@ MeetMic is used for local meeting transcription and/or summaries.
MeetMic should output Markdown or transcript files into: MeetMic should output Markdown or transcript files into:
```text
00 Inbox/MeetMic/ 00 Inbox/MeetMic/
```
The Inbox is intentionally a temporary landing area. The Inbox is intentionally a temporary landing area.
After reviewing a MeetMic note: After reviewing a MeetMic note:
- move useful meeting information into `20 Work/Meetings` - move useful meeting information into `20 Work/Meetings`
- extract decisions into `20 Work/Decisions` - extract decisions into `20 Work/Decisions`
- extract action items into Jira, Twos, or Monday - extract action items into Jira, Twos, or Monday
- delete/archive the raw MeetMic output when no longer useful - delete/archive the raw MeetMic output when no longer useful
## MeetMic machine setup
## MeetMic Machine Setup
MeetMic itself is not stored in this vault. MeetMic itself is not stored in this vault.
On a new computer: On a new computer:
1. Install MeetMic. 1. Install MeetMic.
2. Configure its output folder to point to: 2. Configure its output folder to point to:
```text
<VAULT_PATH>/00 Inbox/MeetMic <VAULT_PATH>/00 Inbox/MeetMic
```
3. Confirm Markdown output is enabled. 3. Confirm Markdown output is enabled.
4. Test with a short recording. 4. Test with a short recording.
--- ---
# Contract Processing Integration # Contract Processing Integration
Contract PDFs are deliberately NOT stored inside the Obsidian vault. Contract PDFs are deliberately **not stored inside the Obsidian vault**.
The local contract processor lives separately, typically at: The local contract processor lives separately, typically at:
```text
~/Herd/scripts/obsidian-contracts ~/Herd/scripts/obsidian-contracts
```
Expected source structure: Expected source structure:
```text
obsidian-contracts/ obsidian-contracts/
├── Algolia/ ├── Algolia/
│ └── 2024/ │ └── 2024/
│ └── contract.pdf │ └── contract.pdf
├── Directus/ ├── Directus/
│ └── 2026/ │ └── 2026/
│ └── contract.pdf │ └── contract.pdf
├── process_contracts.py ├── process_contracts.py
├── prompt.md ├── prompt.md
├── .env ├── .env
└── logs/ └── logs/
```
The vendor folder name is the canonical vendor name. The vendor folder name is the canonical vendor name.
Example: Example:
```text
Directus/2026/ Directus/2026/
```
will generate: will generate:
```text
Directus - 2026-2027.md Directus - 2026-2027.md
```
even if the contract itself names TFO as the purchaser. even if the contract itself names TFO as the purchaser.
Generated contract notes are written to: Generated contract notes are written to:
```text
20 Work/Contracts/Active/ 20 Work/Contracts/Active/
```
--- ---
@@ -296,27 +349,41 @@ Generated contract notes are written to:
Create a virtual environment: Create a virtual environment:
```bash
cd ~/Herd/scripts/obsidian-contracts cd ~/Herd/scripts/obsidian-contracts
python3 -m venv .venv python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
Install dependencies:
pip install requests python-dotenv pip install requests python-dotenv
```
## PDF extraction When returning to the project later:
```bash
cd ~/Herd/scripts/obsidian-contracts
source .venv/bin/activate
```
When finished:
```bash
deactivate
```
## PDF Extraction
Install Poppler: Install Poppler:
```bash
brew install poppler brew install poppler
```
This provides: This provides:
```text
pdftotext pdftotext
```
## Local AI ## Local AI
@@ -324,63 +391,69 @@ Ollama is used for local contract extraction.
Install Ollama and confirm: Install Ollama and confirm:
```bash
ollama --version ollama --version
```
The current contract model is: The current contract model is:
```text
contract-reader contract-reader
```
Example base model: Example base model:
```text
qwen3:1.7b qwen3:1.7b
```
The dedicated model should use a limited context to avoid excessive memory usage. The dedicated model should use a limited context to avoid excessive memory usage.
Example Modelfile: Example `Modelfile`:
```text
FROM qwen3:1.7b FROM qwen3:1.7b
PARAMETER num_ctx 4096 PARAMETER num_ctx 4096
PARAMETER temperature 0.1 PARAMETER temperature 0.1
PARAMETER num_predict 1200 PARAMETER num_predict 1200
```
Create it: Create it:
```bash
ollama create contract-reader -f Modelfile ollama create contract-reader -f Modelfile
```
--- ---
# Contract Processor Environment # Contract Processor Environment
The local `.env` file is NOT committed to Git. The local `.env` file is **not committed to Git**.
Example: Example:
```text
OBSIDIAN_VAULT="/Users/YOUR_USER/Documents/Obsidian Vault/SecondBrain" OBSIDIAN_VAULT="/Users/YOUR_USER/Documents/Obsidian Vault/SecondBrain"
CONTRACT_OUTPUT="20 Work/Contracts/Active" CONTRACT_OUTPUT="20 Work/Contracts/Active"
OLLAMA_BASE_URL="http://127.0.0.1:11434" OLLAMA_BASE_URL="http://127.0.0.1:11434"
OLLAMA_MODEL="contract-reader" OLLAMA_MODEL="contract-reader"
MAX_CONTEXT_CHARS="5000" MAX_CONTEXT_CHARS="5000"
```
Then process one contract: Process one contract:
```bash
python3 process_contracts.py --folder Algolia/2024 python3 process_contracts.py --folder Algolia/2024
```
Force regeneration: Force regeneration:
```bash
python3 process_contracts.py --folder Algolia/2024 --force python3 process_contracts.py --folder Algolia/2024 --force
```
--- ---
@@ -389,69 +462,93 @@ python3 process_contracts.py --folder Algolia/2024 --force
The processor: The processor:
1. extracts PDF text locally using `pdftotext` 1. extracts PDF text locally using `pdftotext`
2. reduces the contract to important sections 2. reduces the contract to important sections
3. sends only those excerpts to local Ollama 3. sends only those excerpts to local Ollama
4. extracts commercial and renewal information 4. extracts commercial and renewal information
5. validates important renewal clauses against the actual PDF text 5. validates important renewal clauses against the actual PDF text
6. creates an Obsidian Markdown contract record 6. creates an Obsidian Markdown contract record
Nothing is intentionally sent to a cloud AI provider. Nothing is intentionally sent to a cloud AI provider.
Important renewal fields include: Important renewal fields include:
```text
auto_renewal auto_renewal
renewal_term_months renewal_term_months
customer_notice_days customer_notice_days
vendor_notice_days vendor_notice_days
notice_deadline notice_deadline
renewal_increase_percent renewal_increase_percent
renewal_pricing_rule renewal_pricing_rule
```
The generated note also contains source evidence from the PDF. The generated note also contains source evidence from the PDF.
--- ---
# Git Ignore # Git Configuration
Recommended `.gitignore` entries: ## Recommended `.gitignore`
```gitignore
# macOS # macOS
.DS_Store .DS_Store
# Obsidian machine-specific state # Obsidian machine-specific state
.obsidian/workspace.json .obsidian/workspace.json
.obsidian/workspace-mobile.json .obsidian/workspace-mobile.json
# PDFs should never be stored in the vault repository # PDFs should never be stored in the vault repository
*.pdf *.pdf
```
The contract automation repository should additionally ignore: The contract automation repository should additionally ignore:
```gitignore
.env .env
.venv/ .venv/
logs/ logs/
token.json token.json
credentials.json credentials.json
*.pdf *.pdf
```
## `.obsidian` Strategy
Do not ignore the entire `.obsidian/` directory.
Keeping selected Obsidian configuration in Git makes it much easier to reproduce the vault on another computer.
Machine-specific state such as the following should remain ignored:
```text
.obsidian/workspace.json
.obsidian/workspace-mobile.json
```
Plugin configuration can be synchronized where appropriate.
---
# Mobile
The mobile vault may use GitSync rather than the Obsidian Git community plugin.
Mobile and desktop should synchronize against the same private Gitea repository.
Avoid making conflicting edits to the same note simultaneously on multiple devices.
Machine-specific mobile workspace state is excluded through:
```text
.obsidian/workspace-mobile.json
```
--- ---
@@ -460,56 +557,126 @@ credentials.json
The following must be restored separately: The following must be restored separately:
- Ollama models - Ollama models
- MeetMic application/settings - MeetMic application/settings
- contract PDFs - contract PDFs
- `~/Herd/scripts/obsidian-contracts` unless stored in its own private repository - `~/Herd/scripts/obsidian-contracts` unless stored in its own private repository
- `.env` - `.env`
- authentication tokens - authentication tokens
- local application settings - local application settings
- Git/Gitea credentials
- GitSync application configuration
--- ---
# Recommended Recovery Strategy # Recommended Recovery Strategy
Maintain two private Git repositories: Maintain two private Git repositories:
```text
SecondBrain SecondBrain
└── Obsidian content, templates, configuration and structure
└── Obsidian content, templates and structure
obsidian-automation obsidian-automation
└── scripts, prompts, Modelfiles and setup documentation └── scripts, prompts, Modelfiles and setup documentation
```
Never commit: Never commit:
- contracts - contracts
- PDFs - PDFs
- secrets - secrets
- `.env` - `.env`
- authentication tokens - authentication tokens
--- ---
# Recovery Checklist # Recovery Checklist
After moving to a new computer: After moving to a new computer:
- [ ] Install Git ## Vault
- [ ] Clone SecondBrain from Gitea
- [ ] Run `bootstrap-vault.sh` - Install Git
- [ ] Install Obsidian
- [ ] Install Templater - Clone SecondBrain from Gitea
- [ ] Install Dataview
- [ ] Install Obsidian Git - Run `bootstrap-vault.sh`
- [ ] Configure MeetMic output
- [ ] Install Python - Install Obsidian
- [ ] Install Poppler
- [ ] Install Ollama - Open SecondBrain as a vault
- [ ] Restore/create `contract-reader`
- [ ] Clone/copy contract automation scripts
- [ ] Recreate `.env` ## Obsidian Plugins
- [ ] Test contract extraction
- [ ] Test Git pull/push - Install Templater
- Install Dataview
- Install Obsidian Git
- Install Auto GitKeep
- Install Notebook Navigator
- Install Folder Links
- Install Editing Toolbar
- Install Iconic
- Install Omnisearch
- Install Local REST API with MCP
- Verify Templater template folder
- Verify Git configuration
- Verify plugin settings
## Integrations
- Configure MeetMic output
- Install Python
- Install Poppler
- Install Ollama
- Restore/create `contract-reader`
- Clone/copy contract automation scripts
- Recreate `.env`
- Test contract extraction
## Synchronization
- Test Git pull
- Test Git commit/push
- Configure GitSync on mobile if required
- Test mobile pull
- Test mobile push