Skip to content

Commit

Permalink
Switch to GitHub LFS for DB dumps
Browse files Browse the repository at this point in the history
"Our" S3 is currently broken and it might not be maintained anymore.
Using LFS is nice because it's also hosted with GitHub, reducing the
number of points of failure. The dumps are small enough so that we
likely won't run into any limitations.

I already pushed all current DB dumps to the `db-dumps` orphan branch.
  • Loading branch information
LukasKalbertodt committed Sep 11, 2023
1 parent 1924d4b commit 974e2e7
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .deployment/deploy.yml
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@
- name: Download latest DB dump
become: true
get_url:
url: 'https://s3.opencast-niedersachsen.de/tobira/db-dump-latest.xz'
url: 'https://github.com/elan-ev/tobira/raw/db-dumps/db-dump-latest.xz'
dest: /opt/tobira/{{ id }}/db-dump.pgc.xz
owner: root
group: root
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ jobs:

# Test DB migrations
- name: Download latest DB dump
run: curl --silent --output db-dump.xz https://s3.opencast-niedersachsen.de/tobira/db-dump-latest.xz
run: curl --silent --output db-dump.xz -L https://github.com/elan-ev/tobira/raw/db-dumps/db-dump-latest.xz
- name: Decompress DB dump
run: xz -d db-dump.xz
# We need to use the same version as the DB, so we use 'docker exec'
2 changes: 1 addition & 1 deletion util/scripts/db-load-dump.sh
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ fi
# Download dump
TMP_DIR=$(mktemp -d)
echo "Downloading DB dump"
curl --output "$TMP_DIR/db-dump.xz" https://s3.opencast-niedersachsen.de/tobira/db-dump-latest.xz
curl --output "$TMP_DIR/db-dump.xz" -L https://github.com/elan-ev/tobira/raw/db-dumps/db-dump-latest.xz
xz -d "$TMP_DIR/db-dump.xz"

# Prompt to notify that the current DB is deleted.

0 comments on commit 974e2e7

Please sign in to comment.