syncdb

command module
v0.0.0-...-0ca2577 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Syncdb synchronizes one storage.DB with another. It copies items (key-value pairs) in the source DB that are not in the destination and removes items in the destination that are not in the source. It assumes that the largest key in the source is ordered.Encode(ordered.Inf).

Syncdb synchronizes only non-storage.VectorDB items by default. Vector items are identified by the keys beginning with "llm.Vector". Note that some DBs use these keys to represent a storage.VectorDB, but not all do.

With the -vec option, syncdb synchronizes only storage.VectorDB items. It performs the synchronization between the two specified vector namespaces of the source and target DBs.

If syncdb completes successfully and there have been no changes to the DBs while it was running, then the DBs will either have the same non-vector items or the same vector items in the provided source and target vector namespaces.

Usage:

syncdb [-vec] src dst

The databases src and dst can be specified using one of these forms:

pebble:DIR[:VECNAMESPACE]
   A Pebble database in the directory DIR

firestore:PROJECT,DATABASE[:VECNAMESPACE]
   A Firestore DB in the given GCP project and Firestore database.

The :VECNAMESPACE suffix can only be used with the -vec flag. When :VECNAMESPACE is omitted, the vector namespace is taken to be the empty string.

Examples

To sync a Pebble database in ~/mydb with the default Firestore database in MyProjectID:

syncdb pebble:~/mydb 'firestore:MyProjectID,(default)'

To sync the "vp" vector namespace of the Pebble database with the "vf" vector namespace of the Firestore database:

syncdb -vec pebble:~/mydb:vp 'firestore:MyProjectID,(default):vf'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL