Skip to content

Commit

Permalink
Check the /backup path
Browse files Browse the repository at this point in the history
  • Loading branch information
ptruessel committed Oct 21, 2024
1 parent 9dc664c commit e5322bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/backup/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ source ../.env
# Deactivates the automatic export of variables
set +a

# Checks whether the /backup folder exists and creates it if required
if [ ! -d "/backup" ]; then
mkdir -p /backup
fi

# Backup database
docker compose -f compose-backup.yml run db_backup
scp -i ${SSH_KEY_PATH} /backup/database.tar.gz ${SERVER_USER}@${SERVER_IP}:${REMOTE_BACKUP_PATH}
Expand Down

0 comments on commit e5322bd

Please sign in to comment.