On This Page
Need Help?
Check out the full command reference with --help
solidb-dump --help
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-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-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
Dump entire database
solidb-dump -d mydb -o backup.jsonl
Dump single collection to gzip
solidb-dump -d mydb -c users | gzip > users.jsonl.gz
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
Restore and create db
solidb-restore -i backup.jsonl --create-database
Restore to different database
solidb-restore -i backup.jsonl --database newdb --create-database
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
Mount to directory
mkdir ~/solidb-mount
solidb-fuse --mount ~/solidb-mount --password admin
solidb-fuse --mount ~/solidb-mount --password admin
Run as Daemon
solidb-fuse --mount /mnt/db -d --log-file /var/log/fuse.log
Supported Formats
JSONL (Recommended)
One document per line. Supports metadata for full reconstruction.
{"_database":"mydb","_collection":"users","_id":"1","name":"Alice"}
{"_database":"mydb","_collection":"users","_id":"2","name":"Bob"}
{"_database":"mydb","_collection":"users","_id":"2","name":"Bob"}
JSON Array
Standard JSON array. Good for migrations.
[
{"name":"Alice"},
{"name":"Bob"}
]
{"name":"Alice"},
{"name":"Bob"}
]
CSV
Rows and columns. Requires --database and --collection flags.
name,age,active
Alice,30,true
Bob,25,false
Alice,30,true
Bob,25,false
Common Workflows
Daily Backups
# Automated daily backup script
DATE=$(date +%Y%m%d)
solidb-dump -d production -o "backups/prod-${DATE}.jsonl"
gzip "backups/prod-${DATE}.jsonl"
Environment Migration
# Export from production
solidb-dump -H prod.example.com -d mydb -o prod-export.jsonl
# Import to staging
solidb-restore -i prod-export.jsonl -H staging.local --create-database --drop
Clone Collection
# Dump specific collection
solidb-dump -d mydb -c users -o users.jsonl
# Restore as new collection
solidb-restore -i users.jsonl --collection users_backup
Selective Restore
# Filter with jq and restore
cat backup.jsonl | jq -c 'select(.status == "active")' > active-only.jsonl
solidb-restore -i active-only.jsonl --create-database