mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
fix script
This commit is contained in:
parent
aea64825ca
commit
6c3d17632c
@ -6,7 +6,7 @@ export $(grep -v '^#' config.env | xargs)
|
||||
|
||||
echo "Starting backup...."
|
||||
|
||||
sudo docker run -it --net=host --rm \
|
||||
docker run -it --net=host --rm \
|
||||
--env-file config.env \
|
||||
--volume=$(pwd)$DATABASE_BACKUP_DIRECTORY:/var/lib/postgresql/data \
|
||||
postgres:latest /usr/bin/pg_dump -Fc --dbname=postgresql://$DATABASE_BACKUP_USERNAME:$DATABASE_BACKUP_PASSWORD@$DATABASE_BACKUP_HOST:$DATABASE_BACKUP_PORT/$DATABASE_BACKUP_NAME --file=/var/lib/postgresql/data/db-$(date +%d).backup
|
||||
|
@ -6,7 +6,7 @@ export $(grep -v '^#' config.env | xargs)
|
||||
|
||||
echo "Starting restore...."
|
||||
|
||||
sudo docker run -it --net=host --rm \
|
||||
docker run -it --net=host --rm \
|
||||
--env-file config.env \
|
||||
--volume=$(pwd)$DATABASE_RESTORE_DIRECTORY:/var/lib/postgresql/data \
|
||||
postgres:latest /usr/bin/pg_restore --dbname=postgresql://$DATABASE_RESTORE_USERNAME:$DATABASE_RESTORE_PASSWORD@$DATABASE_RESTORE_HOST:$DATABASE_RESTORE_PORT/$DATABASE_RESTORE_NAME /var/lib/postgresql/data/$DATABASE_RESTORE_FILENAME
|
||||
|
Loading…
Reference in New Issue
Block a user