Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 如何将数据从heroku迁移到不同的VP?_Postgresql_Heroku_Heroku Postgres_Pg Restore - Fatal编程技术网

Postgresql 如何将数据从heroku迁移到不同的VP?

Postgresql 如何将数据从heroku迁移到不同的VP?,postgresql,heroku,heroku-postgres,pg-restore,Postgresql,Heroku,Heroku Postgres,Pg Restore,我有一个postgres数据库,我的后端托管在Heroku。我现在将vps更换为另一家供应商。 我使用了以下命令: heroku pg:backups:capture heroku pg:backups:download 获取转储文件,然后运行以下comamnd to pg_restore to remote vps postgres(我有ssh到远程服务器): 我收到以下消息/错误: pg_restore: creating INDEX "public.partners_address_e9

我有一个postgres数据库,我的后端托管在Heroku。我现在将vps更换为另一家供应商。 我使用了以下命令:

heroku pg:backups:capture
heroku pg:backups:download
获取转储文件,然后运行以下comamnd to pg_restore to remote vps postgres(我有ssh到远程服务器):

我收到以下消息/错误:

pg_restore: creating INDEX "public.partners_address_e9624195"
pg_restore: [archiver (db)] Error from TOC entry 5465; 1259 6124214 INDEX partners_address_e9624195 vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_e9624195" ON "public"."partners_address" USING "btree" ("businesses_id");



pg_restore: creating INDEX "public.partners_address_latitude_38918148755fccdf_uniq"
pg_restore: [archiver (db)] Error from TOC entry 5466; 1259 6124984 INDEX partners_address_latitude_38918148755fccdf_uniq vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_latitude_38918148755fccdf_uniq" ON "public"."partners_address" USING "btree" ("latitude");



pg_restore: creating INDEX "public.partners_address_location_id"
pg_restore: [archiver (db)] Error from TOC entry 5467; 1259 6124734 INDEX partners_address_location_id vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_location_id" ON "public"."partners_address" USING "gist" ("location");



pg_restore: creating INDEX "public.partners_address_longitude_6a1bd0c5aaf227a5_uniq"
pg_restore: [archiver (db)] Error from TOC entry 5468; 1259 6124985 INDEX partners_address_longitude_6a1bd0c5aaf227a5_uniq vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_longitude_6a1bd0c5aaf227a5_uniq" ON "public"."partners_address" USING "btree" ("longitude");



pg_restore: creating INDEX "public.partners_addressdummy_location_id"
pg_restore: [archiver (db)] Error from TOC entry 5484; 1259 6124296 INDEX partners_addressdummy_location_id vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_addressdummy" does not exist
    Command was: CREATE INDEX "partners_addressdummy_location_id" ON "public"."partners_addressdummy" USING "gist" ("location");


pg_restore: creating FK CONSTRAINT "public.partners_company partners_com_partner_id_68062c1b87fe6c02_fk_partners_partner_id"
pg_restore: creating FK CONSTRAINT "public.partners_companybankinginformation partners_comp_company_id_a85698afe499099_fk_partners_company_id"
pg_restore: creating FK CONSTRAINT "public.partners_fitnessinstantflooroffer partners_fi_business_id_db86587ff737cea_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_partneraddons partners_par_addon_id_9f51a49f7df191c_fk_partners_addonmodel_id"
pg_restore: creating FK CONSTRAINT "public.partners_partneraddons partners_par_partner_id_409ed0f55743b48e_fk_partners_partner_id"
pg_restore: creating FK CONSTRAINT "public.partners_partner partners_partner_user_id_ca28b796442d283_fk_auth_user_id"
pg_restore: creating FK CONSTRAINT "public.partners_salonmenu partners_s_business_id_2e0ca679b0a24854_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_sixdigitcode partners_s_business_id_345f911c3107973d_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_trackbusinessdetails partners_t_business_id_1eb5c6794f6b1ada_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_date recu_recurrence_id_4b67510aee5dda10_fk_recurrence_recurrence_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_rule recu_recurrence_id_7ff1cb1803879eea_fk_recurrence_recurrence_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_param recurrence_param_rule_id_5163400228e5d6ac_fk_recurrence_rule_id"
pg_restore: creating FK CONSTRAINT "public.social_auth_usersocialauth social_auth_usersocial_user_id_5af7eafade59e216_fk_auth_user_id"
WARNING: errors ignored on restore: 335
此操作是在空数据库上执行的。我做错了什么

