Menu Close

Chapter 8. Synchronizing Content Between Satellite Servers

Red Hat Satellite uses Satellite’s Inter-Server Synchronization (ISS) to synchronize content between two Satellite Servers including those that are air-gapped.

Satellite 6.10 and 6.9 (and below) are incompatible for export and import due to different Pulp versions. You must be running the same version of Satellite on both servers to use this feature.

8.1. Scenarios

  • If you want to copy some but not all content from your Satellite Server to other Satellite Servers. For example, you have Content Views that your IT department consumes content from Satellite Server, and you want to copy content from those Content Views to other Satellite Servers.
  • If you want to copy all library content from your Satellite Server to another Satellite Servers. For example, you have Products and repositories that your IT department consumes content from Satellite Server in the Library, and you want to copy all Products and repositories in that organization to another Satellite Servers.
  • If you have both connected and disconnected Satellite Servers, and want to copy content from the connected servers to the disconnected servers. For example, you require complete isolation of your management infrastructure for security or other purposes.

These scenarios require at least two Satellite Servers: one Satellite Server that is connected to the outside world and contains content to export, and another Satellite Server that is disconnected that you want to import content to.

You cannot use ISS to synchronize content from Satellite Server to Capsule Server. Capsule Server supports synchronization natively. For more information, see Capsule Server Overview in Planning for Red Hat Satellite.

8.2. Configuration Definitions

There are different ways of using ISS to synchronize content between two Satellite Servers.

Connected

In a connected scenario, two Satellite Servers are able to communicate with each other.

Disconnected

In a disconnected scenario, there is the following setup:

  • Two Satellite Servers are connected to each other.
  • One Satellite Server is connected to the Internet while the other Satellite Server is not connected to the Internet.

    • This is referred to as the disconnected Satellite Server.
  • The disconnected Satellite Server is completely isolated from all external networks but can communicate with a connected Satellite Server.

Air-gapped Disconnected

In this setup, both Satellite Servers are isolated from each other. The only way for air-gapped Satellite Servers to receive content updates is through the import/export workflow.

8.3. Exporting from a Connected Satellite Server

8.3.1. Connected Satellite Server as a Content Store

In this scenario, you have one connected Satellite Server that is receiving content from an external source like the CDN. The rest of your infrastructure is completely isolated, including another disconnected Satellite Server. The connected Satellite Server is mainly used as a content store for updates. The disconnected Satellite Server serves as the main Satellite Server for managing content for all infrastructure behind the isolated network.

On the connected Satellite Server

  1. Ensure that repositories are using the immediate download policy, either by:

    1. For existing repos using On Demand, change their download policy on the repository details page to Immediate.
    2. For new repositories, ensure that the Default Red Hat Repository download policy setting is set to Immediate before enabling Red Hat repositories, and that the Default download policy is set to Immediate for custom repositories
    3. see Section 5.8, “Download Policies Overview” for more information.
  2. Enable the content that you want to use (refer to Section 5.5, “Enabling Red Hat Repositories”.)
  3. Synchronize the enabled content.
  4. For the first export, perform a complete Library export so that all the synchronized content are exported. This generates content archives that you can later import into one or more disconnected Satellite Servers. For more information on performing a complete Library export, see Section 8.9, “Exporting the Library Environment”.
  5. Export all future updates in the connected Satellite Servers incrementally. This generates leaner content archives that contain changes only from the recent set of updates. For example, if you enable and synchronize a new repository, the next exported content archive contains content only from the newly enabled repository. For more information on performing an incremental Library export, see Incremental Export.

On the disconnected Satellite Server

  1. Copy the exported content archive that you want from the connected Satellite Server.
  2. Import content to an organization using the procedure outlined in Section 8.10, “Importing into the Library Environment”. You can then manage content using Content Views or Lifecycle Environments as you require on the disconnected Satellite Server.

8.3.2. Connected Satellite Server for managing Content View Versions

In this scenario, your connected Satellite Server is receiving content from an external source like the CDN. The rest of your infrastructure is completely isolated, including a disconnected Satellite Server. However, the connected Satellite Server is not only used as a content store, but also is used to manage content. Updates coming from the CDN are curated into Content Views and Lifecycle Environments. Once the content has been promoted to a designated Lifecycle Environment, the content can be exported and imported into the disconnected Satellite Server.

