prodrigestivill / docker-postgres-backup-local

Backup PostgresSQL to local filesystem with periodic backups and rotate backups.
https://hub.docker.com/r/prodrigestivill/postgres-backup-local
MIT License
760 stars 133 forks source link

Restoring locally -> input device is "not a TTY" #64

Closed BramvdnHeuvel closed 2 years ago

BramvdnHeuvel commented 2 years ago

I am running a PostgreSQL container with the name Synapse_Database. It has a database called synapse which I reach as user synapse. Upon running the command below, the program exits immediately.

zcat local-backup.sql.gz | docker exec --tty --interactive Synapse_Database_Backup psql --username=synapse --dbname=synapse -W

Instead of seemingly doing anything, it only outputs the input device is not a TTY.

I'm running the command on WSL 2 if it matters. Is this a bug or am I doing something wrong?

visini commented 2 years ago

Perhaps related: https://github.com/prodrigestivill/docker-postgres-backup-local/issues/54

prodrigestivill commented 2 years ago

Yes, this is an slightly different case, but I updated the readme. Thanks for the report.