Re: restore question

2022-07-19 Thread Ronald Haynes
Many thanks folks, the last message by Adrian gave me the relatively simple prescription. 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 whi

Re: restore question

2022-07-19 Thread Adrian Klaver
On 7/19/22 9:44 AM, Ronald Haynes wrote: Thanks Ray, running pSql -f backup-file.sql psql: error: FATAL: database "rhaynes74" does not exist No that is expected as you did not specify a database to connect to using -d . In that case psql uses the OS user name you are running the command a

Re: restore question

2022-07-19 Thread Adrian Klaver
On 7/19/22 9:49 AM, Benedict Holland wrote: You have to create the database to restore to. Then pg_resrore should work. The OP is not using pg_restore but psql as the dump file is plain text. Thanks, Ben -- Adrian Klaver adrian.kla...@aklaver.com

Re: restore question

2022-07-19 Thread Benedict Holland
You have to create the database to restore to. Then pg_resrore should work. Thanks, Ben On Tue, Jul 19, 2022, 12:44 PM Ronald Haynes wrote: > Thanks Ray, running > > pSql -f backup-file.sql > > > > psql: error: FATAL: database "rhaynes74" does not exist > > Which seems odd since rhaynes74 is a

Re: restore question

2022-07-19 Thread Ronald Haynes
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 Com

Re: restore question

2022-07-19 Thread Ray O'Donnell
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 s

restore question

2022-07-19 Thread Ronald Haynes
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.  Psql Postgres f

Re: backup -restore question

2020-07-13 Thread Ron
On 7/13/20 7:37 PM, Adrian Klaver wrote: On 7/13/20 2:56 PM, Ron wrote: On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the r

Re: backup -restore question

2020-07-13 Thread Adrian Klaver
On 7/13/20 2:56 PM, Ron wrote: On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when nee

Re: backup -restore question

2020-07-13 Thread Ron
On 7/13/20 2:32 PM, Adrian Klaver wrote: On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from

Re: backup -restore question

2020-07-13 Thread Adrian Klaver
On 7/13/20 12:12 PM, Julie Nishimura wrote: Hello there, One of our PostgreSQL 9.4.1  databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from a compressed file or I need to unzip the

backup -restore question

2020-07-13 Thread Julie Nishimura
Hello there, One of our PostgreSQL 9.4.1 databases has been backed up as *.gz file with the compression 9 "pg_dump -Z 9". What is the right format of restore this file when needed? Can I run the restore from a compressed file or I need to unzip the file first, then run pg_restore? Thanks