Skip to content

Commit f9a1dbe

Browse files
authored
Merge pull request #1102 from kenkoooo/feature/sql_backup_again
sql backup again
2 parents 85d0aba + 7ac3a07 commit f9a1dbe

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

atcoder-problems-backend/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ COPY --from=builder /app/target/release/delta_update /usr/bin/del
3737
COPY --from=builder /app/target/release/dump_json /usr/bin/dump_json
3838
COPY --from=builder /app/target/release/fix_invalid_submissions /usr/bin/fix_invalid_submissions
3939
COPY --from=builder /app/target/release/run_server /usr/bin/run_server
40+
41+
42+
RUN apt-get update && apt-get install -y awscli postgresql-client
43+
ADD ./scripts/sql-backup.sh /usr/bin/sql-backup.sh
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
psql ${SQL_URL} -c "\copy submissions TO './submissions.csv' WITH (FORMAT CSV, HEADER)"
4+
gzip submissions.csv
5+
aws s3 cp submissions.csv.gz s3://kenkoooo/submissions.csv.gz --acl public-read

sql-backup/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

sql-backup/run.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)