救命啊

谢谢

pg_restore: creating INDEX "public.partners_address_e9624195"
pg_restore: [archiver (db)] Error from TOC entry 5465; 1259 6124214 INDEX partners_address_e9624195 vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_e9624195" ON "public"."partners_address" USING "btree" ("businesses_id");



pg_restore: creating INDEX "public.partners_address_latitude_38918148755fccdf_uniq"
pg_restore: [archiver (db)] Error from TOC entry 5466; 1259 6124984 INDEX partners_address_latitude_38918148755fccdf_uniq vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_latitude_38918148755fccdf_uniq" ON "public"."partners_address" USING "btree" ("latitude");



pg_restore: creating INDEX "public.partners_address_location_id"
pg_restore: [archiver (db)] Error from TOC entry 5467; 1259 6124734 INDEX partners_address_location_id vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_location_id" ON "public"."partners_address" USING "gist" ("location");



pg_restore: creating INDEX "public.partners_address_longitude_6a1bd0c5aaf227a5_uniq"
pg_restore: [archiver (db)] Error from TOC entry 5468; 1259 6124985 INDEX partners_address_longitude_6a1bd0c5aaf227a5_uniq vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_address" does not exist
    Command was: CREATE INDEX "partners_address_longitude_6a1bd0c5aaf227a5_uniq" ON "public"."partners_address" USING "btree" ("longitude");



pg_restore: creating INDEX "public.partners_addressdummy_location_id"
pg_restore: [archiver (db)] Error from TOC entry 5484; 1259 6124296 INDEX partners_addressdummy_location_id vumqvdyhbbakqw
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.partners_addressdummy" does not exist
    Command was: CREATE INDEX "partners_addressdummy_location_id" ON "public"."partners_addressdummy" USING "gist" ("location");


pg_restore: creating FK CONSTRAINT "public.partners_company partners_com_partner_id_68062c1b87fe6c02_fk_partners_partner_id"
pg_restore: creating FK CONSTRAINT "public.partners_companybankinginformation partners_comp_company_id_a85698afe499099_fk_partners_company_id"
pg_restore: creating FK CONSTRAINT "public.partners_fitnessinstantflooroffer partners_fi_business_id_db86587ff737cea_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_partneraddons partners_par_addon_id_9f51a49f7df191c_fk_partners_addonmodel_id"
pg_restore: creating FK CONSTRAINT "public.partners_partneraddons partners_par_partner_id_409ed0f55743b48e_fk_partners_partner_id"
pg_restore: creating FK CONSTRAINT "public.partners_partner partners_partner_user_id_ca28b796442d283_fk_auth_user_id"
pg_restore: creating FK CONSTRAINT "public.partners_salonmenu partners_s_business_id_2e0ca679b0a24854_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_sixdigitcode partners_s_business_id_345f911c3107973d_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.partners_trackbusinessdetails partners_t_business_id_1eb5c6794f6b1ada_fk_partners_business_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_date recu_recurrence_id_4b67510aee5dda10_fk_recurrence_recurrence_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_rule recu_recurrence_id_7ff1cb1803879eea_fk_recurrence_recurrence_id"
pg_restore: creating FK CONSTRAINT "public.recurrence_param recurrence_param_rule_id_5163400228e5d6ac_fk_recurrence_rule_id"
pg_restore: creating FK CONSTRAINT "public.social_auth_usersocialauth social_auth_usersocial_user_id_5af7eafade59e216_fk_auth_user_id"
WARNING: errors ignored on restore: 335