Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovering data from snapshot with error message #720

Open
zpfhyj opened this issue Mar 14, 2024 · 2 comments
Open

Recovering data from snapshot with error message #720

zpfhyj opened this issue Mar 14, 2024 · 2 comments

Comments

@zpfhyj
Copy link

zpfhyj commented Mar 14, 2024

image

The qdrant cluster service started by three Docker containers uses the latest version of Docker image

I refer to official documents [https://qdrant.tech/documentation/concepts/snapshots/?q=snapshot] A snapshot was created using the command provided by qdrant, but an error message will be generated when restoring the snapshot, as shown in the figure.

@generall
Copy link
Member

Hey @zpfhyj, can you please provide a log of your actions to make sure that nothing is missing from the instructuons?

@zpfhyj
Copy link
Author

zpfhyj commented Mar 18, 2024

Hey @zpfhyj, can you please provide a log of your actions to make sure that nothing is missing from the instructuons?

I created a qdrant cluster using the following command.
First command:
docker run -itd -p 6333:6333 -p 6334:6334 -p 6335:6335 -e QDRANT__CLUSTER__ENABLED=true -v /data/qdrant_data:/qdrant/storage -v /data/config1.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --uri 'http://172.30.1.245:6335'

Second command:
docker run -itd -p 7333:7333 -p 7334:7334 -p 7335:7335 -e QDRANT__CLUSTER__ENABLED=true -v /data/qdrant_data2:/qdrant/storage -v /data/config2.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --bootstrap 'http://172.30.1.245:6335'

third command:
docker run -itd -p 8333:8333 -p 8334:8334 -p 8335:8335 -e QDRANT__CLUSTER__ENABLED=true -v /data/qdrant_data3:/qdrant/storage -v /data/config3.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --bootstrap 'http://172.30.1.245:6335'

After the cluster creation is completed, use curl http://172.30.1.245:6333/cluster It is normal to view the cluster status in this way.

Then, I accessed it in my browser http://172.30.1.245:6333/dashboard ,Create collections through console ,and insert some data。

Then, I use the snapshot command to create a snapshot.
First command:
curl -X POST http://172.30.1.245:6333/collections/test/snapshots
Second command:
curl -X POST http://172.30.1.245:7333/collections/test/snapshots
Third command:
curl -X POST http://172.30.1.245:8333/collections/test/snapshots

After the creation is completed, retrieve the snapshot and the snapshot status is normal.
I use console to delete some data from collections. Then use the following command to restore the snapshot.

curl -X PUT /collections/test/snapshots/recover
{
"location": "http://172.30.1.245:6333/collections/test/snapshots/test-1663519886492901-2024-03-14-10-11-49.snapshot",
"priority": "snapshot"
}

Command execution result output

{"result": true, "status": "ok", "time": 0.033578903}

However, the data was not recovered when viewed through the dashboard, and there are the following errors in the logs:

2024-03-14T10:31:20.103649Z INFO actix_web::middleware::logger: 172.30.1.245 "POST /collections/test/snapshots/upload?priority=snapshot HTTP/1.1" 200 48 "-" "curl/7.29.0" 1.496394
2024-03-14T10:31:20.151846Z WARN storage::content_manager::consensus_manager: Failed to apply collection meta operation entry with user error: Wrong input: Replica 8238391379467480 of shard 1 has state Some(Active), but expected Some(Initializing)
2024-03-14T10:31:20.201606Z WARN storage::content_manager::consensus_manager: Failed to apply collection meta operation entry with user error: Wrong input: Cannot deactivate the last active replica 1663519886492901 of shard 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants