BUCKYVERSE

Legacy syncing Wiki.js database to another dev environment

Legacy notes for the old Wiki.js deployment, kept for reference after the wiki migration to llm-wiki/.

One-time setup on the other machine

  1. Clone the repo (or ensure it has the same dev/wikijs layout).
  2. In dev/wikijs: copy .env.example to .env, set DB_PASS if you like (default is fine).
  3. Start the stack: docker compose up -d.
  4. Complete the Wiki.js setup wizard once at http://localhost:3000 (it will be replaced when you restore).

Sync steps

1. On this machine (source — the one with the DB you want to copy)

From the repo root or dev/wikijs:

cd dev/wikijs
./scripts/dump-for-sync.sh

This creates a timestamped dump in dev/wikijs/backups/, e.g. wiki-db-sync-20260217-143022.sql. The script excludes the assetData table by default (same as prod pull) to keep the dump small; page content and structure are included.

2. Copy the dump to the other machine

Use scp (replace with the other machine’s user, host, and path):

scp dev/wikijs/backups/wiki-db-sync-*.sql otheruser@otherhost:/path/to/buckyverse.org/dev/wikijs/backups/

Or use a shared drive, USB, etc. — the other side only needs the .sql file in (or next to) their dev/wikijs tree.

3. On the other machine (target)

cd dev/wikijs
./scripts/restore-from-backup.sh backups/wiki-db-sync-20260217-143022.sql

Use the actual filename you copied. If you put the dump in backups/, you can also run ./scripts/restore-from-backup.sh with no arguments to restore the latest wiki-db-*.sql in backups/.

Wiki.js is stopped during restore and started again afterward. Open http://localhost:3000 on the other machine to confirm.

Optional: include assetData

If you need uploaded assets (images, etc.) in sync and the assetData table is not too large, on the source machine set in dev/wikijs/.env:

SYNC_DUMP_EXCLUDE_TABLE_DATA=

Then run ./scripts/dump-for-sync.sh again. The dump will include all tables and will be larger.