Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geo database backup #401

Merged
merged 5 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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