On the connected Satellite Server

  1. Ensure that repositories are using the immediate download policy, either by:

    1. For existing repos using On Demand change their download policy on the repository details page to Immediate.
    2. For new repositories, ensure that the Default Red Hat Repository download policy setting is set to Immediate before enabling RH repos, and Default download policy is set to Immediate for custom repositories see Section 5.8, “Download Policies Overview” for more information.
  2. Enable any content that you want to use (refer to Section 5.5, “Enabling Red Hat Repositories”.)
  3. Synchronize the enabled content.
  4. When you have new content republish the Content Views that include this content (see Chapter 7, Managing Content Views.) This should create a new Content View Version with the appropriate content to export.
  5. For the first export, perform a complete version export on the Content View Version that you want to export. For more information see, Section 8.5, “Exporting a Content View Version”. This generates content archives that you can import into one or more disconnected Satellite Servers.
  6. Export all future updates in the connected Satellite Servers incrementally. This generates leaner content archives that contain changes only from the recent set of updates. For example, if your Content View has a new repository, this exported content archive contains only the latest changes. For more information on performing an incremental export on Content View Versions, see Incremental Export.

On the disconnected Satellite Server

  1. Copy the exported content archive from the connected Satellite Server.
  2. Import the content to the organization that you want. For more information, see Section 8.8, “Importing a Content View Version”. This will create a content view version from the exported content archives and them import content appropriately.

8.4. Keeping track of your exports

If you are exporting content to several disconnected Satellite Servers then using a --destination-server option provides a way to organize or maintain a record of what versions got exported to a given destination. For more information, see Section 8.6, “Keeping track of your exports”.

This option is available for all content-export operations. You can use the destination-server to

  • Query what was previously exported to a given destination.
  • Generate incremental exports automatically to the given destination server.

8.5. Exporting a Content View Version

You can export a version of a Content View to an archive file from Satellite Server and use this archive file to create the same Content View version on another Satellite Server or on another Satellite Server organization. Satellite does not export composite Content Views. The exported archive file contains the following data:

  • A JSON file containing Content View version metadata
  • An archive file containing all the repositories included into the Content View version

Satellite Server exports only RPM and kickstart files added to a version of a Content View. Satellite does not export the following content:

  • Docker content
  • Content View definitions and metadata, such as package filters.

Prerequisites

To export a Content View, ensure that Satellite Server where you want to export meets the following conditions:

  • Ensure that the export directory has free storage space to accommodate the export.
  • Ensure that the /var/lib/pulp/exports directory has free storage space equivalent to the size of the repositories being exported for temporary files created during the export process.
  • Ensure that you set download policy to Immediate for all repositories within the Content View you export. For more information, see Section 5.8, “Download Policies Overview”.
  • Ensure that you synchronize Products that you export to the required date.
  • Ensure that the user exporting the content has the Content Exporter role.

To Export a Content View Version:

  1. List versions of the Content View that are available for export:

    # hammer content-view version list \
    --organization=export-org \
     --content-view=view
    
    ---|----------|---------|-------------|-----------------------
    ID | NAME     | VERSION | DESCRIPTION | LIFECYCLE ENVIRONMENTS
    ---|----------|---------|-------------|-----------------------
    5  | view 3.0 | 3.0     |             | Library
    4  | view 2.0 | 2.0     |             |
    3  | view 1.0 | 1.0     |             |
    ---|----------|---------|-------------|----------------------

Export a Content View version

Get the version number of desired version. The following example targets version 1.0 for export.

# hammer content-export complete version \
--content-view=view --version=1.0 \
--organization=export-21527
  1. Verify that the archive containing the exported version of a Content View is located in the export directory:

    # ls -lh /var/lib/pulp/exports/export-21527/view/1.0/2021-02-25T18-59-26-00-00/
  2. You require all three files, for example, the tar.gz archive file, the toc.json and metadata.json to import the content successfully.

Export with chunking

In many cases, the exported archive content can be several gigabytes in size. You might want to split it into smaller sizes or chunks. You can use the --chunk-size-gb option with the hammer content-export command to handle this. The following example uses the --chunk-size-gb=2 to split the archives into 2 GB chunks.

# hammer content-export complete version --content-view=view --version=1.0 --organization=export-21527 --chunk-size-gb=2

# ls -lh  /var/lib/pulp/exports/export-21527/view/1.0/2021-02-25T21-15-22-00-00/

