Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDkCK-000252-HF for pgsql-general@arkaria.postgresql.org; Tue, 19 Jul 2022 10:11:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDkCJ-0000qz-E0 for pgsql-general@arkaria.postgresql.org; Tue, 19 Jul 2022 10:11:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDkCI-0000qi-UH for pgsql-general@lists.postgresql.org; Tue, 19 Jul 2022 10:11:23 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oDkCB-0001iu-Rw for pgsql-general@lists.postgresql.org; Tue, 19 Jul 2022 10:11:21 +0000 Received: by mail-qt1-x82e.google.com with SMTP id l14so8253432qtv.4 for ; Tue, 19 Jul 2022 03:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version; bh=Foyao3uTbRbu2NerhsB6R8KeuwZXkEnk+KJrTNyvwFs=; b=P6Vy+Y5QEsT6JRUwBzLALhCFav+XWXhQVjgNTXw+9SR0IDGS+r79Pu1Kw3JEWAixy8 1bc+DmhaDydxY7DH4UY/O5kBO3G4Fnz9wjnAlbG76kStiRUYYcjWBveELrp6xb6+DgIs 9Z4Pngu1Pf0bVOvjs5/42ZGqXooA1/j9UrFTvfMgeZNBr251mmZlBEUE6jKrc4p/ewYS w1U9P4mp5k1zlcnU+U2mee1HGZXFNsqCVzDbD/NT3054DZ/dOaPt3BxRtQ7LeElZCrjy trrZyAwzg8kX5b19NwobbbQTSfKHZl3HGR9zkrXU+ZZigty2diQk11qU8gaRAB/8fH+4 4pDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version; bh=Foyao3uTbRbu2NerhsB6R8KeuwZXkEnk+KJrTNyvwFs=; b=4UEVjLnk9RRdGsNXqkKLiDg/Srhe4xGvZcBlCuPQLjWtcYvS0IAmbPwANc0yNFiuRp m2l4JM4uLRUR24PJrGOGrI1iBFsl51UzxQKW2F4/5RL1mZAFReaAvc9OCLRU0D37zhBm B3HVgvbLgiaS2BlFk0YlmCAJ1xYYZzrTft0wNScHqBgWDkBIy3uNXehfwhxkMKPSgyMn q7QpJpwQG6Q4V88r4GhMUa3Ty1wQdNvkX2rm6MIlWyOpNQXn6wRXLVKszsopaZrnijmm bQad05+tsESq4eH3G7vif7CwOpa0omsIJhXo6+CFRATSxNXg5AfREUOq1no3iZoQd8s2 KP4g== X-Gm-Message-State: AJIora9ylzVIrAB4D5QZSyQuoMotwrUDEH9pUv1eNFd8YcZKGVr/9ldP MBdcDUtMEQ+1qVFIa7tIboj/+S10r+I= X-Google-Smtp-Source: AGRyM1sIZtnNzvr7yUnAMOix4mFkHJVRPFyAXsxRpJ2iwDcNPx6b+DYfWSx1caaPNd1XfadwRXfH4g== X-Received: by 2002:ac8:5a0a:0:b0:31e:f01c:5b62 with SMTP id n10-20020ac85a0a000000b0031ef01c5b62mr6312527qta.364.1658225474648; Tue, 19 Jul 2022 03:11:14 -0700 (PDT) Received: from [192.168.2.238] (stjhnf0157w-142-134-216-250.dhcp-dynamic.fibreop.nl.bellaliant.net. [142.134.216.250]) by smtp.gmail.com with ESMTPSA id k19-20020ac84793000000b0031ece8b6666sm10877771qtq.43.2022.07.19.03.11.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 03:11:14 -0700 (PDT) Date: Tue, 19 Jul 2022 07:41:08 -0230 From: Ronald Haynes To: pgsql-general@lists.postgresql.org Message-ID: <72da6868-8a2c-4378-8857-8391763393cb@Spark> In-Reply-To: <12b2292b-372c-4fe0-9f63-7f641bad688a@Spark> References: <12b2292b-372c-4fe0-9f63-7f641bad688a@Spark> Subject: restore question X-Readdle-Message-ID: 72da6868-8a2c-4378-8857-8391763393cb@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="62d68341_1d545c4d_5d3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --62d68341_1d545c4d_5d3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi folks,=C2=A0=C2=A0I am a fairly novice postgresql user. I have a backup file for a couple of small postgresql databases.=C2=A0=C2= =A0 =C2=A0The backup file was created using postgresql 12.2, my Mac now h= as a postgresql 13.x or 14.x versions.=C2=A0 =C2=A0I would like to restor= e the setup from the backup file. =C2=A0Psql Postgres followed by =5Cl gives: List of databases =C2=A0Name =7C Owner =7C Encoding =7C Collate =7C Ctype =7C Access privil= eges -----------+-----------+----------+---------+-------+--------------------= ----- =C2=A0postgres =7C rhaynes74 =7C UT=468 =7C C =7C C =7C =C2=A0template0 =7C rhaynes74 =7C UT=468 =7C C =7C C =7C =3Dc/rhaynes74 += =C2=A0=7C =7C =7C =7C =7C rhaynes74=3DCTc/rhaynes74 =C2=A0template1 =7C rhaynes74 =7C UT=468 =7C C =7C C =7C =3Dc/rhaynes74 += =C2=A0=7C =7C =7C =7C =7C rhaynes74=3DCTc/rhaynes74 The user that owns the databases in the backup do not currently exist. Here is the header information in the backup file, what are the steps to = proceed with the restore=3F ----- -- -- PostgreSQL database cluster dump -- SET default=5Ftransaction=5Fread=5Fonly =3D off; SET client=5Fencoding =3D 'UT=468'; SET standard=5Fconforming=5Fstrings =3D on; -- -- Roles -- CREATE ROLE postgres; ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN NORE= PLICATION NOBYPASSRLS; CREATE ROLE rhaynes; ALTER ROLE rhaynes WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLI= CATION BYPASSRLS; -- -- Databases -- -- -- Database =22template1=22 dump -- =5Cconnect template1 -- -- PostgreSQL database dump -- -- Dumped from database version 12.2 -- Dumped by pg=5Fdump version 12.2 SET statement=5Ftimeout =3D 0; SET lock=5Ftimeout =3D 0; SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0; SET client=5Fencoding =3D 'UT=468'; SET standard=5Fconforming=5Fstrings =3D on; SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false); SET check=5Ffunction=5Fbodies =3D false; SET xmloption =3D content; SET client=5Fmin=5Fmessages =3D warning; SET row=5Fsecurity =3D off; -- -- PostgreSQL database dump complete -- -- -- Database =22hockey1=22 dump -- -- -- PostgreSQL database dump -- -- Dumped from database version 12.2 -- Dumped by pg=5Fdump version 12.2 SET statement=5Ftimeout =3D 0; SET lock=5Ftimeout =3D 0; SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0; SET client=5Fencoding =3D 'SQL=5FASCII'; SET standard=5Fconforming=5Fstrings =3D on; SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false); SET check=5Ffunction=5Fbodies =3D false; SET xmloption =3D content; SET client=5Fmin=5Fmessages =3D warning; SET row=5Fsecurity =3D off; -- -- Name: hockey1; Type: DATABASE; Schema: -; Owner: rhaynes -- CREATE DATABASE hockey1 WITH TEMPLATE =3D template0 ENCODING =3D 'SQL=5FA= SCII' LC=5FCOLLATE =3D 'C' LC=5FCTYPE =3D 'C'; ALTER DATABASE hockey1 OWNER TO rhaynes; =5Cconnect hockey1 SET statement=5Ftimeout =3D 0; SET lock=5Ftimeout =3D 0; SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0; SET client=5Fencoding =3D 'SQL=5FASCII'; SET standard=5Fconforming=5Fstrings =3D on; SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false); SET check=5Ffunction=5Fbodies =3D false; SET xmloption =3D content; SET client=5Fmin=5Fmessages =3D warning; SET row=5Fsecurity =3D off; SET default=5Ftablespace =3D ''; SET default=5Ftable=5Faccess=5Fmethod =3D heap; -- -- Name: tradelistnew; Type: TABLE; Schema: public; Owner: rhaynes -- CREATE TABLE public.tradelistnew ( =C2=A0year character varying(80), =C2=A0manufacturer character varying(80), =C2=A0set character varying(80), =C2=A0card=5Fnumber character varying(5), =C2=A0player=5Fname character varying(80), =C2=A0quantitynrmt integer, =C2=A0quantityexmt integer, =C2=A0quantityex integer, =C2=A0quantityvg integer, =C2=A0quantitypfg integer, =C2=A0valuenrmt real, =C2=A0valueexmt real, =C2=A0valueex real, =C2=A0valuevg real, =C2=A0valuepfg real ); 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=C2=A0which Memorial University=E2=80=99s= =C2=A0campuses are situated are in the=C2=A0traditional territories of di= verse=C2=A0Indigenous groups, and we=C2=A0acknowledge with respect the di= verse=C2=A0histories and cultures of the Beothuk,=C2=A0Mi=E2=80=99kmaq, I= nnu, and Inuit of this=C2=A0province. --62d68341_1d545c4d_5d3 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi folks,&=23160;&=23160;I am a fairly novice postg= resql user.&=23160;&=23160;



