Hi,
If you are using the Centos Hardened image, that error is coming from the container because you are trying to run "su -c" as "postgres", which doesn't work.
I have modified my db-backup.sh and db-restore.sh scripts to add --user root to the docker command there, and this works well for me.
I suspect that there might be one or two disappointed customers that when it comes to restore time, find that all their backup SQLs only contain the words "su: must be suid to work properly" instead of the actual backup.
db-backup.shdocker exec -it --user root $(docker ps --format "{{.ID}}" --filter name=portal_portaldb.1) su -c 'PGPASSWORD=${POSTGRES_PASSWORD} pg_dumpall -U ${POSTGRES_USER} -c' postgres > ../backup/$name
db-restore.shdocker exec -i --user root $(docker ps --format "{{.ID}}" --filter name=portal_portaldb.1) su -c 'PGPASSWORD=${POSTGRES_PASSWORD} psql -U ${POSTGRES_USER} -a postgres' postgres < $name
Best Regards,
DaveV.
Original Message:
Sent: 07-14-2020 03:14 AM
From: Wesley Nyamangwanda
Subject: "su: must be suid to work properly" error on Database restore
Hello
I am trying to restore the database on Portal 4.5 and running into the following error when I run the db-restore script in Centos
su: must be suid to work properly
Failed to restore database from backup
I have tried changing permissions on the backup file and script using chmod 4755 but still does not work, has has anyone else experienced this issue and if so what was the workaround.
------------------------------
Wesley
------------------------------