restore fails with fe_sendauth: no password supplied at SL/User.pm line 585.
andistern opened this issue · 3 comments
when restoring from a ( very old ) version, I get this:
Restoring dataset version 2.6.12
DBD::Pg::db do warning: at SL/AM.pm line 3338.
done
Upgrading to Version 3.2.4 ...
DBI connect('dbname=action;host=localhost;port=5432','sql-ledger',...) failed: fe_sendauth: no password supplied at SL/User.pm line 585.
Error!
fe_sendauth: no password supplied
and makes the database unusable ( naturally )
just found some sort of "obvious" workaround ( if anybody drops over that issue ):
restore using the commandline :
psql -h host database
\o log.log
\i backup_from_sql-ledger
\q
apply all applicable patches in the correct order from sql directory ( in my case some customer records got lost )
psql -h host database
\o ../../logs/Pg-upgrade-2.6.12-2.7.0.log
select count() from customer;
select * from defaults;
\i sql/Pg-upgrade-2.6.12-2.7.0.sql
-- ... a lot of lines (~150 or so ) omitted for readability
\o ../../logs/Tekki-upgrade-011-015.log
select count() from customer;
select * from defaults;
\i sql/Tekki-upgrade-011-015.sql
select count(*) from customer;
select * from defaults;
\q
... and two lines to be sure to get permissions right:
echo '\d' | psql -h host database | awk '$NF~/andistern/{print "ALTER " $5 " " $1 "." $3 " OWNER TO "sql-ledger";"}' > set_ownership_to_sql_ledger.sql
cat set_ownership_to_sql_ledger.sql | psql -h host database > set_ownership_to_sql_ledger.log
To me it is still not clear what the issue was.
This may be not related, but did you read in doc/faq.html
about backups from version 2.6.13 an lower (title 'PostgreSQL 8.x')?
thanks for the hint, we started with postgresql-8.3 so we already see
DROP TABLE makemodel;
DROP TABLE gl;
DROP TABLE chart;
-- and so on , and
CREATE SEQUENCE id;
SELECT SETVAL('id', 25460, FALSE);
-- and so on
-- in our SQL-Ledger Backup