Skip to content

Data, backups, and sync

Manage local database snapshots and sync them to another device with WebDAV or S3/R2.

Updated View as Markdown
For humans

Connections, MCP servers, skill repositories, settings, and some usage data live in the local OcHub database. Remote sync uploads the database and managed-skill snapshot; it does not copy every AI tool’s full live configuration directory.

Local data directory

The default data directory is ~/.ochub/. It contains the database, backups, and managed skills. Change it under Settings → Data and backups.

Restart after changing it so the UI and background services open the same location. Restoring the default only removes the path override; it does not merge two directories.

Automatic backups

Under Data and backups, configure:

  • Automatic backup interval: how often to create a local database snapshot.
  • Backups to keep: older snapshots beyond this limit are pruned.

Use a shorter interval while frequently changing connections or sync settings. Lower retention when disk space is limited.

Manual backup and restore

Open Advanced tools → Database backups:

  1. Select Create backup.
  2. Rename the snapshot to record its purpose and date.
  3. Before restoring, verify the name. OcHub first makes a safety backup of the current database.
  4. Restart and inspect connections, MCP, skills, and settings after restoration.
Illustrated walkthroughClick a screen to enlarge it, then use ← → to walk the steps. The blue outline marks the control or result.
1
STEP 01Open Database backups
2
STEP 02Create a snapshot
3
STEP 03Name and verify it
4
STEP 04Restore with a safety backup

Deleting a backup cannot be undone. Keep at least one verified copy outside the active OcHub data directory.

Choose a remote target

OcHub supports WebDAV and S3-compatible storage. A saved configuration should use one target. If both are detected as enabled, the page infers the current one from the most recent sync; verify it before saving.

Enter the WebDAV URL, username, and password. The URL must start with http:// or https://.

Enter Access Key ID, Secret Access Key, Region, and Bucket. AWS S3 can leave a custom Endpoint empty. Cloudflare R2 normally uses its supplied Endpoint and the region auto.

Both targets also have:

  • Profile: a logical name under one remote directory; default default.
  • Remote directory: the snapshot root; default ochub-sync.

Devices must use the same target, remote directory, and profile to share data.

Test, save, and upload

  1. Enter connection information.
  2. Select Test. A test does not save the fields you just entered.
  3. Select Save at the bottom of the page.
  4. After saving, select Upload local snapshot.
  5. Check the most recent sync time and error status.
Illustrated walkthroughClick a screen to enlarge it, then use ← → to walk the steps. The blue outline marks the control or result.
1
STEP 01Enter remote details
2
STEP 02Test without saving
3
STEP 03Save the target
4
STEP 04Upload a snapshot
5
STEP 05Check last sync

With Automatic sync enabled, database changes queue an upload. This is not real-time bidirectional merging: simultaneous edits on multiple devices can cause the later snapshot to overwrite the earlier one.

Restore from remote

Restore from remote downloads a snapshot and replaces the local database:

  1. Stop making changes on other devices.
  2. Verify the target, profile, and last sync time.
  3. Confirm the restore.
  4. OcHub backs up local data before replacing it.
  5. Restart and inspect critical configuration.
Illustrated walkthroughClick a screen to enlarge it, then use ← → to walk the steps. The blue outline marks the control or result.
1
STEP 01Stop edits on other devices
2
STEP 02Verify target and profile
3
STEP 03Confirm restore
4
STEP 04Keep the safety backup
5
STEP 05Restart and inspect

If the remote restore fails after the safety backup was created, fix the connection instead of repeatedly starting another restore.

Import from cc-switch again

Use Settings → Data and backups → Import from cc-switch to rerun migration. Records with the same ID are replaced by the cc-switch version, and OcHub makes a database snapshot first. It reads ~/.cc-switch/ without changing cc-switch.

See Migrate from cc-switch for first-time migration, collision rules, staged verification, and rollback.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close