Files
nac 777607dc29 chore(repo): establish project baseline
Track the source-of-truth code, skills, bootstrap rules, docs, and packaging files before adding new features.

Exclude local vault config, generated skill mirrors, temporary exports, virtual environments, and business data files from version control.

Validation: inspected staged file list and git ignored status before commit.
2026-07-05 11:03:40 +00:00

84 lines
1.8 KiB
Markdown

# Linux migration
The Linux server does not need Obsidian Desktop. The deployable system is the
markdown vault, archived sources, metadata, SQLite file index, QMD collections,
and the `obsidian-wiki` CLI code.
## Build a bundle on the source machine
```bash
cd /path/to/obsidian-wiki
scripts/package-linux-migration.sh \
--vault "/path/to/vault" \
--out ./dist
```
The script creates:
```text
dist/obsidian-wiki-linux-<UTC>.tar.gz
dist/obsidian-wiki-linux-<UTC>.tar.gz.sha256
```
Copy the archive to the server:
```bash
scp dist/obsidian-wiki-linux-*.tar.gz user@server:/tmp/
```
## Deploy on Linux
```bash
ssh user@server
cd /tmp
tar -xzf obsidian-wiki-linux-*.tar.gz
cd obsidian-wiki-linux-*
sudo bash deploy-linux-server.sh \
--install-dir /opt/obsidian-wiki \
--vault-dir /srv/bjd-vault \
--bot-view-dir /srv/bjd-bot-views
```
For a non-root deployment:
```bash
bash deploy-linux-server.sh \
--install-dir "$HOME/obsidian-wiki" \
--vault-dir "$HOME/bjd-vault" \
--bot-view-dir "$HOME/bjd-bot-views"
```
## What deployment does
- Copies the repo to `--install-dir`.
- Copies the mother vault to `--vault-dir`.
- Writes `.env` and `~/.obsidian-wiki/config` with Linux paths.
- Rebuilds `_meta/file-assets.sqlite`.
- Audits bot ACLs.
- Exports all configured bot views.
- Creates QMD collections if `qmd` is installed.
## Robot isolation
Robots should not index the mother vault directly. Use derived bot-view
directories or their matching QMD collections:
```text
/srv/bjd-bot-views/public-product-bot/wiki
/srv/bjd-bot-views/sales-bot/wiki
/srv/bjd-bot-views/quality-bot/wiki
/srv/bjd-bot-views/quality-bot/sources
```
QMD collections are named:
```text
bjd-wiki
bjd-wiki-public-product-bot
bjd-wiki-sales-bot
bjd-wiki-quality-bot
bjd-wiki-engineering-bot
bjd-wiki-management-bot
```