8.6. Keeping track of your exports

When importing content to several Satellite Servers, the --destination-server option is especially useful for keeping track of which content was exported and to where.

You can use this flag to let the exporting Satellite Server keep track of content in specific servers. The --destination-server option functions to indicate the destination server that your content is imported to. The following example uses --destination-server=mirror1 to export content to mirror1. The archive is created on the exporting Satellite Server. However, a record of each export is also maintained. This can be very useful when incrementally exporting.

# hammer content-export complete version \
--content-view=view --version=1.0 \
--organization=export-21527 \
--destination-server=mirror1

Incremental Export

Exporting complete versions can be a very expensive operation on storage space and resources. Content View versions that have multiple Red Hat Enterprise Linux trees can occupy several gigabytes of the space on Satellite Server.

You can use the Incremental Export functionality to help reduce demands on your infrastructure. Incremental Export exports only content that changes from the previously exported version. Generally, incremental changes are smaller than full exports. ln the following example, since version 1.0 has already been exported and the command targets version 2.0 for export. To use incremental export, complete the following steps.

# hammer content-export incremental version \
 --content-view=view \
 --version=2.0 \
 --organization=export-21527

# ls -lh /var/lib/pulp/exports/export-21527/view/2.0/2021-02-25T21-45-34-00-00/

8.7. Examining the exports

You can query on the exports that you previously have created via the hammer content-export list command.

hammer content-export list --organization=export-21527

---|--------------------|-----------------------------------------------------------------------|-------------|----------------------|-------------------------|-------------------------|------------------------
ID | DESTINATION SERVER | PATH                                                                  | TYPE        | CONTENT VIEW VERSION | CONTENT VIEW VERSION ID | CREATED AT              | UPDATED AT
---|--------------------|-----------------------------------------------------------------------|-------------|----------------------|-------------------------|-------------------------|------------------------
1  |                    | /var/lib/pulp/exports/export-21527/view/1.0/2021-02-25T18-59-26-00-00 | complete    | view 1.0             | 3                       | 2021-02-25 18:59:30 UTC | 2021-02-25 18:59:30 UTC
2  |                    | /var/lib/pulp/exports/export-21527/view/1.0/2021-02-25T21-15-22-00-00 | complete    | view 1.0             | 3                       | 2021-02-25 21:15:26 UTC | 2021-02-25 21:15:26 UTC
3  |                    | /var/lib/pulp/exports/export-21527/view/2.0/2021-02-25T21-45-34-00-00 | incremental | view 2.0             | 4                       | 2021-02-25 21:45:37 UTC | 2021-02-25 21:45:37 UTC
---|--------------------|-----------------------------------------------------------------------|-------------|----------------------|-------------------------|-------------------------|------------------------

8.8. Importing a Content View Version

You can use the archive that the hammer content-export command outputs to create a version of a Content View with the same content as the exported Content View version. For more information about exporting a Content View version, see Section 8.5, “Exporting a Content View Version”.

When you import a Content View version, it has the same major and minor version numbers and contains the same repositories with the same packages and errata. The Custom Repositories, Products and Content Views are automatically created if they do not exist in the importing organization.

Prerequisites

To import a Content View, ensure that Satellite Server where you want to import meets the following conditions:

  1. The exported archive must be in a directory under /var/lib/pulp/imports.
  2. The directory must have pulp:pulp permissions so that Pulp can read and write the .json files in that directory.
  3. If there are any Red Hat repositories in the export archive, the importing organization’s manifest must contain subscriptions for the products contained within the export.
  4. The user importing the content view version must have the 'Content Importer' Role.

Procedure

  1. Copy the archived file with the exported Content View version to the /var/lib/pulp/imports directory on Satellite Server where you want to import.
  2. Set the user:group permission of the archive files to pulp:pulp.

    # chown -R pulp:pulp /var/lib/pulp/imports/2021-02-25T21-15-22-00-00/
  3. Verify that the permission change occurs:

    # ls -lh  /var/lib/pulp/imports/2021-02-25T21-15-22-00-00/
  4. To import the Content View version to Satellite Server, enter the following command:

    # hammer content-import version --organization=import-20639 \
                                    --path=/var/lib/pulp/imports/2021-02-25T21-15-22-00-00/

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

  5. To verify that you import the Content View version successfully, list Content Views for your organization:

    # hammer content-view version list --content-view=view \
                                       --organization=import-20639
    ---|----------|---------|-------------|-----------------------
    ID | NAME     | VERSION | DESCRIPTION | LIFECYCLE ENVIRONMENTS
    ---|----------|---------|-------------|-----------------------
    7  | view 1.0 | 1.0     |             | Library
    ---|----------|---------|-------------|-----------------------

