19 lines
258 B
Bash
Executable File
19 lines
258 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [[ $# -ne 1 ]]
|
|
then
|
|
echo "Usage: $0 <file>.sql"
|
|
exit 1
|
|
fi
|
|
|
|
file=$1
|
|
|
|
if [[ ! -e "${file}" ]]
|
|
then
|
|
echo "file ${file} does not exist"
|
|
exit 1
|
|
fi
|
|
|
|
kubectl -n analytics exec -i svc/prod-umami-db-rw -c postgres -- psql app < "${file}"
|
|
|