{"id":23,"date":"2012-05-07T15:02:36","date_gmt":"2012-05-07T15:02:36","guid":{"rendered":"http:\/\/toolbox.pingvinfeszek.hu\/?p=23"},"modified":"2012-05-07T15:05:07","modified_gmt":"2012-05-07T15:05:07","slug":"regaining-user-access-after-restoring-a-postgresql-backup-made-with-dumpall","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/regaining-user-access-after-restoring-a-postgresql-backup-made-with-dumpall\/","title":{"rendered":"Regaining user access after restoring a PostgreSQL backup made with dumpall"},"content":{"rendered":"
Usual, frequent backups – containing just about everything – are highly favoured by a wide-range of sysadmins. In some scenarios, it is more than enough to just issue a full backup (including the kitchen sink) then to make selective and separate dumps from parts of the database, based on the size and incremency of the database.<\/p>\n
When restoring a dump made with pg_dumpall to a freshly built host, the following – most uncomfortable – situation had risen:<\/p>\n
– authentication failed for logging in with one of the users
\n– remote access via pgAdmin III was denied<\/p>\n
To remedy the situation, the following steps were made:<\/p>\n
<\/p>\n
1. Change the accepted addresses of the PostgreSQL server<\/p>\n
\u00a0# nano\u00a0\/etc\/postgresql\/8.4\/main\/pg_hba.conf<\/p>\n
>> add this line:<\/p>\n
host all all [your_ip_address_pool]\/24 password<\/p><\/blockquote>\n
<\/p>\n
2. Change the listen address(es) of the PostgreSQL server<\/p>\n
# nano\u00a0\/etc\/postgresql\/8.4\/main\/postgresql.conf<\/p>\n
>> find and change this line:<\/p>\n
listen_addresses=’localhost’<\/p>\n
>> to this:<\/p>\n
listen_addresses=”[the_ip_you_want_to_bind_it_to]”<\/p><\/blockquote>\n
<\/p>\n
3. Alternatively, change the (re-)password of the login user<\/p>\n
# sudo postgres psql<\/p>\n
postgres=# ALTER USER dbuser WITH PASSWORD ‘password’;<\/p>\n
>> also let’s re-enable the login feature
\npostgres=# ALTER USER dbuser WITH LOGIN;<\/p><\/blockquote>\n<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
Usual, frequent backups – containing just about everything – are highly favoured by a wide-range of sysadmins. In some scenarios, it is more than enough to just issue a full backup (including the kitchen sink) then to make selective and separate dumps from parts of the database, based on the size and incremency of the […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,6,9,7],"tags":[19],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/23\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}