I have a backup file for a couple of small postgresql databases.&=23160;&= =23160; &=23160;The backup file was created using postgresql 12.2, my Mac= now has a postgresql 13.x or 14.x versions.&=23160; &=23160;I would like= to restore the setup from the backup file.&=23160;&=23160;

&=23160;Psql Postgres followed by =5Cl gives:

List of databases
&=23160;Name =7C Owner =7C Encoding =7C Collate =7C Ctype =7C Access priv= ileges
-----------+-----------+----------+---------+-------+--------------------= -----
&=23160;postgres =7C rhaynes74 =7C UT=468 =7C C =7C C =7C
&=23160;template0 =7C rhaynes74 =7C UT=468 =7C C =7C C =7C =3Dc/rhaynes74= +
&=23160;=7C =7C =7C =7C =7C rhaynes74=3DCTc/rhaynes74
&=23160;template1 =7C rhaynes74 =7C UT=468 =7C C =7C C =7C =3Dc/rhaynes74= +
&=23160;=7C =7C =7C =7C =7C rhaynes74=3DCTc/rhaynes74

The user that owns the databases in the backup do not currently exist.&=23= 160;&=23160; &=23160;

Here is the header information in the backup file, what are the steps to = proceed with the restore=3F&=23160;

-----
--
-- PostgreSQL database cluster dump
--

