From 27cfe7224a7926eef0fe82b83e5f02c307e727f6 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 29 Dec 2022 14:56:23 -0500 Subject: [PATCH] update vars --- migration/bps/get-bps-metadata.sh | 24 ++++++++++++------------ migration/bps/migration.env.in | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/migration/bps/get-bps-metadata.sh b/migration/bps/get-bps-metadata.sh index 33c0e1d..f22a636 100644 --- a/migration/bps/get-bps-metadata.sh +++ b/migration/bps/get-bps-metadata.sh @@ -52,13 +52,13 @@ while getopts "o:" arg; do done if [[ - -z $WOUDC_ARCHIVE_HOSTNAME - || -z $WOUDC_ARCHIVE_HOSTPORT + -z $WOUDC_ARCHIVE_HOST + || -z $WOUDC_ARCHIVE_PORT || -z $WOUDC_ARCHIVE_DBNAME || -z $WOUDC_ARCHIVE_USERNAME || -z $WOUDC_ARCHIVE_PASSWORD - || -z $WOUDC_DATAMART_HOSTNAME - || -z $WOUDC_DATAMART_HOSTPORT + || -z $WOUDC_DATAMART_HOST + || -z $WOUDC_DATAMART_PORT || -z $WOUDC_DATAMART_DBNAME || -z $WOUDC_DATAMART_USERNAME || -z $WOUDC_DATAMART_PASSWORD @@ -90,28 +90,28 @@ echo "Extracting metadata from woudc-archive" export PGPASSWORD=$WOUDC_ARCHIVE_PASSWORD echo " Projects..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($PROJECTS_QUERY) TO $OUTPUT_DIR/projects.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($PROJECTS_QUERY) TO $OUTPUT_DIR/projects.csv WITH CSV HEADER;" echo " Datasets..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($DATASETS_QUERY) TO $OUTPUT_DIR/datasets.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($DATASETS_QUERY) TO $OUTPUT_DIR/datasets.csv WITH CSV HEADER;" echo " Contributors..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($CONTRIBUTORS_QUERY) TO $OUTPUT_DIR/contributors.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($CONTRIBUTORS_QUERY) TO $OUTPUT_DIR/contributors.csv WITH CSV HEADER;" echo " Stations..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($STATIONS_QUERY) TO $OUTPUT_DIR/stations.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($STATIONS_QUERY) TO $OUTPUT_DIR/stations.csv WITH CSV HEADER;" echo " Station Names..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($STATION_NAMES_QUERY) TO $OUTPUT_DIR/station-names.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($STATION_NAMES_QUERY) TO $OUTPUT_DIR/station-names.csv WITH CSV HEADER;" echo " Instruments..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($INSTRUMENTS_QUERY) TO $OUTPUT_DIR/instruments.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($INSTRUMENTS_QUERY) TO $OUTPUT_DIR/instruments.csv WITH CSV HEADER;" echo " Deployments..." -psql -h $WOUDC_ARCHIVE_HOSTNAME -p $WOUDC_ARCHIVE_HOSTPORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($DEPLOYMENTS_QUERY) TO $OUTPUT_DIR/deployments.csv WITH CSV HEADER;" +psql -h $WOUDC_ARCHIVE_HOST -p $WOUDC_ARCHIVE_PORT -d $WOUDC_ARCHIVE_DBNAME -U $WOUDC_ARCHIVE_USERNAME -c "\\COPY ($DEPLOYMENTS_QUERY) TO $OUTPUT_DIR/deployments.csv WITH CSV HEADER;" echo "Extracting metadata from woudc-web-db" export PGPASSWORD=$WOUDC_DATAMART_PASSWORD echo " Notifications..." -psql -h $WOUDC_DATAMART_HOSTNAME -p $WOUDC_DATAMART_HOSTPORT -d $WOUDC_DATAMART_DBNAME -U $WOUDC_DATAMART_USERNAME -c "\\COPY ($NOTIFICATIONS_QUERY) TO $OUTPUT_DIR/notifications.csv WITH CSV HEADER;" +psql -h $WOUDC_DATAMART_HOST -p $WOUDC_DATAMART_PORT -d $WOUDC_DATAMART_DBNAME -U $WOUDC_DATAMART_USERNAME -c "\\COPY ($NOTIFICATIONS_QUERY) TO $OUTPUT_DIR/notifications.csv WITH CSV HEADER;" diff --git a/migration/bps/migration.env.in b/migration/bps/migration.env.in index 84bd6ff..67f9b46 100644 --- a/migration/bps/migration.env.in +++ b/migration/bps/migration.env.in @@ -1,13 +1,13 @@ # woudc-archive connection information -export WOUDC_ARCHIVE_HOSTNAME=woudc-archive-host -export WOUDC_ARCHIVE_HOSTPORT=woudc-archive-port +export WOUDC_ARCHIVE_HOST=woudc-archive-host +export WOUDC_ARCHIVE_PORT=woudc-archive-port export WOUDC_ARCHIVE_DBNAME=woudc-archive export WOUDC_ARCHIVE_USERNAME=woudcadmin export WOUDC_ARCHIVE_PASSWORD=password1 # woudc-web-db connection information -export WOUDC_DATAMART_HOSTNAME=woudc-datamart-host -export WOUDC_DATAMART_HOSTPORT=woudc-datamart-host +export WOUDC_DATAMART_HOST=woudc-datamart-host +export WOUDC_DATAMART_PORT=woudc-datamart-host export WOUDC_DATAMART_DBNAME=woudc-web-db export WOUDC_DATAMART_USERNAME=woudcadmin export WOUDC_DATAMART_PASSWORD=password2