Skip to content

Commit

Permalink
read passwords from secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbauer committed Mar 5, 2024
1 parent 9076c8f commit 4687c7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions create-backup
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ trap send_error_email ERR
destination=/backup_storage
remote_destination=/backup_storage_remote

export PGPASSWORD="$(cat /run/secrets/postgres_password)"
export MYSQLDUMP_PASSWORD="$(cat /run/secrets/mariadb_root_password)"

echo "$(date "+%m-%d-%Y %T"): Removing old backups..."

find $destination/daily -maxdepth 1 -mtime +7 -type f -exec rm -v {} \;
Expand Down

0 comments on commit 4687c7c

Please sign in to comment.