WSL/SLF GitLab Repository

Commit 4d2c30e6 authored by Sam's avatar Sam
Browse files

script to manually add dev database replicas

parent 05108ab3
#!/bin/bash
set -eo pipefail
# Create temp dev databases replicating existing databases.
# Uses the postgres superuser account to dump and pipe in PSQL prompt.
# Preferable to SQL create via template, as does not require disconnections.
sudo -u postgres dropdb dev_ckan_default
sudo -u postgres createdb --owner=ckan_default dev_ckan_default
sudo -u postgres pg_dump ckan_default | sudo -u postgres psql dev_ckan_default
sudo -u postgres dropdb dev_envidat_doi
sudo -u postgres createdb --owner=ckan_default dev_envidat_doi
sudo -u postgres pg_dump envidat_doi | sudo -u postgres psql dev_envidat_doi
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