Skip to content

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.

A second Mac syncs hourly its own browser history
The Mac with the index syncs hourly watches for changes, re-indexes within about a minute
Search index on a local disk, rebuildable Otso Search reads it
  1. Point every Mac at the shared folder.

    Terminal window
    otso config set sources-dir /Volumes/<share>/otso/sources
    otso config set data-dir ~/.otso/data

    sources-dir is the archive: one database per source. data-dir is the search index. Keep the index on a local disk, because the indexer’s parallel writes don’t work over a network share.

  2. Sync on a schedule on each Mac.

    Terminal window
    otso schedule install

    This syncs every hour. See Schedule sync.

  3. Choose which Mac syncs what.

    Open the Sources panel with otso config sources on each Mac. Untick a source on one Mac to leave it to another.

  4. Pick the Mac that holds the index. On that Mac:

    Terminal window
    otso schedule install-watch

    It prints the Mac’s device name. On every other Mac:

    Terminal window
    otso config set index-device <that name>
  • No overwriting. Each write takes a <db>.lock file 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 index never run at the same time.
  • Share not mounted. A sync stops, rather than writing into an empty folder where the share should be.
DataHow it’s stored
Messages, Notes, Photos, CalendarOne 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 sourcesOne list, shared by every Mac
Which sources a Mac syncsPer Mac
CredentialsPer 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>.

Terminal window
otso schedule uninstall-watch # on the indexing Mac
otso config unset index-device # on the others

Without these settings, every Mac indexes for itself.