-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigration.sh
More file actions
32 lines (30 loc) Β· 974 Bytes
/
migration.sh
File metadata and controls
32 lines (30 loc) Β· 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# =========================
# Configuration variables
# =========================
source_url="http://192.168.1.210:6334"
target_url="http://192.168.1.201:6334"
# =========================
# Get list of collections
# =========================
curl -s "${source_url/6334/6333}/collections" | jq -r '.result.collections[].name' > collections.txt
echo "Collections to migrate:"
cat collections.txt
# =========================
# Migrate collections
# =========================
while read col; do
echo "Migrating collection '$col'..."
docker run --rm \
registry.cloud.qdrant.io/library/qdrant-migration qdrant \
--source.url "$source_url" \
--source.collection "$col" \
--target.url "$target_url" \
--target.collection "$col"
if [ $? -eq 0 ]; then
echo "β
Migration succeeded for '$col'"
else
echo "β Migration failed for '$col'"
fi
done < collections.txt
echo "All migrations complete!"