Skip to content

Commit

Permalink
Merge pull request #1812 from tursodatabase/lucio/update-user-guide
Browse files Browse the repository at this point in the history
sqld: update user guide
  • Loading branch information
LucioFranco authored Nov 13, 2024
2 parents 65d4b19 + 38a7288 commit bf0a3bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ SNAPSHOT_FILE="$1"
NAMESPACE="$2"

echo "Generated incremental snapshot $SNAPSHOT_FILE for namespace $NAMESPACE"

# At this point we can ship the snapshot file to whereever we would like but we
# must delete it from its location on disk or else sqld will panic.
rm $SNAPSHOT_FILE
```

and then configure `sqld` to generate an incremental snapshot every 5 seconds and invoke the shell script when `sqld` generates a snapshot:
Expand Down Expand Up @@ -216,6 +220,12 @@ async fn main() {
}
```

When applying snapshots the format of the file name gives certain information.
The format is `{namespace}:{log_id}:{start_frame_no:020x}-{end_frame_no:020x}.snap` where log_id represents the unqiue write ahead log and then
for each unique log_id there will be snapshots starting at frame `0` up until
the end. Snapshots must be applied sequentially for each log_id starting at
frame 0.

## Multitenancy

The `sqld` server supports more than one database. To create a database, send a create namespace request to the [admin API](ADMIN_API.md).
Expand Down

0 comments on commit bf0a3bb

Please sign in to comment.