No TTY/input needed on backups.

This commit is contained in:
Samuel Clay 2022-04-30 06:47:09 -04:00
parent 94fda89ee5
commit 9ea16aadb7
3 changed files with 4 additions and 4 deletions

View file

@ -10,5 +10,5 @@
- name: reload postgres config
become: yes
command: docker exec postgres pg_ctl reload
command: docker exec -u postgres postgres pg_ctl reload
listen: reload postgres

View file

@ -7,8 +7,8 @@ BACKUP_FILENAME="backup_postgresql_${now}.sql"
BACKUP_FILE="${BACKUP_PATH}${BACKUP_FILENAME}"
UPLOAD_FILE="${UPLOAD_PATH}${BACKUP_FILENAME}"
echo "---> PG dumping - ${now}: ${BACKUP_FILE}"
sudo docker exec -it postgres sh -c "mkdir -p $BACKUP_PATH"
sudo docker exec -it postgres sh -c "/usr/lib/postgresql/13/bin/pg_dump -U newsblur -h 127.0.0.1 -Fc newsblur > $BACKUP_FILE"
sudo docker exec postgres sh -c "mkdir -p $BACKUP_PATH"
sudo docker exec postgres sh -c "/usr/lib/postgresql/13/bin/pg_dump -U newsblur -h 127.0.0.1 -Fc newsblur > $BACKUP_FILE"
echo " ---> Uploading postgres backup to S3"

View file

@ -38,7 +38,7 @@
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
data_directory = '/var/lib/postgresql/data' # use data in another directory
data_directory = '/var/lib/postgresql/main' # use data in another directory
# (change requires restart)
hba_file = '/etc/postgresql/pg_hba.conf' # host-based authentication file
# (change requires restart)