matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

Importing Postgres database fails if dump not publically readable

Open stuart12 opened this issue 2 years ago • 0 comments

Describe the bug

If the dump.sql file is not publicly readable then the Postgres database import silently fails.

To Reproduce

Make the dump.sql file on the server mode 0640 and perform ansible-playbook -i inventory/hosts setup.yml --extra-vars='server_path_postgres_dump=/.../dump.sql postgres_default_import_database=synapse' --tags=import-postgres

Expected behavior The import works or the import fails with a clear error message.

Matrix Server:

  • OS: Debian GNU/Linux 11
  • Architecture amd64

Additional context

Perhaps the import playbook could also check that the database is not empty after the import and warn if it is.

stuart12 avatar Mar 09 '23 00:03 stuart12