public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter J. Holzer <[email protected]>
To: [email protected]
Subject: Re: Help with restoring database from old version of PostgreSQL
Date: Thu, 21 Nov 2024 01:42:53 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAkgG6iWGvmczXnarYTU2PNAWiF3o0DFa47Qzb7M6wjcasNrJQ@mail.gmail.com>
References: <CAAkgG6hSWMwUUivGzoi_ku6JNXmTVXC2mP7XY5Xs+QPnvKjAdQ@mail.gmail.com>
	<[email protected]>
	<CAAkgG6jLBV81cN7ogJF0bHj3ymFJ87ULmbnuX=De2rndoTGNXw@mail.gmail.com>
	<[email protected]>
	<CAAkgG6iWGvmczXnarYTU2PNAWiF3o0DFa47Qzb7M6wjcasNrJQ@mail.gmail.com>

On 2024-11-19 16:47:40 -0500, Catherine Frock wrote:
> I am trying to restore a previously backed up database .sql file that was
> created in PostgreSQL 9.6 using pgAdmin4 (I'm not sure which version I was
> using).
> 
> In response to Ron: Do I need to use PG16 instead of pgAdmin4?

As Ron already pointed out, these are different things. PostgreSQL is a
Database. PgAdmin ist a Client for that database. You can't use one
instead of the other. You can only use them together (but of course you
could use a different client instead of PgAdmin4).

> I set the PostgreSQL Binary Path to: C:\Program
> Files\PostgreSQL\17\bin. I have tried to restore my database using
> this in the command prompt: "psql.exe db_2024_9 <
> C:\postgis\db_2017-08-16.sql postgres" using an empty database in both
> the PostgreSQL 9.6 and 17 servers, and this is the result:
> 
> Password for user postgres:
> SET
[...]
> ALTER TABLE
> ERROR:  role "basic_user" does not exist
[...]
> ALTER DEFAULT PRIVILEGES
> ERROR:  role "basic_user" does not exist

That looks fine except that the user "basic_user" doesn't exist. You
should create that before restoring the backup. Or could fix the errors
after the fact but for that you need to understand what went wrong.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [email protected]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (11+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Help with restoring database from old version of PostgreSQL
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox