Database restore fails: the input device is not a TTY

I just upgraded to 2023.9. I backed up my data using

docker-compose exec db
pg_dump -T corteza.actionlog -T corteza.automation_sessions -T corteza.resource_activity_log -c -U your-username corteza > dump.sql

which worked fine. I modified the .env and .yaml files to reflect the new version, ran docker-compose pull and docker-compose up -d, and everything seemed to work.

When attempting to restore the database using

cat dump.sql | \
docker-compose exec db psql -U

I get an error message: the input device is not a TTY.

I haven’t seen this before. How do I fix this? Assistance appreciated.

1 Like

Update: using the -T argument on the docker-compose exec command worked.

However, now I have a new problem: I get this at the login screen.

1 Like

Just to close this out, ensuring that the server was shut down before the backup, then bringing it back up, solved this issue.

1 Like

Thanks for updating!

1 Like