WSL/SLF GitLab Repository

Commit e2fb8666 authored by Sam's avatar Sam
Browse files

update psql to pg_restore to prevent pipe errors

parent b6ba35bb
#!/bin/bash
set -e
PGPASSWORD="$CKAN_DB_PASS" pg_dump -C -h "$CKAN_DB_HOST" -U "$CKAN_DB_USER" "$CKAN_DB_NAME" | psql -U "$CKAN_DB_USER" "$CKAN_DB_NAME"
PGPASSWORD="$CKAN_DB_PASS" pg_dump -C -h "$CKAN_DB_HOST" -U "$CKAN_DB_USER" "$CKAN_DOI_DB_NAME" | psql -U "$CKAN_DB_USER" "$CKAN_DOI_DB_NAME"
PGPASSWORD="$CKAN_DB_PASS" pg_dump -C --format c\
--host "$CKAN_DB_HOST" --username "$CKAN_DB_USER" \
"$CKAN_DB_NAME" | \
pg_restore --exit-on-error \
--username postgres --dbname "$CKAN_DB_NAME"
PGPASSWORD="$CKAN_DB_PASS" pg_dump -C --format c\
--host "$CKAN_DB_HOST" --username "$CKAN_DB_USER" \
"$CKAN_DOI_DB_NAME" | \
pg_restore --exit-on-error \
--username postgres --dbname "$CKAN_DOI_DB_NAME"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment