Search index not persistent #37

Closed
opened 2026-05-03 01:57:30 -07:00 by ufechner7 · 3 comments
ufechner7 commented 2026-05-03 01:57:30 -07:00 (Migrated from github.com)

I have multiple search indices because my software consists of multiple packages.

I can index them, but after a reboot, they are no longer indexed.

Why?

Image

I start the database with:

docker run -d -p 6333:6333 qdrant/qdrant

Indexing all of them takes more than 30 min. I cannot do that after every reboot.

I have multiple search indices because my software consists of multiple packages. I can index them, but after a reboot, they are no longer indexed. Why? <img width="1134" height="636" alt="Image" src="https://github.com/user-attachments/assets/ee9e172b-fc50-4d8d-8435-8461f479f428" /> I start the database with: ``` docker run -d -p 6333:6333 qdrant/qdrant ``` Indexing all of them takes more than 30 min. I cannot do that after every reboot.
ufechner7 commented 2026-05-03 03:36:14 -07:00 (Migrated from github.com)

I found a solution. Run the following script once:

#!/bin/bash

# This script starts the Qdrant vector database in a Docker container. It creates a Docker 
# volume named "qdrant_data" to persist the data and runs the container with the appropriate 
# port mapping and restart policy.

# It needs to be executed only once. After that, the Qdrant container will automatically 
# restart on system reboot or if it crashes.

# The data is stored in /var/lib/docker/volumes/qdrant_data/_data/collections

if docker volume inspect qdrant_data &>/dev/null; then
  echo "Volume 'qdrant_data' already exists, skipping setup."
  exit 0
fi

docker volume create qdrant_data

docker run -d \
  --name qdrant \
  --restart unless-stopped \
  -p 6333:6333 \
  -v qdrant_data:/qdrant/storage \
  qdrant/qdrant

The documentation should be updated accordingly.

I found a solution. Run the following script once: ```bash #!/bin/bash # This script starts the Qdrant vector database in a Docker container. It creates a Docker # volume named "qdrant_data" to persist the data and runs the container with the appropriate # port mapping and restart policy. # It needs to be executed only once. After that, the Qdrant container will automatically # restart on system reboot or if it crashes. # The data is stored in /var/lib/docker/volumes/qdrant_data/_data/collections if docker volume inspect qdrant_data &>/dev/null; then echo "Volume 'qdrant_data' already exists, skipping setup." exit 0 fi docker volume create qdrant_data docker run -d \ --name qdrant \ --restart unless-stopped \ -p 6333:6333 \ -v qdrant_data:/qdrant/storage \ qdrant/qdrant ``` The documentation should be updated accordingly.
kahliburke commented 2026-06-08 23:17:50 -07:00 (Migrated from github.com)

@ufechner7 thanks for the report. I'll look at changes to the docs to highlight this.

@ufechner7 thanks for the report. I'll look at changes to the docs to highlight this.
kahliburke commented 2026-06-16 04:31:31 -07:00 (Migrated from github.com)

Improved the search docs for 2.0 — the quickstart now mounts a persistent volume:

docker run -d --name qdrant -p 6333:6333 \
  -v qdrant_storage:/qdrant/storage \
  qdrant/qdrant

That -v qdrant_storage:/qdrant/storage was the missing piece. Without a volume, Qdrant keeps everything in the container's ephemeral filesystem, so the collections are lost on reboot / container-recreate and every project would need re-indexing. With the volume, the index persists. (installation.md already had it; the search.md quickstart was the bare one — now fixed.)

Improved the search docs for 2.0 — the quickstart now mounts a persistent volume: ```bash docker run -d --name qdrant -p 6333:6333 \ -v qdrant_storage:/qdrant/storage \ qdrant/qdrant ``` That `-v qdrant_storage:/qdrant/storage` was the missing piece. Without a volume, Qdrant keeps everything in the container's ephemeral filesystem, so the collections are lost on reboot / container-recreate and every project would need re-indexing. With the volume, the index persists. (`installation.md` already had it; the `search.md` quickstart was the bare one — now fixed.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Kaimon.jl#37
No description provided.