SET default=5Ftransaction=5Fread=5Fonly =3D off;

SET client=5Fencoding =3D 'UT=468';
SET standard=5Fconforming=5Fstrings =3D on;

--
-- Roles
--

CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN NORE= PLICATION NOBYPASSRLS;
CREATE ROLE rhaynes;
ALTER ROLE rhaynes WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLI= CATION BYPASSRLS;






--
-- Databases
--

--
-- Database =22template1=22 dump
--

=5Cconnect template1

--
-- PostgreSQL database dump
--

-- Dumped from database version 12.2
-- Dumped by pg=5Fdump version 12.2

SET statement=5Ftimeout =3D 0;
SET lock=5Ftimeout =3D 0;
SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0;
SET client=5Fencoding =3D 'UT=468';
SET standard=5Fconforming=5Fstrings =3D on;
SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false);
SET check=5Ffunction=5Fbodies =3D false;
SET xmloption =3D content;
SET client=5Fmin=5Fmessages =3D warning;
SET row=5Fsecurity =3D off;

--
-- PostgreSQL database dump complete
--

--
-- Database =22hockey1=22 dump
--

--
-- PostgreSQL database dump
--

-- Dumped from database version 12.2
-- Dumped by pg=5Fdump version 12.2

SET statement=5Ftimeout =3D 0;
SET lock=5Ftimeout =3D 0;
SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0;
SET client=5Fencoding =3D 'SQL=5FASCII';
SET standard=5Fconforming=5Fstrings =3D on;
SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false);
SET check=5Ffunction=5Fbodies =3D false;
SET xmloption =3D content;
SET client=5Fmin=5Fmessages =3D warning;
SET row=5Fsecurity =3D off;

--
-- Name: hockey1; Type: DATABASE; Schema: -; Owner: rhaynes
--

CREATE DATABASE hockey1 WITH TEMPLATE =3D template0 ENCODING =3D 'SQL=5FA= SCII' LC=5FCOLLATE =3D 'C' LC=5FCTYPE =3D 'C';


ALTER DATABASE hockey1 OWNER TO rhaynes;

=5Cconnect hockey1

SET statement=5Ftimeout =3D 0;
SET lock=5Ftimeout =3D 0;
SET idle=5Fin=5Ftransaction=5Fsession=5Ftimeout =3D 0;
SET client=5Fencoding =3D 'SQL=5FASCII';
SET standard=5Fconforming=5Fstrings =3D on;
SELECT pg=5Fcatalog.set=5Fconfig('search=5Fpath', '', false);
SET check=5Ffunction=5Fbodies =3D false;
SET xmloption =3D content;
SET client=5Fmin=5Fmessages =3D warning;
SET row=5Fsecurity =3D off;

SET default=5Ftablespace =3D '';

SET default=5Ftable=5Faccess=5Fmethod =3D heap;

--
-- Name: tradelistnew; Type: TABLE; Schema: public; Owner: rhaynes
--

CREATE TABLE public.tradelistnew (
&=23160;year character varying(80),
&=23160;manufacturer character varying(80),
&=23160;set character varying(80),
&=23160;card=5Fnumber character varying(5),
&=23160;player=5Fname character varying(80),
&=23160;quantitynrmt integer,
&=23160;quantityexmt integer,
&=23160;quantityex integer,
&=23160;quantityvg integer,
&=23160;quantitypfg integer,
&=23160;valuenrmt real,
&=23160;valueexmt real,
&=23160;valueex real,
&=23160;valuevg real,
&=23160;valuepfg real
);

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&=23160;= which Memorial University=E2=80=99s&=23160;campuses are situated are in t= he&=23160;traditional territories of diverse&=23160;Indigenous groups, an= d we&=23160;acknowledge with respect the diverse&=23160;histories and cul= tures of the Beothuk,&=23160;Mi=E2=80=99kmaq, Innu, and Inuit of this&=23= 160;province.
--62d68341_1d545c4d_5d3--