On 23 December 2015 at 21:37, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
On 12/23/2015 12:12 PM, John R Pierce wrote:
I was half awake early this AM and perused my email, and noted a fubar
in one of the command sets shown to you but too sleepy to try and reply
at the time, and now this thread is WAY too silly long to find it again,
but I think someone neglected to put the database name on a pg_restore
command. if you don't give pg_restore a dbname, it just spews the
SQL out on the console, which is what it sounded like Killian may have
described.
yeah, this one from Adrian, at 7:02am PST (Z-0800) this morning....
Per previous posts you want, whenever possible, to us a newer version
of pg_dump to move a database from an older version(9.3) to a newer
one(9.4). Therefore you should do your dump and restore using the
pg_dump.exe and pg_restore.exe from the Bitanami bin directory. I
would cd to the above directory and do:
pg_dump -V
pg_restore -V
to make sure the programs are found and are the 9.4 versions.
Then do:
pg_dump -Fc -p 5432 -U postgres -f irll_project.out irll_project
pg_restore -U postgres -p 5532 irll_project.out
that last needs to have -d newdbname where newdbname has already
been created, for instance, by...
Aah, my mistake. Yes you need to specify the database to get the restore to work properly. Also explains why there is nothing in the logs.
OK - with the inclusion of stating the dbname the restore works, but not correctly: what is restored is 24 of 48 tables and 1 of 22 views from one schema and no tables from the other schema.
A log appeared at 0:08 last night (I'm at GMT +1), which I've attached. Plus, I did the dump and restore again this morning and have attached the text from the windows shell if that helps
C:\Bitnami\wappstack-5.5.30-0\postgresql\bin\createdb -p 5532 -U
postgres newdbname
BEFORE you can restore to it....
anyways, this thread has gone on WAY too long, Killian needs to learn
the basics of command line operations on MS Windows, which admittedly
are rather klunky, but are quite outside the charter of the
pgsql-general email list.
Yes, I realise this is high end list, and as mentioned above my pay grade....
p.s. please don't CC me answers, I get every email sent to the list,
with the CC's I end up getting two of every one.\
Sorry....
FYI, you can go here:
http://www.postgresql.org/mailpref/pgsql-general
and set eliminatecc to have the listserver do that for you.
Thanks
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Command was: ALTER TABLE ONLY surveypoint ADD CONSTRAINT locality_surveypoint FOREIGN KEY (locality_id) REFERENCES loc ality(locality_... pg_restore: [archiver (db)] Error from TOC entry 3698; 2606 305856 FK CONSTRAINT macro_lookupgr_macroscopic postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "macro_l ookupgr_macroscopic" for relation "macroscopic" already exists Command was: ALTER TABLE ONLY macroscopic ADD CONSTRAINT macro_lookupgr_macroscopic FOREIGN KEY (grain_id) REFERENCES grain_lookup(gr... pg_restore: [archiver (db)] Error from TOC entry 3699; 2606 305861 FK CONSTRAINT macro_lookuplu_macroscopic postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "macro_l ookuplu_macroscopic" for relation "macroscopic" already exists Command was: ALTER TABLE ONLY macroscopic ADD CONSTRAINT macro_lookuplu_macroscopic FOREIGN KEY (lustre_id) REFERENCES lustre_lookup(... pg_restore: [archiver (db)] Error from TOC entry 3700; 2606 305866 FK CONSTRAINT macro_lookuptr_macroscopic postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "macro_l ookuptr_macroscopic" for relation "macroscopic" already exists Command was: ALTER TABLE ONLY macroscopic ADD CONSTRAINT macro_lookuptr_macroscopic FOREIGN KEY (translucency_id) REFE RENCES transluc... pg_restore: [archiver (db)] Error from TOC entry 3671; 2606 248648 FK CONSTRAINT material_arcsample postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "materia l_arcsample" for relation "arcsample" already exists Command was: ALTER TABLE ONLY arcsample ADD CONSTRAINT material_arcsample FOREIGN KEY (material_id) REFERENCES mater ial(material_id) ... pg_restore: [archiver (db)] Error from TOC entry 3703; 2606 248653 FK CONSTRAINT material_sample postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "materia l_sample" for relation "sample" already exists Command was: ALTER TABLE ONLY sample ADD CONSTRAINT material_sample FOREIGN KEY (material_id) REFERENCES material (material_id) ON UPD... pg_restore: [archiver (db)] Error from TOC entry 3692; 2606 248658 FK CONSTRAINT reference_formation_reference postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "referen ce_formation_reference" for relation "formation_reference" already exists Command was: ALTER TABLE ONLY formation_reference ADD CONSTRAINT reference_formation_reference FOREIGN KEY (reference_id) REFE RENCES ... pg_restore: [archiver (db)] Error from TOC entry 3710; 2606 248663 FK CONSTRAINT reference_reference_sample postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "referen ce_reference_sample" for relation "reference_sample" already exists Command was: ALTER TABLE ONLY reference_sample ADD CONSTRAINT reference_reference_sample FOREIGN KEY (reference_id) REFEREN CES refere... pg_restore: [archiver (db)] Error from TOC entry 3704; 2606 248668 FK CONSTRAINT sample_formation postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ formation" for relation "sample" already exists Command was: ALTER TABLE ONLY sample ADD CONSTRAINT sample_formation FOREIGN KEY (formation_id) REFERENCES format ion(formation_id) ON... pg_restore: [archiver (db)] Error from TOC entry 3694; 2606 248673 FK CONSTRAINT sample_geochemical postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ geochemical" for relation "geochemical" already exists Command was: ALTER TABLE ONLY geochemical ADD CONSTRAINT sample_geochemical FOREIGN KEY (sample_id) REFERENCES sample( sample_id) ON U... pg_restore: [archiver (db)] Error from TOC entry 3697; 2606 248683 FK CONSTRAINT sample_macroscopic postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ macroscopic" for relation "macroscopic" already exists Command was: ALTER TABLE ONLY macroscopic ADD CONSTRAINT sample_macroscopic FOREIGN KEY (sample_id) REFERENCES sample( sample_id) ON U... pg_restore: [archiver (db)] Error from TOC entry 3702; 2606 248688 FK CONSTRAINT sample_microscopic postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ microscopic" for relation "microscopic" already exists Command was: ALTER TABLE ONLY microscopic ADD CONSTRAINT sample_microscopic FOREIGN KEY (sample_id) REFERENCES sample( sample_id) ON U... pg_restore: [archiver (db)] Error from TOC entry 3711; 2606 248693 FK CONSTRAINT sample_reference_sample postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ reference_sample" for relation "reference_sample" already exists Command was: ALTER TABLE ONLY reference_sample ADD CONSTRAINT sample_reference_sample FOREIGN KEY (sample_id) REFERENCES sa mple(sampl... pg_restore: [archiver (db)] Error from TOC entry 3705; 2606 248698 FK CONSTRAINT sample_sample_type postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "sample_ sample_type" for relation "sample" already exists Command was: ALTER TABLE ONLY sample ADD CONSTRAINT sample_sample_type FOREIGN KEY (sample_type_id) REFERENCES sa mple_type(sample_typ... pg_restore: [archiver (db)] Error from TOC entry 3706; 2606 248703 FK CONSTRAINT sample_surveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nt" does not exist Command was: ALTER TABLE ONLY sample ADD CONSTRAINT sample_surveypoint FOREIGN KEY (surveypoint_id) REFERENCES su rveypoint(surveypoin... pg_restore: [archiver (db)] Error from TOC entry 3712; 2606 248708 FK CONSTRAINT surveyor_id postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "surveyo r_id" for relation "surveyor_survypnt_junc" already exists Command was: ALTER TABLE ONLY surveyor_survypnt_junc ADD CONSTRAINT surveyor_id FOREIGN KEY (surveyor_id) REFERENCES surveyor(sur veyo... pg_restore: [archiver (db)] Error from TOC entry 3713; 2606 248713 FK CONSTRAINT surveypoint_id postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nt" does not exist Command was: ALTER TABLE ONLY surveyor_survypnt_junc ADD CONSTRAINT surveypoint_id FOREIGN KEY (surveypoint_id) REFERENCES survey poin... pg_restore: [archiver (db)] Error from TOC entry 3679; 2606 248723 FK CONSTRAINT surveypoint_type_arcsurveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "arcsurvey point" does not exist Command was: ALTER TABLE ONLY arcsurveypoint ADD CONSTRAINT surveypoint_type_arcsurveypoint FOREIGN KEY (surveypoint_type _id) REFEREN... pg_restore: [archiver (db)] Error from TOC entry 3689; 2606 248728 FK CONSTRAINT surveypoint_type_surveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nt" does not exist Command was: ALTER TABLE ONLY surveypoint ADD CONSTRAINT surveypoint_type_surveypoint FOREIGN KEY (surveypoint_type_id ) REFERENCES su... pg_restore: [archiver (db)] Error from TOC entry 3709; 2606 248815 FK CONSTRAINT svy_sam_image_junc_sample postgres pg_restore: [archiver (db)] could not execute query: ERROR: constraint "svy_sam _image_junc_sample" for relation "svy_sam_image_junc" already exists Command was: ALTER TABLE ONLY svy_sam_image_junc ADD CONSTRAINT svy_sam_image_junc_sample FOREIGN KEY (sample_id) REFERENCES sample(s... pg_restore: [archiver (db)] Error from TOC entry 3708; 2606 248733 FK CONSTRAINT svy_sam_image_junc_surveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nt" does not exist Command was: ALTER TABLE ONLY svy_sam_image_junc ADD CONSTRAINT svy_sam_image_junc_surveypoint FOREIGN KEY (surveypoint_id) R EFERENCE... pg_restore: [archiver (db)] Error from TOC entry 3680; 2606 248738 FK CONSTRAINT townlands_arcsurveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "arcsurvey point" does not exist Command was: ALTER TABLE ONLY arcsurveypoint ADD CONSTRAINT townlands_arcsurveypoint FOREIGN KEY (twnlnd_id) REFERENCES t ownlands(twn... pg_restore: [archiver (db)] Error from TOC entry 3690; 2606 248743 FK CONSTRAINT townlands_surveypoint postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nt" does not exist Command was: ALTER TABLE ONLY surveypoint ADD CONSTRAINT townlands_surveypoint FOREIGN KEY (twnlnd_id) REFERENCES town lands(twnlnd_id... pg_restore: [archiver (db)] Error from TOC entry 3962; 0 0 ACL ni10k_bdrck postg res pg_restore: [archiver (db)] could not execute query: ERROR: relation "ni10k_bdr ck" does not exist Command was: REVOKE ALL ON TABLE ni10k_bdrck FROM PUBLIC; REVOKE ALL ON TABLE ni10k_bdrck FROM postgres; GRANT ALL ON TABLE ni10k_bdrck T... pg_restore: [archiver (db)] Error from TOC entry 3964; 0 0 ACL ni250k_bdrck_geol postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "ni250k_bd rck_geol" does not exist Command was: REVOKE ALL ON TABLE ni250k_bdrck_geol FROM PUBLIC; REVOKE ALL ON TABLE ni250k_bdrck_geol FROM postgres; GRANT ALL ON TABLE n... pg_restore: [archiver (db)] Error from TOC entry 3966; 0 0 ACL ni250k_bdrck_line postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "ni250k_bd rck_line" does not exist Command was: REVOKE ALL ON TABLE ni250k_bdrck_line FROM PUBLIC; REVOKE ALL ON TABLE ni250k_bdrck_line FROM postgres; GRANT ALL ON TABLE n... pg_restore: [archiver (db)] Error from TOC entry 3968; 0 0 ACL ni250k_surfic_geo l postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "ni250k_su rfic_geol" does not exist Command was: REVOKE ALL ON TABLE ni250k_surfic_geol FROM PUBLIC; REVOKE ALL ON TABLE ni250k_surfic_geol FROM postgres; GRANT ALL ON TABLE... pg_restore: [archiver (db)] Error from TOC entry 3970; 0 0 ACL rcregg3b2 postgre s pg_restore: [archiver (db)] could not execute query: ERROR: relation "rcregg3b2 " does not exist Command was: REVOKE ALL ON TABLE rcregg3b2 FROM PUBLIC; REVOKE ALL ON TABLE rcregg3b2 FROM postgres; GRANT ALL ON TABLE rcregg3b2 TO post... pg_restore: [archiver (db)] Error from TOC entry 3971; 0 0 ACL rcregg3b2_findspo t_num postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "rcregg3b2 _findspot_num" does not exist Command was: REVOKE ALL ON TABLE rcregg3b2_findspot_num FROM PUBLIC; REVOKE ALL ON TABLE rcregg3b2_findspot_num FROM postgres; GRANT ALL ... pg_restore: [archiver (db)] Error from TOC entry 3985; 0 0 ACL image_temp postgr es pg_restore: [archiver (db)] could not execute query: ERROR: relation "image_tem p" does not exist Command was: REVOKE ALL ON TABLE image_temp FROM PUBLIC; REVOKE ALL ON TABLE image_temp FROM postgres; GRANT ALL ON TABLE image_temp TO p... pg_restore: [archiver (db)] Error from TOC entry 3989; 0 0 ACL irlbeach_cret_che rt postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlbeach_ cret_chert" does not exist Command was: REVOKE ALL ON TABLE irlbeach_cret_chert FROM PUBLIC; REVOKE ALL ON TABLE irlbeach_cret_chert FROM postgres; GRANT ALL ON TAB... pg_restore: [archiver (db)] Error from TOC entry 3991; 0 0 ACL irlcoast_surv pos tgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlcoast_ surv" does not exist Command was: REVOKE ALL ON TABLE irlcoast_surv FROM PUBLIC; REVOKE ALL ON TABLE irlcoast_surv FROM postgres; GRANT ALL ON TABLE irlcoast_... pg_restore: [archiver (db)] Error from TOC entry 3992; 0 0 ACL irlcoast_surv_b15 k postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlcoast_ surv_b15k" does not exist Command was: REVOKE ALL ON TABLE irlcoast_surv_b15k FROM PUBLIC; REVOKE ALL ON TABLE irlcoast_surv_b15k FROM postgres; GRANT ALL ON TABLE... pg_restore: [archiver (db)] Error from TOC entry 3995; 0 0 ACL irlcounty32_for_i rlarea_select postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlcounty 32_for_irlarea_select" does not exist Command was: REVOKE ALL ON TABLE irlcounty32_for_irlarea_select FROM PUBLIC; REVOKE ALL ON TABLE irlcounty32_for_irlarea_select FROM post... pg_restore: [archiver (db)] Error from TOC entry 3996; 0 0 ACL irlcounty32_for_i rlarea_select2 postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlcounty 32_for_irlarea_select2" does not exist Command was: REVOKE ALL ON TABLE irlcounty32_for_irlarea_select2 FROM PUBLIC ; REVOKE ALL ON TABLE irlcounty32_for_irlarea_select2 FROM po... pg_restore: [archiver (db)] Error from TOC entry 4000; 0 0 ACL irllakeshannon po stgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irllakesh annon" does not exist Command was: REVOKE ALL ON TABLE irllakeshannon FROM PUBLIC; REVOKE ALL ON TABLE irllakeshannon FROM postgres; GRANT ALL ON TABLE irllake... pg_restore: [archiver (db)] Error from TOC entry 4004; 0 0 ACL irlrivercorrib po stgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlriverc orrib" does not exist Command was: REVOKE ALL ON TABLE irlrivercorrib FROM PUBLIC; REVOKE ALL ON TABLE irlrivercorrib FROM postgres; GRANT ALL ON TABLE irlrive... pg_restore: [archiver (db)] Error from TOC entry 4006; 0 0 ACL irlrivshannon pos tgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "irlrivsha nnon" does not exist Command was: REVOKE ALL ON TABLE irlrivshannon FROM PUBLIC; REVOKE ALL ON TABLE irlrivshannon FROM postgres; GRANT ALL ON TABLE irlrivsha... pg_restore: [archiver (db)] Error from TOC entry 4010; 0 0 ACL locality_temp pos tgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "locality_ temp" does not exist Command was: REVOKE ALL ON TABLE locality_temp FROM PUBLIC; REVOKE ALL ON TABLE locality_temp FROM postgres; GRANT ALL ON TABLE locality_... pg_restore: [archiver (db)] Error from TOC entry 4020; 0 0 ACL query_srpnt_sampl e_irll14 postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "query_srp nt_sample_irll14" does not exist Command was: REVOKE ALL ON TABLE query_srpnt_sample_irll14 FROM PUBLIC; REVOKE ALL ON TABLE query_srpnt_sample_irll14 FROM postgres; GRAN... pg_restore: [archiver (db)] Error from TOC entry 4021; 0 0 ACL query_srpnt_sampl e_macro_irll14 postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "query_srp nt_sample_macro_irll14" does not exist Command was: REVOKE ALL ON TABLE query_srpnt_sample_macro_irll14 FROM PUBLIC ; REVOKE ALL ON TABLE query_srpnt_sample_macro_irll14 FROM po... pg_restore: [archiver (db)] Error from TOC entry 4022; 0 0 ACL query_surv_sam_im age_irll14 postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "query_sur v_sam_image_irll14" does not exist Command was: REVOKE ALL ON TABLE query_surv_sam_image_irll14 FROM PUBLIC; REVOKE ALL ON TABLE query_surv_sam_image_irll14 FROM postgres; ... pg_restore: [archiver (db)] Error from TOC entry 4031; 0 0 ACL surveypoints_2015 postgres pg_restore: [archiver (db)] could not execute query: ERROR: relation "surveypoi nts_2015" does not exist Command was: REVOKE ALL ON TABLE surveypoints_2015 FROM PUBLIC; REVOKE ALL ON TABLE surveypoints_2015 FROM postgres; GRANT ALL ON TABLE s... WARNING: errors ignored on restore: 412 C:\Bitnami\wappstack-5.5.30-0\postgresql\bin>
Attachment:
postgresql-2015-12-23_092357.log
Description: Binary data
-- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general