Use several Macs with one archive
If you use more than one Mac, they can all sync into one archive. The archive lives in a shared folder, and one Mac builds the search index.
- one database per source
<db>.lockwhile a Mac writes- change markers for the indexing Mac
- the archived-sources list
Set it up
Section titled “Set it up”-
Point every Mac at the shared folder.
Terminal window otso config set sources-dir /Volumes/<share>/otso/sourcesotso config set data-dir ~/.otso/datasources-diris the archive: one database per source.data-diris the search index. Keep the index on a local disk, because the indexer’s parallel writes don’t work over a network share. -
Sync on a schedule on each Mac.
Terminal window otso schedule installThis syncs every hour. See Schedule sync.
-
Choose which Mac syncs what.
Open the Sources panel with
otso config sourceson each Mac. Untick a source on one Mac to leave it to another. -
Pick the Mac that holds the index. On that Mac:
Terminal window otso schedule install-watchIt prints the Mac’s device name. On every other Mac:
Terminal window otso config set index-device <that name>
What happens after that
Section titled “What happens after that”- No overwriting. Each write takes a
<db>.lockfile next to the database on the share. A second Mac that wants the same source skips it with a note saying which Mac has it, and picks it up on its next run. A lock left by a run that died is cleared after six hours, or straight away when it belonged to this Mac. - Safe copies. A database is copied to the share under a temporary name and size-checked before it replaces the real one.
- One index. A sync on another Mac that stores something new leaves a small marker on the share. The indexing Mac checks every minute and re-indexes only when there’s a marker. The watch, the hourly sync and a manual
otso indexnever run at the same time. - Share not mounted. A sync stops, rather than writing into an empty folder where the share should be.
What’s shared and what’s per Mac
Section titled “What’s shared and what’s per Mac”| Data | How it’s stored |
|---|---|
| Messages, Notes, Photos, Calendar | One source each. They sync through iCloud, so the same item from two Macs is stored once |
| Browser history (Safari, Chrome, Arc, Dia, Helium) | One source per Mac, so search shows which Mac a visit came from |
| Accounts (Readwise, Mastodon and so on) | One source each. Any Mac can sync them |
| Archived sources | One list, shared by every Mac |
| Which sources a Mac syncs | Per Mac |
| Credentials | Per Mac, in ~/.otso/config |
A Mac’s name comes from its hostname the first time, and can be changed with otso config set device <name>.
Undo it
Section titled “Undo it”otso schedule uninstall-watch # on the indexing Macotso config unset index-device # on the othersWithout these settings, every Mac indexes for itself.