Mercurial > public > ssdt-docker
view scripts/list-document-store-snapshots.sh @ 525:c941bcc97e5b
flow: Merged <hotfix> '2.16.1' to <develop> ('default').
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Tue, 30 Jan 2024 10:55:15 -0500 |
parents | 52c2ec5ddeb5 |
children |
line wrap: on
line source
#!/bin/bash projectDir=${1:-$PWD} detailedView=${2:-false} cd "$projectDir" || echo "Unable to change to project directory: $projectDir" function prop { grep "${1}" .env/ssdt-document-store-shared.properties|cut -d'=' -f2 } entityId=$(prop 'entityId' | tr -d '"') repository="${entityId}_fs_backup" certificate=${projectDir}/http_ca.crt baseUrl="https://$(prop 'DOCUMENTSTORE_ELASTIC_HOST' | tr -d '"'):$(prop 'DOCUMENTSTORE_ELASTIC_PORT' | tr -d '"')" elasticPassword=$(prop 'ELASTIC_PASSWORD' | tr -d '"') options="pretty&verbose=${detailedView}&index_names=${detailedView}&ignore_unavailable=true" curl --cacert "${certificate}" -s -u elastic:"${elasticPassword}" -X GET "${baseUrl}/_snapshot/${repository}/_all?${options}"