Skip to content

Commit

Permalink
exec -it fix (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaykeren committed Sep 11, 2024
2 parents 544b875 + 63ec8b4 commit 2aeeb6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dev/troubleshooting/restore_postgres_as_distributed.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "Copying dump into $persistence_container"
docker cp $dump_file $postgres_container:/dump

echo "Retoring dump"
docker exec -it $postgres_container sh -c "psql -U postgres -c \"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'digma_analytics';\""
docker exec -it $postgres_container sh -c 'dropdb -U postgres digma_analytics'
docker exec -it $postgres_container sh -c 'createdb -U postgres digma_analytics'
docker exec -it $postgres_container sh -c 'pg_restore -U postgres -F c -d digma_analytics /dump'
docker exec $postgres_container sh -c "psql -U postgres -c \"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'digma_analytics';\""
docker exec $postgres_container sh -c 'dropdb -U postgres digma_analytics'
docker exec $postgres_container sh -c 'createdb -U postgres digma_analytics'
docker exec $postgres_container sh -c 'pg_restore -U postgres -F c -d digma_analytics /dump'

0 comments on commit 2aeeb6d

Please sign in to comment.