8.9. Exporting the Library Environment

You can export contents of all Yum repositories in the Library environment of an organization to an archive file from Satellite Server and use this archive file to create the same repositories in another Satellite Server or in another Satellite Server organization. The exported archive file contains the following data:

  • A JSON file containing Content View version metadata
  • An archive file containing all the repositories from the Library environment of the organization.

Satellite Server exports only RPM and kickstart files included in a Content View version. Satellite does not export the following content:

  • Docker content

Prerequisites

To export the contents of the Library lifecycle environment of the organization, ensure that Satellite Server where you want to export meets the following conditions:

  • Ensure that the export directory has free storage space to accommodate the export.
  • Ensure that the /var/lib/pulp/exports directory has free storage space equivalent to the size of the repositories being exported for temporary files created during the export process.
  • Ensure that you set download policy to Immediate for all repositories within the Library lifecycle environment you export. For more information, see Section 5.8, “Download Policies Overview”.
  • Ensure that you synchronize Products that you export to the required date.

To Export the Library Content of an Organization:

Use the organization name or ID to export.

# hammer content-export complete library --organization=export-21527
  1. Verify that the archive containing the exported version of a Content View is located in the export directory:

    # ls -lh /var/lib/pulp/exports/export-21527/Export-Library/1.0/2021-03-02T03-35-24-00-00
    total 68M
    -rw-r--r--. 1 pulp pulp 68M Mar  2 03:35 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335.tar.gz
    -rw-r--r--. 1 pulp pulp 333 Mar  2 03:35 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335-toc.json
    -rw-r--r--. 1 root root 443 Mar  2 03:35 metadata.json
  2. You require all three files, for example, the tar.gz, the toc.json and the metadata.json file to be able to import.
  3. A new Content View Export-Library is created in the organization. This content view contains all the repositories belonging to this organization. A new version of this Content View is published and exported automatically.

Export with chunking

In many cases the exported archive content may be several gigabytes in size. If you want to split it into smaller sizes or chunks. You can use the --chunk-size-gb flag directly in the export command to handle this. In the following example, you can see how to specify --chunk-size-gb=2 to split the archives in 2 GB chunks.

# hammer content-export complete library --organization=export-21527 --chunk-size-gb=2
[.....................................................................................................................................................................................................................................] [100%]
Generated /var/lib/pulp/exports/export-21527/Export-Library/2.0/2021-03-02T04-01-25-00-00/metadata.json

# ls -lh /var/lib/pulp/exports/export-21527/Export-Library/2.0/2021-03-02T04-01-25-00-00/

Incremental Export

Exporting Library content can be a very expensive operation in terms of space and resources. Organization that have multiple RHEL trees may occupy several gigabytes of the space on Satellite Server.

Satellite Server offers Incremental Export to help with this scenario. Incremental Export exports only things that changed from the previous export. These would be typically smaller than the full exports. In the example below we will incrementally export what changed from the previous export of all the repositories in the Library lifecycle environment.

# hammer content-export incremental library --organization=export-21527
[............................................................................................................................................................................................................] [100%]
Generated /var/lib/pulp/exports/export-21527/Export-Library/3.0/2021-03-02T04-22-14-00-00/metadata.json
# ls -lh /var/lib/pulp/exports/export-21527/Export-Library/3.0/2021-03-02T04-22-14-00-00/
total 172K
-rw-r--r--. 1 pulp pulp 161K Mar  2 04:22 export-436882d8-de5a-48e9-a30a-17169318f908-20210302_0422.tar.gz
-rw-r--r--. 1 pulp pulp  333 Mar  2 04:22 export-436882d8-de5a-48e9-a30a-17169318f908-20210302_0422-toc.json
-rw-r--r--. 1 root root  492 Mar  2 04:22 metadata.json
  1. Since nothing changed between the previous export and now in the Organization’s library environment the change files are really small.

8.10. Importing into the Library Environment

