- BACKUP=$1
- kubectl cp ${BACKUP} $(kubectl get pods | grep -e ^postgres | awk '{print $1}'):/tmp/$(basename ${BACKUP})
- kubectl exec -it $(kubectl get pods | grep -e ^postgres | awk '{print $1}') -- /bin/bash -c "pg_restore --clean -U ps_user -f /tmp/$(basename ${BACKUP})"
|