У меня есть postgres db для моего бэкэнда, размещенного в Heroku.Теперь я меняю vps на другого поставщика.Я использовал следующие команды:
heroku pg:backups:capture
heroku pg:backups:download
, чтобы получить файл дампа, и затем запустил следующую команду pg_restore для удаленного vps postgres (у меня есть ssh на удаленный сервер):
pg_restore --verbose --clean --no-acl -h localhost -p 5444 -d databasename -U databaseuser latest.dump --no-owner -x
Iполучить следующее сообщение / ошибки:
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
Эта операция была выполнена в пустой базе данных.Что я делаю не так?
Помогите пожалуйста!
Спасибо