Restoring Red Hat Satellite 6.16 or 6.17 fails complaining about db duplicates on CREATE UNIQUE INDEX

Solution Verified - Updated -

Issue

  • Restoring Satellite 6.16 (or 6.17) fails with:

    pg_restore: while PROCESSING TOC:
    pg_restore: from TOC entry 4967; 1259 20295 INDEX index_fact_names_on_name_and_type foreman
    pg_restore: error: could not execute query: ERROR: could not create unique index "index_fact_names_on_name_and_type"
    DETAIL: Key (name, type)=(lscpu_flags, Katello::RhsmFactName) is duplicated.
    Command was: CREATE UNIQUE INDEX index_fact_names_on_name_and_type ON public.fact_names USING btree (name, type);
    
    pg_restore: from TOC entry 5507; 1259 3233544 INDEX index_katello_installed_packages_on_nvrea foreman
    pg_restore: error: could not execute query: ERROR: could not create unique index "index_katello_installed_packages_on_nvrea"
    DETAIL: Key (nvrea)=(gcc-objc++-4.8.5-44.el7.x86_64) is duplicated.
    Command was: CREATE UNIQUE INDEX index_katello_installed_packages_on_nvrea ON public.katello_installed_packages USING btree (nvrea);
    
    pg_restore: from TOC entry 5637; 1259 4054876 INDEX katello_available_module_streams_name_stream_context foreman
    pg_restore: error: could not execute query: ERROR: could not create unique index "katello_available_module_streams_name_stream_context"
    DETAIL: Key (name, stream, context)=(pmdk, 1_fileformat_v6, d63f516d) is duplicated.
    Command was: CREATE UNIQUE INDEX katello_available_module_streams_name_stream_context ON public.katello_available_module_streams USING btree (name, stream, context);
    

Environment

  • Red Hat Satellite
    • 6.16
    • 6.17

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content