Skip to content

Latest commit

 

History

History
49 lines (46 loc) · 2.32 KB

proc_importing-into-the-library-environment.adoc

File metadata and controls

49 lines (46 loc) · 2.32 KB

Importing into the Library Environment

You can import exported Library content into the Library lifecycle environment of an organization on another {ProjectServer}. For more information about exporting contents from the Library environment, see [Exporting_the_Library_Environment_{context}].

Prerequisites
  • The exported files must be in a directory under /var/lib/pulp/imports.

  • The user importing the content must have the Content Importer Role.

Procedure
  1. Copy the exported files to a subdirectory of /var/lib/pulp/imports on {ProjectServer} where you want to import.

  2. Set the ownership of the import directory and its contents to pulp:pulp.

    # chown -R pulp:pulp /var/lib/pulp/imports/2021-03-02T03-35-24-00-00
  3. Verify that the ownership is set correctly:

# ls -lh /var/lib/pulp/imports/2021-03-02T03-35-24-00-00
total 68M
-rw-r--r--. 1 pulp pulp 68M Mar  2 04:29 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335.tar.gz
-rw-r--r--. 1 pulp pulp 333 Mar  2 04:29 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335-toc.json
-rw-r--r--. 1 pulp pulp 443 Mar  2 04:29 metadata.json
  1. Identify the Organization that you wish to import into.

  2. To import the Library content to {ProjectServer}, enter the following command:

    # hammer content-import library \
    --organization="My_Organization" \
    --path=/var/lib/pulp/imports/2021-03-02T03-35-24-00-00

    Note you must enter the full path /var/lib/pulp/imports/My_Exported_Library_Dir. Relative paths do not work.

  3. To verify that you imported the Library content, check the contents of the Product and Repositories. A new Content View called Import-Library is created in the target organization. This Content View is used to facilitate the Library content import.

    By default, this Content View is not shown in the {ProjectWebUI}. Import-Library is not meant to be assigned directly to hosts. Instead, assign your hosts to Default Organization View or another Content View as you would normally.