SierraSoftworks/minback-postgres

Aborting because of server version mismatch

Closed this issue · 4 comments

svua commented

Hi there,
I have problem with postgres backup

k logs pod/prod-postgres-backup-1602570900-vt29t
Dumping dashboard_db to backups/dashboard_db-2020-10-13_06-35-24.archive
> pg_dump -h postgres-postgresql-ha-pgpool.data.svc.cluster.local -Fc dashboard_db
pg_dump: server version: 11.9; pg_dump version: 10.3
pg_dump: aborting because of server version mismatch
mc: <ERROR> Unable to write to one or more targets. Input reader closed pre-maturely. Expected `-1` bytes, but only received `0` bytes.
Backup failed
mc: <ERROR> Failed to remove `pg/backups/dashboard_db-2020-10-13_06-35-24.archive`. Object does not exist

Hi there @svua, can I ask you to try with the latest version of the Docker image? I've just bumped it to PgSQL 13.

svua commented

Hi there @svua, can I ask you to try with the latest version of the Docker image? I've just bumped it to PgSQL 13.

After running I get this error in kubernetes

k logs pod/prod-postgres-backup-1602786660-vdkn9
mc: <ERROR> Incorrect number of arguments for alias set command. Invalid arguments provided, please refer `mc <command> -h` for relevant documentation.

Same error when running through docker

cat backup.env 
MINIO_SERVER=http://10.233.23.101:9000/
MINIO_ACCESS_KEY=user
MINIO_SECRET_KEY=pw
MINIO_BUCKET=backups
docker run --rm --env-file backup.env minback/postgres db -h stage-postgres.stage-data.svc.cluster.local -U user -W pw
mc: <ERROR> Incorrect number of arguments for alias set command. Invalid arguments provided, please refer `mc <command> -h` for relevant documentation.

Thanks for the detailed output @svua and apologies for the delay here. I've updated the entrypoint to support the newest Minio Client's command line arguments (it looks like they switched from a positional argument for API_VERSION to a flag). I've also made some other improvements which should help address any potential issues, but please do let me know if it continues to fail for you.

I suspect that, if it does continue to fail with the version error, I'll need to package up variants for each major PG release.

svua commented

Everything works now. Thanks!