You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the following environment varibles accordingly;
164
164
165
165
1. Update the `secretKeyRef.name` on all `env:` entries under `env.[*].valueFrom` to the name of the kubernetes secrets deployed when configuring Qdrant.
166
-
2. Update the `QDRANT_SOURCE_HOSTS` to the kubernetes service domain of the source Qdrant deployment.
166
+
2. Update the `QDRANT_SOURCE_HOSTS` to empty `""`.
167
167
3. Update the `QDRANT_RESTORE_HOSTS` to the target qdrant cluster service domain.
168
-
4. `GET_PEERS_FROM_CLUSTER_INFO` should be `true` to discover qdrant cluster peers when backing up collections.
168
+
4. `GET_PEERS_FROM_CLUSTER_INFO` should be `false` during restore.
169
169
5. `CURL_TIMEOUT` is set at `3000` seconds. This is the max time curl will waitforrequest to complete. Its increasedin scenarios where restoration takes a while.
170
170
6. `QDRANT_S3_LINK_EXPIRY_DURATION` is set at `3600`. This is the duration that an s3 presigned url will be active. The url is used during the recovery process.
171
171
7. `QDRANT_WAIT_ON_TASK` is set as `true`. This configuation make restoration process synchronous meaning 'wait for snapshot process to finish successfully before moving on'. Its used during backup and recovery.
Copy file name to clipboardExpand all lines: qdrant-backup-restore/k8s/restore-job.yaml
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -47,19 +47,21 @@ spec:
47
47
name: qdrant-credentials-minio
48
48
key: QDRANT_API_KEY
49
49
- name: QDRANT_SOURCE_HOSTS
50
-
value: "http://qdrant-headless:6333"#change this to your source qdrant kubernetes headless service name
50
+
value: ""#leave empty if source host is not available
51
51
- name: QDRANT_S3_ENDPOINT_URL
52
52
value: "http://minio.default.svc.cluster.local:9000"# change this to your s3 endpoint url
53
53
- name: QDRANT_RESTORE_HOSTS
54
-
value: "http://qdrantr2-headless:6333"# change this to your target qdrant kubernetes headless service name
54
+
value: "http://qdrant-headless:6333"# change this to your target qdrant kubernetes headless service name
55
55
- name: GET_PEERS_FROM_CLUSTER_INFO
56
-
value: "true"
56
+
value: "false"
57
57
- name: QDRANT_SNAPSHOT_DATETIME_FILTER
58
-
value: ""#change tis to filter snapshts based on date (glob matching is used)
58
+
value: ""#set this to filter snapshots based on date (glob matching is used) e.g "2026-01-29" = all snapshots in 29th January 2026, "2026-01" = all snapshots in January 2026.
59
59
- name: CURL_TIMEOUT
60
60
value: "3000"# increase if more time is needed for a single restore
61
61
- name: MC_CONFIG_DIR
62
62
value: "mc"# sets the configuration location for mc S3 client
# creates and appends created collection snapshot from a qdrant node to $QDRANT_SNAPSHOTS_FILE
134
138
track_created_collection_snapshot() {
135
-
local host="${source_hosts[0]}"
139
+
local host="${source_hosts[0]:-}"
140
+
if [[ -z"$host" ]];then
141
+
_printf "source host is not available for fetching collection snapshots. Please ensure QDRANT_SOURCE_HOSTS is set correctly in your environment variables.\n"
# gets the collection aliases from a qdrant node and appends it to $QDRANT_COLLECTION_ALIASES file
539
547
get_collection_aliases() {
540
-
local host="${source_hosts[0]}"
548
+
local host="${source_hosts[0]:-}"
549
+
if [[ -z"$host" ]];then
550
+
_printf "source host is not available for fetching collection aliases. Please ensure QDRANT_SOURCE_HOSTS is set correctly in your environment variables.\n"
551
+
exit 1
552
+
fi
541
553
local result=""
542
554
local status=""
543
555
@@ -638,7 +650,11 @@ recover_collection_alias() {
638
650
# restores collection aliases to a qdrant node and appends progress to $QDRANT_ALIAS_RECOVERY_HISTORY_FILE
639
651
recover_collection_aliases() {
640
652
641
-
local host="${restore_hosts[0]}"
653
+
local host="${restore_hosts[0]:-}"
654
+
if [[ -z"$host" ]];then
655
+
_printf "restore host is not available for recovering collection aliases. Please ensure QDRANT_RESTORE_HOSTS is set correctly in your environment variables.\n"
656
+
exit 1
657
+
fi
642
658
643
659
644
660
if [ "$BACKUP_COLLECTION_ALIASES_ON_S3"="true" ];then
@@ -708,7 +724,12 @@ delete_files() {
708
724
709
725
# gets qdrant peer host url using cluster info endpoint. Sets the port to $QDRANT_HTTP_PORT the http port.
710
726
get_peers_from_cluster_info() {
711
-
local host="${source_hosts[0]}"
727
+
local host="${source_hosts[0]:-}"
728
+
if [[ -z"$host" ]];then
729
+
_printf "source host is not available. Please ensure QDRANT_SOURCE_HOSTS is set correctly in your environment variables. If restoring snapshots set QDRANT_SOURCE_HOSTS and GET_PEERS_FROM_CLUSTER_INFO to empty string.\n"
730
+
exit 1
731
+
fi
732
+
712
733
result=$(_curl GET "$host/cluster" --header "api-key: $QDRANT_API_KEY")
0 commit comments