pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ronald Haynes <rhaynes74@gmail.com>
To: pgsql-general@lists.postgresql.org, Ray O'Donnell <ray@rodonnell.ie>
Subject: Re: restore question
Date: Tue, 19 Jul 2022 14:14:01 -0230
Message-ID: <592b6261-8a4f-481f-853a-b80f159dcb1e@Spark> (raw)
In-Reply-To: <89905c07-ae17-a1a7-2a26-ba8ab6109c50@rodonnell.ie>
References: <12b2292b-372c-4fe0-9f63-7f641bad688a@Spark>
	<72da6868-8a2c-4378-8857-8391763393cb@Spark>
	<89905c07-ae17-a1a7-2a26-ba8ab6109c50@rodonnell.ie>

Thanks Ray, running

pSql -f backup-file.sql



psql: error: FATAL: database "rhaynes74" does not exist

Which seems odd since rhaynes74 is a user not a database name in the file.

Sincerely,

Dr. Ronald D. Haynes
Professor, Department of Mathematics and Statistics
Chair, MSc and Phd Scientific Computing Programs
Memorial University of Newfoundland

We acknowledge that the lands on which Memorial University’s campuses are situated are in the traditional territories of diverse Indigenous groups, and we acknowledge with respect the diverse histories and cultures of the Beothuk, Mi’kmaq, Innu, and Inuit of this province.
On Jul 19, 2022, 9:40 AM -0230, Ray O'Donnell <ray@rodonnell.ie>, wrote:
> On 19/07/2022 11:11, Ronald Haynes wrote:
> > Hi folks,  I am a fairly novice postgresql user.
> >
> >
> >
> > I have a backup file for a couple of small postgresql databases.    The
> > backup file was created using postgresql 12.2, my Mac now has a
> > postgresql 13.x or 14.x versions.   I would like to restore the setup
> > from the backup file.
> >
>
> That looks like a dump file generated by pg_dumpall, so restoring it
> should be as simple as:
>
> psql -f backup-file.sql
>
> You'll possibly need other connection parameters as required by psql,
> such as -U (the PostgreSQL user to use for connecting) or others.
>
> HTH,
>
> Ray.
>
>
> --
> Raymond O'Donnell // Galway // Ireland
> ray@rodonnell.ie

view thread (7+ messages)  latest in thread

Message-ID: <592b6261-8a4f-481f-853a-b80f159dcb1e@Spark>
Permalink:  ../592b6261-8a4f-481f-853a-b80f159dcb1e@Spark/
Also on:    postgresql.org/message-id/592b6261-8a4f-481f-853a-b80f159dcb1e@Spark

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rhaynes74@gmail.com, ray@rodonnell.ie
  Subject: Re: restore question
  In-Reply-To: <592b6261-8a4f-481f-853a-b80f159dcb1e@Spark>
  References: <12b2292b-372c-4fe0-9f63-7f641bad688a@Spark> <72da6868-8a2c-4378-8857-8391763393cb@Spark> <89905c07-ae17-a1a7-2a26-ba8ab6109c50@rodonnell.ie> <592b6261-8a4f-481f-853a-b80f159dcb1e@Spark>

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

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