On Saturday 13 Feb 2016 17:12:27 J. Roeleveld wrote:
> On 13 February 2016 15:40:33 CET, Michael Orlitzky <[email protected]> wrote:
> >On 02/13/2016 09:04 AM, Mick wrote:
> >> Hi All,
> >> 
> >> How would you suggest I upgrade dev-db/postgresql-9.4.5-r2 to 9.5.1?
> >> 
> >> I read here that dump and restore is probably a cleaner way to
> >
> >upgrade gentoo
> >
> >> based installations, rather than using the pg_dump and pg_restore
> >
> >commands:
> >
> >
> >http://michael.orlitzky.com/articles/upgrading_postgresql-9.x_on_gentoo.php
> >
> >
> >Haha, yes, I remember that. I stand by the note at the top.
> >
> >You can install 9.5 side-by-side with 9.4. That gives you time to look
> >over the configuration for 9.5 while 9.4 is still running. Then when
> >you're ready, run pg_dump/pg_dumpall to back everything up. Stop 9.4,
> >eselect 9.5, start 9.5, and then run pg_restore or psql < backup.sql to
> >load all of the data. It's fast, conceptually simple, and minimizes the
> >downtime.
> >
> >When you're sure it works, don't forget to remove 9.4 from the default
> >runlevel and add 9.5 so that you're not surprised on a reboot.
> 
> Or run both simultaneously on different ports and migrate one
> database/application at a time.
> 
> That will also allow you to dump/restore directly without requiring
> additional diskspace.
> 
> --
> Joost

Thank you both, I used pg_dumpall, but when I tried to restore it with

psql -f postgress_20160213 postgres

it complained that user 'michael' doesn't exist.  Then tried logged in as 
root, whereby it complained that user 'root' doesn't exist.  Then I 'su - 
postgres' and it restored the database.  Is this how I am supposed to restore 
from a backup?

I only run postgres for KDEPIM's akonadi, which seems to work fine post-
upgrade.  :-)

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to