Problem:
Importing a DB backup to a clean install fails
Expected outcome:
Successful import and system restored
Foreman and Proxy versions:
Original 1.20.2 restoring to 1.23
Foreman and Proxy plugin versions:
Distribution and version:
Centos 7
Other relevant data:
foreman-rake db:import_dump file=/tmp/foreman.1571264558.sql
Your backup is going to be imported from: /tmp/foreman.1571264558.sql
You can backup the old database ‘foreman’ by running:
- foreman-rake db:dump destination=/mydir/dumps/foreman.sql RAILS_ENV=production
This task will destroy your old database tables! Are you sure you want to continue? [y/N]
y
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3812; 2606 17428 FK CONSTRAINT features_smart_proxies_smart_proxy_id_fk foreman
pg_restore: [archiver (db)] could not execute query: ERROR: relation “public.features_smart_proxies” does not exist
Command was: ALTER TABLE ONLY public.features_smart_proxies DROP CONSTRAINT features_smart_proxies_smart_proxy_id_fk;pg_restore: [archiver (db)] Error from TOC entry 3811; 2606 17423 FK CONSTRAINT features_smart_proxies_feature_id_fk foreman
pg_restore: [archiver (db)] could not execute query: ERROR: relation “public.features_smart_proxies” does not exist
Command was: ALTER TABLE ONLY public.features_smart_proxies DROP CONSTRAINT features_smart_proxies_feature_id_fk;