diff --git a/rootfs/docker-entrypoint-initdb.d/003_restore_from_backup.sh b/rootfs/docker-entrypoint-initdb.d/003_restore_from_backup.sh index 7d31bae..09b931b 100755 --- a/rootfs/docker-entrypoint-initdb.d/003_restore_from_backup.sh +++ b/rootfs/docker-entrypoint-initdb.d/003_restore_from_backup.sh @@ -48,11 +48,11 @@ EOF -o "-c listen_addresses=''" \ -t 1200 \ -w start -else - echo "No backups found. Performing an initial backup..." - gosu postgres envdir "$WALE_ENVDIR" wal-e backup-push "$PGDATA" fi +echo "Performing an initial backup..." +gosu postgres envdir "$WALE_ENVDIR" wal-e backup-push "$PGDATA" + # ensure $PGDATA has the right permissions chown -R postgres:postgres "$PGDATA" chmod 0700 "$PGDATA"