mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-01 05:51:16 +00:00
Attempt to use env variable for backup script
This should be available via docker, and we shouldn't have the database name hardcoded anywhere
This commit is contained in:
parent
d44a900e0c
commit
879a410808
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
#!/bin/bash
|
||||
if [ -z "$POSTGRES_DB" ]; then
|
||||
echo "Database not specified, defaulting to bookwyrm"
|
||||
fi
|
||||
BACKUP_DB=${POSTGRES_DB:-bookwyrm}
|
||||
filename=backup__$(date +%F)
|
||||
pg_dump -U bookwyrm > /backups/$filename.sql
|
||||
pg_dump -U $BACKUP_DB > /backups/$filename.sql
|
||||
|
|
Loading…
Reference in a new issue