Skip to content

Commit

Permalink
Merge pull request #401 from johnseekins/geo-extract
Browse files Browse the repository at this point in the history
Geo database backup
  • Loading branch information
johnseekins committed Jul 18, 2023
2 parents d5a9f6b + 2bfc573 commit 05452ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:
- 5432:5432
steps:
- name: check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
# Python dependencies
- name: setup Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: install Poetry
uses: snok/install-poetry@v1
- name: cache Poetry virtualenv
uses: actions/cache@v2
uses: actions/cache@v3
id: poetry-cache
with:
path: ~/.virtualenvs/
Expand All @@ -60,7 +60,7 @@ jobs:
with:
node-version: '12'
- name: cache node_modules
uses: actions/cache@v2
uses: actions/cache@v3
id: node-cache
with:
path: ./node_modules
Expand Down
5 changes: 5 additions & 0 deletions docker/cron/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ echo "Shipping full backup to s3"
aws s3 cp openstatesorg.pgdump "s3://openstates-backups/full-backup/$(date +%Y-%m-%d)-openstatesorg.pgdump" > /dev/null
rm -f openstatesorg.pgdump

echo "Extracting geo backup..."
pg_dump -Fc geo > openstates-geo.pgdump
echo "Shipping full backup to s3"
aws s3 cp openstates-geo.pgdump "s3://openstates-backups/full-backup/$(date +%Y-%m-%d)-openstates-geo.pgdump" > /dev/null
rm -f openstates-geo.pgdump

# layered approach for public
echo "Executing public schema-only backup..."
Expand Down

0 comments on commit 05452ed

Please sign in to comment.