You can use the archive that the hammer content-export command outputs to import into the Library lifecycle environment of another organization For more information about exporting contents from the Library environment, see Section 8.9, “Exporting the Library Environment”.

Prerequisites

To import in to an Organization’s library lifecycle environment ensure that Satellite Server where you want to import meets the following conditions:

  1. The exported archive must be in a directory under /var/lib/pulp/imports.
  2. The directory must have pulp:pulp permissions so that Pulp can read and write the .json files in that directory.
  3. If there are any Red Hat repositories in the export archive, the importing organization’s manifest must contain subscriptions for the products contained within the export.
  4. The user importing the content must have the 'Content Importer' Role.

Procedure

  1. Copy the archived file with the exported Content View version to the /var/lib/pulp/imports directory on Satellite Server where you want to import.
  2. Set the permission of the archive files to pulp:pulp.

    # chown -R pulp:pulp /var/lib/pulp/imports/2021-03-02T03-35-24-00-00
    # 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
  3. On Satellite Server where you want to import, create/enable repositories the same name and label as the exported content.
  4. In the Satellite web UI, navigate to Content > Products, click the Yum content tab and add the same Yum content that the exported Content View version includes.
  5. Identify the Organization that you wish to import into.
  6. To import the Library content to Satellite Server, enter the following command:

    # hammer content-import library --organization=import-32158 \
                                    --path=/var/lib/pulp/imports/2021-03-02T03-35-24-00-00
    [............................................................................................................................................................................................................] [100%]

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

  7. 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.

8.11. Exporting a Repository

You can export the content of a repository in the Library environment of an organization from Satellite Server. You can use this archive file to create the same repository in another Satellite Server or in another Satellite Server organization.

You can export the following content from Satellite Server:

  • RPM repositories
  • Kickstart repositories
  • Ansible repositories
  • file repositories

You cannot export Docker content from Satellite Server.

The export contains the following data:

  • Two JSON files containing repository metadata.
  • One or more archive files containing the contents of the repository from the Library environment of the organization.

You need all the files, tar.gz, toc.json and metadata.json, to be able to import.

Prerequisites

To export the contents of a repository, ensure that Satellite Server from which you want to export, meets the following conditions:

  • Ensure that the export directory has enough free storage space to accommodate the export.
  • Ensure that the /var/lib/pulp/exports directory has enough free storage space equivalent to the size of the repositories being exported for temporary files created during the export process.
  • Ensure that you set download policy to Immediate for the repository within the Library lifecycle environment you export. For more information, see Section 5.8, “Download Policies Overview”.
  • Ensure that you synchronize Products that you export to the required date.

Export a Repository

  1. Use the repository name or ID to export.

    # hammer content-export complete repository \
     --organization="My_Organization" \
     --product="My_Product" \
     --name="My_Repository"
  2. Optional: Verify that the exported archive is located in the export directory:

    # ls -lh /var/lib/pulp/exports/My_Organization/Export-My_Repository/1.0/2021-03-02T03-35-24-00-00
    total 68M
    -rw-r--r--. 1 pulp pulp 68M Mar  2 03:35 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335.tar.gz
    -rw-r--r--. 1 pulp pulp 333 Mar  2 03:35 export-1e25417c-6d09-49d4-b9a5-23df4db3d52a-20210302_0335-toc.json
    -rw-r--r--. 1 root root 443 Mar  2 03:35 metadata.json

Export a Repository with Chunking

In many cases the exported content archive may be several gigabytes in size. If you want to split it into chunks of smaller size, you can use the --chunk-size-gb argument in the export command and limit the size by an integer value in gigabytes.

  1. Export content into archive chunks of a limited size, such as 2 GB:

    # hammer content-export complete repository \
    --chunk-size-gb=2 \
    --organization="My_Organization" \
    --product="My_Product" \
    --name="My_Repository"
    
    Generated /var/lib/pulp/exports/My_Organization/Export-My_Repository/1.0/2021-03-02T03-35-24-00-00/metadata.json
  2. Optional: View the exported data:

    # ls -lh /var/lib/pulp/exports/My_Organization/Export-My_Repository/1.0/2021-03-02T03-35-24-00-00/

8.12. Exporting a Repository Incrementally

Exporting a repository can be a very expensive operation in terms of system resources. A typical Red Hat Enterprise Linux tree may occupy several gigabytes of space on Satellite Server.

