We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 452b518 commit 686faedCopy full SHA for 686faed
backups/src/pg_backup_rotated.sh
@@ -17,11 +17,13 @@ function perform_backups()
17
local db_user=$4
18
19
backup_date=`date +%Y-%m-%d`
20
- backup_file_path="${BACKUP_DIR}${backup_date}${suffix}".backup
+ backup_file_path="${BACKUP_DIR}${db_host}/${backup_date}${suffix}".backup
21
backup_progress_file_path="${BACKUP_TMP_DIR}${backup_date}${suffix}".backup
22
backup_roles_file_path="${backup_file_path}_roles.out"
23
backup_progress_roles_file_path="${backup_progress_file_path}_roles.out"
24
25
+ mkdir -p "$(dirname "${backup_file_path}")"
26
+
27
if [[ -e ${backup_file_path} ]]; then
28
log "${backup_file_path} already exists, skipping dump"
29
return 1
0 commit comments