Skip to content

Commit

Permalink
- create folder per configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
maZahaca committed Oct 22, 2024
1 parent 452b518 commit 686faed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backups/src/pg_backup_rotated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ function perform_backups()
local db_user=$4

backup_date=`date +%Y-%m-%d`
backup_file_path="${BACKUP_DIR}${backup_date}${suffix}".backup
backup_file_path="${BACKUP_DIR}${db_host}/${backup_date}${suffix}".backup
backup_progress_file_path="${BACKUP_TMP_DIR}${backup_date}${suffix}".backup
backup_roles_file_path="${backup_file_path}_roles.out"
backup_progress_roles_file_path="${backup_progress_file_path}_roles.out"

mkdir -p "$(dirname "${backup_file_path}")"

if [[ -e ${backup_file_path} ]]; then
log "${backup_file_path} already exists, skipping dump"
return 1
Expand Down

0 comments on commit 686faed

Please sign in to comment.