Red Hat Bugzilla – Bug 1031580
[dbscripts] backup.sh/restore.sh do not work by default
Last modified: 2013-11-18 08:31:24 EST
Description of problem:
backup.sh and restore.sh do not work by default (default pg_hba.conf) at all. It is neither intuitive how to solve it nor it is clever to ask me for password.
(Enterprise means being dumb and user friendly by default.)
Customer does not need to be PSQL expert to just execute backup, would he know about PGPASSWORD? But even with PGPASSWORD it does not work for me.
# egrep -v "^#|^[ \t]*$" /var/lib/pgsql/data/pg_hba.conf
local all all ident
host engine engine 0.0.0.0/0 md5
host engine engine ::0/0 md5
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
# export PGPASSWORD=123456
# ./backup.sh -d engine -u engine -v -l /root/ -f backup-`date "+%Y%m%d%H%M"`.sql
Backup of database engine to /root//backup-201311181132.sql started...
pg_dump: [archiver (db)] connection to database "engine" failed: FATAL: password authentication failed for user "engine"
pg_dump: *** aborted because of error
Backup of database engine failed.
Some more complains:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum install rhevm
3. execute ./backup.sh (as above)
should be clever enough to guide me how to use it or it should ask me for password
using backup.sh and restore.sh should work without any hidden kung-fu. if one would need to change config, type undocumented (in -h output sense) environment variable, then this user could use non-paid upstream as enterprise friendliness of paid product is disputable.
> But even with PGPASSWORD it does not work for me.
14:25 < alonbl> self.environment[$
14:25 < alonbl> osetupcons.DBEnv.PASSWORD$
14:25 < alonbl> ] = self._generatePassword()$
Password is random...