Migrating from v1 to v2
Import local history from UniClipboard v1 into v2 using unic migrate or desktop first-install setup.
UniClipboard v2 is a brand-new implementation. It cannot sync with v1 and cannot directly use v1 databases, full settings, or device identities. Offline migration imports local history and selected supported preferences into v2, without migrating device identities, trust relationships, or network/sync settings.
What Is Migrated
| Content | Migrated |
|---|---|
| Text, HTML | Yes |
| Images | Yes; JPEG/TIFF/WebP are converted to PNG |
| Files | Yes; copied as v2-managed copies; folders preserve directory structure as ZIP archives |
| Tags and tag colors | Yes; built-in link/image/folder/code tags are mapped to their v2 equivalents |
| Creation time and ordering | Yes |
| Selected preferences (unset device name, theme, analytics toggle, favorite retention exclusion, tag sidebar layout, supported shortcuts) | Yes; existing v2 overrides are preserved |
| Favorites | Persisted favorites (is_favorited) migrate as the reserved favorite tag; older schemas without that column count favorited index rows under unsupported_tags and report partial |
| Device identity, trust relationships, network/sync settings, and other settings | No |
Migration does not modify v1 data. Missing or corrupted items are counted as partial migration in the report.
Before Migrating
- Back up your v1 data and keep the backup until you have verified the v2 history.
- Quit v1 and stop any
unicdusing the target data directory (migration does not stop it for you). - After all devices are upgraded to v2, pair them again.
Using the Desktop App
On a fresh install, launching the v2 desktop app opens the setup wizard, which offers optional v1 history import using the same migration flow as the CLI.

Using the Mobile App (iOS & Android)
On first launch, the mobile setup flow automatically checks for legacy mobile databases (uniclipboard.db). You can also open Settings → Storage later to manually choose a folder containing a legacy mobile or desktop v1 backup. Imports are idempotent and verified, and existing devices still need to be paired again.
Using the CLI
Dry run (does not write to target, optional)
unic migrate --dry-runImport and verify
unic migrateIn an interactive terminal, you can also run unic init directly; when v1 data is detected, it offers a choice to import your v1 history or start fresh. During import, the system requests credential access; if reading credentials fails, the reason is shown and you are prompted for your v1 passphrase (hidden input, up to 3 attempts). Unlock failures or Ctrl+C cancellations do not lock the profile, so you can still run unic init --fresh anytime.
Check the summary
After verifying the summary and v2 history, start unicd (add --json for machine-readable progress and reports in scripts).
The default source is the local v1 desktop data directory (macOS ~/Library/Application Support/app.uniclipboard.desktop, Windows %LOCALAPPDATA%\app.uniclipboard.desktop, Linux ~/.local/share/app.uniclipboard.desktop); the default target is UNIC_HOME or the standard unic data directory.
Options
| Option | Description |
|---|---|
--source DIR | v1 data directory; required for custom or portable v1 installations |
--target DIR | v2 data directory |
--service NAME | Legacy credential service name, defaults to UniClipboard; named profiles use UniClipboard-<profile> |
--dry-run | Read and verify only without modifying the target |
--json | Output JSON progress and final report |
--passphrase-stdin | Read one line of the legacy passphrase from stdin for automation |
--initialize-empty | Explicitly initialize when no v1 data exists (scripted); can only be used with --target and --json |
Never pass the passphrase in command-line arguments or environment variables. Use --passphrase-stdin for automation.
When There Is No v1 Data or Skipping Migration
Each CLI data directory must complete initialization before first use; otherwise, regular commands exit with code 6 (migration_required).
- Standard setup (completes immediately when no v1 data exists, or prompts interactively when v1 is found):
unic init - Non-interactive/scripted fresh start skipping detected v1 data:
unic init --fresh - Abandon a partially imported pending migration:
unic init --fresh --discard-pending - Scripted no-source check initialization:
unic migrate --initialize-empty --json(refuses if v1 data or a pending import exists)
Results and Retries
| Exit Code | Status |
|---|---|
| 0 | ready (dry run passed) or complete (import and verification finished) |
| 3 | partial (some items missing or failed) |
| 1 | failed or cancelled |
- Dry runs, partial completions, failures, and cancellations do not count as complete; the data directory remains locked until a full import succeeds.
- If interrupted, rerun the same command: already imported items are not duplicated, failed items are retried, and new items are added.
- Each import automatically fills in missing tags and tag colors; items you edited or deleted in v2 are preserved and will not be overwritten or resurrected.
- Check
tag_repairs_skipped,color_failures, andcolors_missingin the report and handle them manually in v2 if needed. - Migration progress and reports contain only counts and error categories—no payloads, paths, or filenames.
- When the target is a v2 directory that already has history, migration appends and merges without replacing its identity or configuration.
Migration is primarily validated against newer v1 data formats; unknown formats fail explicitly rather than guessing.