In such cases, you can use Incremental Export to export only pieces of content that changed since the previous export. Incremental exports typically result in smaller archive files than the full exports.

The example below shows incremental export of a repository in the Library lifecycle environment.

Procedure

  1. Create an incremental export:

    # hammer content-export incremental repository \
     --organization="My_Organization" \
     --product="My_Product" \
     --name="My_Repository"
    
    Generated /var/lib/pulp/exports/My_Organization/Export-My_Repository/3.0/2021-03-02T03-35-24-00-00/metadata.json
  2. Optional: View the exported data:

    # ls -lh /var/lib/pulp/exports/My_Organization/Export-My_Repository/3.0/2021-03-02T03-35-24-00-00/
    total 172K
    -rw-r--r--. 1 pulp pulp  20M Mar  2 04:22 export-436882d8-de5a-48e9-a30a-17169318f908-20210302_0422.tar.gz
    -rw-r--r--. 1 pulp pulp  333 Mar  2 04:22 export-436882d8-de5a-48e9-a30a-17169318f908-20210302_0422-toc.json
    -rw-r--r--. 1 root root  492 Mar  2 04:22 metadata.json

8.13. Importing a Repository

You can use the archive that the hammer content-export command outputs to import a repository in another organization. For more information about exporting content of a repository, see Section 8.11, “Exporting a Repository”.

Prerequisites

To import a repository to an Organization’s library lifecycle environment ensure that Satellite Server on which you want to import, meets the following conditions:

  • The export files must be in a directory under /var/lib/pulp/imports.
  • The directory must have pulp:pulp ownership so that Pulp can read and write the .json files in that directory.
  • If the export contains any Red Hat repositories, the manifest of the importing organization must contain subscriptions for the products contained within the export.
  • The user importing the content must have the Content Importer Role.

Procedure

  1. Copy the export files to the /var/lib/pulp/imports directory on Satellite Server where you want to import.
  2. Set the ownership of the export files to pulp:pulp.

    # chown -R pulp:pulp /var/lib/pulp/imports/2021-03-02T03-35-24-00-00
    # 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
  3. On Satellite Server where you want to import, create/enable a repository with the same name and label as the exported content.
  4. In the Satellite web UI, navigate to Content > Products.
  5. Click the Yum content tab.
  6. Add the same Yum content that the exported Content View version includes.
  7. Identify the Organization that you wish to import into.
  8. To import the Library content to Satellite Server, enter the following command:

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

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

  9. To verify that you imported the repository, check the contents of the Product and Repository.

8.14. Import/Export Cheat Sheet

Table 8.1. Export

IntentCommand

Fully Export a Content View version

hammer content-export complete version --content-view="My_Content_View" --version=1.0 --organization="My_Organization"

Incrementally Export a Content View version (assuming you have already exported something)

hammer content-export incremental version --content-view="My_Content_View" --version=2.0 --organization="My_Organization"

Fully Export a Repository

hammer content-export complete repository --product="My_Product" --name="My_Repository" --organization="My_Organization"

Incrementally Export a Repository (assuming you have already exported something)

hammer content-export incremental repository --product="My_Product" --name="My_Repository" --organization="My_Organization"

Fully Export an Organization’s Library

hammer content-export complete library --organization="My_Organization"

Incrementally Export an Organization’s Library (assuming you have already exported something)

hammer content-export incremental library --organization="My_Organization"

Export a Content View version promoted to the Dev Environment

hammer content-export complete version --content-view="My_Content_View" --organization="My_Organization" --lifecycle-environment="Dev"

Export a Content View in smaller chunks (2-GB slabs)

hammer content-export complete version --content-view="My_Content_View" --version=1.0 --organization="My_Organization" --chunk-size-gb=2

Get a list of exports

hammer content-export list --content-view="My_Content_View" --organization="My_Organization"

Table 8.2. Import

IntentCommand

Import to a Content View version

hammer content-import version --organization="My_Organization" --path="/var/lib/pulp/imports/My_Exported_Repo_Dir"

Import a Repository

hammer content-import repository --organization="My_Organization" --path="/var/lib/pulp/imports/My_Exported_Repo_Dir"

Import to an Organization’s Library

hammer content-import library --organization="My_Organization" --path="/var/lib/pulp/imports/My_Exported_Repo_Dir"