Command-Line Tools
Backup, restore, and manage your SoliDB data with powerful CLI utilities.
Overview
SoliDB provides essential command-line tools for data management:
solidb-repl
Interactive Lua REPL for testing and debugging.
solidb-dump
Export databases and collections to JSONL format.
solidb-restore
Import data from JSONL dumps back into SoliDB.
solidb-fuse
Mount blob collections as a filesystem.
solidb-repl
Interactive Lua REPL for testing scripts, querying data, and debugging. Similar to irb (Ruby) or lua -i.
USAGE
solidb-repl [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
| -s, --server | Server URL | http://localhost:6745 |
| -d, --database | Database name | _system |
| -k, --api-key | API key for authentication | - |
REPL Commands
| Command | Description |
|---|---|
| .help | Show help |
| .exit | Quit the REPL |
| .clear | Clear screen |
| .db <name> | Switch database |
| .status | Show connection info |
| .reset | Reset session state |
Features
- Tab completion for all APIs
- Command history (~/.solidb_history)
- Multiline input (end with \)
- Session state persistence
- Colored/formatted output
- Execution timing
Example Session
_system> x = 42 (0.15ms) _system> x + 1 43 (0.12ms) _system> db:collection("users"):count() 1234 (0.45ms) _system> crypto.uuid() "f47ac10b-58cc-4372-a567-0e02b2c3d479" (0.08ms) _system> .db myapp Switched to database: myapp myapp> db:query("FOR u IN users LIMIT 3 RETURN u.name") [ "Alice", "Bob", "Charlie" ] (1.23ms)
solidb-dump
USAGE
solidb-dump [OPTIONS] --database <DATABASE>
Options
| Option | Description | Default |
|---|---|---|
| -d, --database | Database name (required) | - |
| -c, --collection | Collection name | All |
| -o, --output | Output file | stdout |
| -H, --host | Database host | localhost |
| -P, --port | Database port | 6745 |
| -u, --user | Username | - |
| -p, --password | Password | - |
Examples
Shard-Aware: queries all shards across all nodes for sharded collections, ensuring complete backups.
solidb-restore
USAGE
solidb-restore [OPTIONS] --input <FILE>
Options
| Option | Description | Default |
|---|---|---|
| -i, --input | Input JSONL file (required) | - |
| --database | Override database name | From dump |
| --collection | Override collection name | From dump |
| --create-database | Create database if missing | false |
| --drop | Drop existing collections first | false |
Examples
solidb-fuse
USAGE
solidb-fuse [OPTIONS] --mount <MOUNT>
Options
| Option | Description | Default |
|---|---|---|
| --mount | Mount point path (required) | - |
| -d, --daemon | Run as daemon | false |
| --pid-file | PID file | ./solidb-fuse.pid |
| --log-file | Log file | ./solidb-fuse.log |
Examples
solidb-fuse --mount ~/solidb-mount --password admin
Supported Formats
JSONL (Recommended)
Restores a collection from a JSONL (or mixed JSONL/Binary) file. Automatically handles collection creation and data distribution.
{"_database":"mydb","_collection":"users","_id":"2","name":"Bob"}
JSON Array
Standard JSON array. Good for migrations.
{"name":"Alice"},
{"name":"Bob"}
]
CSV
Rows and columns. Requires --database and --collection flags.
Alice,30,true
Bob,25,false