Skip to content

Commit bf0a3bb

Browse files
authored
Merge pull request #1812 from tursodatabase/lucio/update-user-guide
sqld: update user guide
2 parents 65d4b19 + 38a7288 commit bf0a3bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/USER_GUIDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ SNAPSHOT_FILE="$1"
160160
NAMESPACE="$2"
161161

162162
echo "Generated incremental snapshot $SNAPSHOT_FILE for namespace $NAMESPACE"
163+
164+
# At this point we can ship the snapshot file to whereever we would like but we
165+
# must delete it from its location on disk or else sqld will panic.
166+
rm $SNAPSHOT_FILE
163167
```
164168

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

223+
When applying snapshots the format of the file name gives certain information.
224+
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
225+
for each unique log_id there will be snapshots starting at frame `0` up until
226+
the end. Snapshots must be applied sequentially for each log_id starting at
227+
frame 0.
228+
219229
## Multitenancy
220230

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

0 commit comments

Comments
 (0)