Chapter 11. Synchronizing content between Satellite Servers
In multi-server Satellite deployments, use Inter-Satellite Synchronization to deliver content from upstream to downstream Satellite Servers over a network or through export and import, including the Library environment, content view versions, and individual repositories.
11.1. Inter-Satellite Synchronization configurations Copy linkLink copied to clipboard!
Depending on network connectivity between upstream and downstream Satellite Servers, you can synchronize content over HTTPS with network sync or by exporting and importing content when servers are air gapped.
There are two possible ISS configurations of Satellite, depending on how you deployed your infrastructure:
- ISS Network Sync
If your upstream server can communicate with the downstream server over a network, you can synchronize content over HTTPS.
Configure your Satellite to synchronize content over a network.
- ISS Export Sync
If your upstream and downstream servers are air gapped, you can synchronize content by using export and import.
Configure your Satellite to synchronize content by using export and import.
11.2. Synchronizing a custom repository Copy linkLink copied to clipboard!
To synchronize custom repositories over a network, configure the repositories on the downstream Satellite Server to synchronize from published URLs on the upstream server. Red Hat repositories do not require this configuration.
Procedure
On the connected Satellite Server, perform the following steps:
- In the Satellite web UI, navigate to Content > Products.
- Click on the custom product.
- Click on the custom repository.
- Copy the Published At: URL.
On the disconnected Satellite Server, perform the following steps:
Download the
katello-server-ca.crtfile from the connected Satellite Server:# curl http://satellite.example.com/pub/katello-server-ca.crt-
Create an SSL Content Credential with the contents of
katello-server-ca.crt. For more information on creating an SSL Content Credential, see Section 3.5.1, “Importing custom SSL certificates by using Satellite web UI”. - In the Satellite web UI, navigate to Content > Products.
Create your custom product with the following:
- Upstream URL: Paste the link that you copied earlier.
- SSL CA Cert: Select the SSL certificate that was transferred from your connected Satellite Server.
For more information on creating a custom product, see Section 3.6.1, “Creating a custom product by using Satellite web UI”.
11.3. Content synchronization by using export and import Copy linkLink copied to clipboard!
Export content from an upstream Satellite Server and import it into a downstream server when network connectivity is limited or air gapped. Choose an approach based on what content you need to synchronize.
Synchronizing content by using export and import requires the same major version of Satellite on both the downstream and upstream Satellite Servers.
When you are unable to match upstream and downstream Satellite versions, you can use:
- Syncable exports and imports.
- Inter-Satellite Synchronization (ISS) with your upstream Satellite connected to the internet and your downstream Satellite connected to the upstream Satellite.
11.3.1. Using an upstream Satellite Server as a content store Copy linkLink copied to clipboard!
Export Library content from an upstream Satellite Server that serves as a content store and import it on the downstream server that manages content for isolated infrastructure.
Procedure
On the upstream Satellite Server, perform the following steps:
Ensure that repositories are using the Immediate download policy in one of the following ways:
- For existing repositories using On Demand, change their download policy on the repository details page to Immediate.
- 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.
Enable the content that you want to synchronize.
If you want to sync custom content, first create a custom product and then synchronize repositories.
Synchronize the enabled content:
-
On the first export, perform a
completeLibrary export so that all the synchronized content is exported. This generates content archives that you can later import into one or more downstream Satellite Servers. - Export all future updates on the upstream Satellite Server incrementally. This generates leaner content archives that contain only a 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.
-
On the first export, perform a
On the downstream Satellite Server, perform the following steps:
- Bring the content exported from the upstream Satellite Server over to the hard disk.
-
Place it inside a directory under
/var/lib/pulp/imports/. Import the content to an organization.
You can then manage content using content views or lifecycle environments as you require.
Additional resources
- Section 3.3, “Enabling Red Hat repositories by using Satellite web UI”
- Section 6.1, “Download policies overview”
- Section 3.6.1, “Creating a custom product by using Satellite web UI”
- Section 4.2, “Synchronizing repositories ad hoc”
- Section 11.4.1, “Exporting the Library environment”
- Section 11.4.3, “Exporting the Library environment incrementally”
- Section 11.5.2, “Importing into the Library environment”
11.3.2. Using an upstream Satellite Server to synchronize content view versions Copy linkLink copied to clipboard!
Curate updates on the upstream Satellite Server into content views and lifecycle environments, then export promoted content and import it on the downstream server that manages isolated infrastructure.
Procedure
On the upstream Satellite Server, perform the following steps:
Ensure that repositories are using the Immediate download policy in one of the following ways:
- For existing repositories using On Demand, change their download policy on the repository details page to Immediate.
- 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.
Enable the content that you want to synchronize.
If you want to sync custom content, first create a custom product and then synchronize repositories.
Synchronize the enabled content:
-
For the first export, perform a
completeversion export on the content view version that you want to export. This generates content archives that you can import into one or more downstream Satellite Servers. - 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.
- When you have new content, republish the content views that include this content before exporting the increment. This creates a new content view version with the appropriate content to export.
-
For the first export, perform a
On the downstream Satellite Server, perform the following steps:
- Bring the content exported from the upstream Satellite Server over to the hard disk.
-
Place it inside a directory under
/var/lib/pulp/imports/. - Import the content to the organization that you want. This will create a content view version from the exported content archives and then import content appropriately.
Additional resources
- Section 3.3, “Enabling Red Hat repositories by using Satellite web UI”
- Section 6.1, “Download policies overview”
- Section 4.2, “Synchronizing repositories ad hoc”
- Section 3.6.1, “Creating a custom product by using Satellite web UI”
- Chapter 9, Managing content views and content view environments
- Section 11.4.6, “Exporting a content view version incrementally”
- Section 11.4.4, “Exporting a content view version”
- Section 11.5.4, “Importing a content view version”
11.3.3. Synchronizing a single repository Copy linkLink copied to clipboard!
Export a single repository from the upstream Satellite Server and import it on the downstream server when you need to synchronize only specific content between air-gapped servers.
Procedure
On the upstream Satellite Server, perform the following steps:
Ensure that the repository is using the Immediate download policy in one of the following ways:
- For existing repositories using On Demand, change their download policy on the repository details page to Immediate.
- 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.
Enable the content that you want to synchronize.
If you want to sync custom content, first create a custom product and then synchronize product repositories.
- Synchronize the enabled content:
-
On the first export, perform a
completerepository export so that all the synchronized content is exported. This generates content archives that you can later import into one or more downstream Satellite Servers. - Export all future updates on the upstream Satellite Server incrementally. This generates leaner content archives that contain only a recent set of updates.
On the downstream Satellite Server, perform the following steps:
- Bring the content exported from the upstream Satellite Server over to the hard disk.
-
Place it inside a directory under
/var/lib/pulp/imports/. Import the content to an organization.
You can then manage content using content views or lifecycle environments as you require.
Additional resources
- Section 3.3, “Enabling Red Hat repositories by using Satellite web UI”
- Section 6.1, “Download policies overview”
- Section 3.6.1, “Creating a custom product by using Satellite web UI”
- Section 4.2, “Synchronizing repositories ad hoc”
- Section 11.4.7, “Exporting a repository”
- Section 11.4.9, “Exporting a repository incrementally”
- Section 11.5.6, “Importing a repository”
11.4. Exporting content from Satellite Server Copy linkLink copied to clipboard!
When synchronizing content by using export and import, export the Library environment, content view versions, or individual repositories from the upstream Satellite Server.
11.4.1. Exporting the Library environment Copy linkLink copied to clipboard!
You can export all Library content for an organization to an archive file and recreate the same repositories on another Satellite Server or 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.
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
Prerequisites
- The export directory has enough free storage space to accommodate the export.
-
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. - Download policy is set to Immediate for all repositories within the Library lifecycle environment you export. For more information, see Section 6.1, “Download policies overview”.
- Products that you export are synchronized to the required date.
- The user exporting the content has the Content Exporter role.
Procedure
Export the Library environment for your organization:
$ hammer content-export complete library --organization="My_Organization"In many cases the exported archive might be several gigabytes in size. You might want to split it into chunks of a smaller size. You can use the
--chunk-size-gboption to split the export into smaller chunks, for example--chunk-size-gb=2to split the archive into 2 GB chunks.- 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.
Verification
Verify that the archive containing the exported version of a content view is located in the export directory:
# ls -lh /var/lib/pulp/exports/My_Organization/Export-Library/1.0/2021-03-02T03-35-24-00-00/You need all three files, the
tar.gzarchive file, thetoc.jsonfile, and themetadata.jsonfile, to import the content successfully.
11.4.2. Exporting the Library environment in the syncable format Copy linkLink copied to clipboard!
You can export content in the Library environment of an organization to a syncable format that you can use to create your custom CDN and synchronize the content from the custom CDN over HTTP/HTTPS.
You can then serve the generated content on a local web server and synchronize it on the importing Satellite Server or in another Satellite Server organization.
You can use the generated content to create the same repository in another Satellite Server or in another Satellite Server organization by using content import. On import of the exported archive, a regular content view is created or updated on your importing Satellite Server. For more information, see Section 11.5.4, “Importing a content view version”.
You can export the following content types in the syncable format from Satellite Server:
- Custom file type content
- Kickstart repositories
- Yum content
You cannot export Ansible collections or Docker content in the syncable format.
The export contains directories with the packages, listing files, and metadata of the repository in Yum format that can be used to synchronize in the importing Satellite Server.
Prerequisites
- Download policy is set to Immediate for all repositories within the Library lifecycle environment you export. For more information, see Section 6.1, “Download policies overview”.
- Products that you export are synchronized to the required date.
- The user exporting the content has the Content Exporter role.
Procedure
Use the organization name or ID to export:
$ hammer content-export complete library \ --organization="My_Organization" \ --format=syncableOptional: Verify that the exported content is located in the export directory:
# du -sh /var/lib/pulp/exports/My_Organization/Export-My_Repository/1.0/2021-03-02T03-35-24-00-00
11.4.3. Exporting the Library environment incrementally Copy linkLink copied to clipboard!
You can export only Library content that changed since the last export to reduce archive size and system resource usage when full Library exports are too large.
Exporting Library content can be a very expensive operation in terms of system resources. Organizations that have multiple Red Hat Enterprise Linux trees can occupy several gigabytes of space on Satellite Server.
In such cases, you can create an incremental export which contains only pieces of content that have changed since the last export. Incremental exports typically result in smaller archive files than the full exports.
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
The example below shows incremental export of all repositories in the organization’s Library.
Procedure
Create an incremental export:
$ hammer content-export incremental library \ --organization="My_Organization"If you want to create a syncable export, add
--format=syncable. By default, Satellite creates an importable export.
Next steps
Optional: View the exported data:
# find /var/lib/pulp/exports/My_Organization/Export-Library/
11.4.4. Exporting a content view version Copy linkLink copied to clipboard!
You can export a content view version to an archive file and recreate the same version on another Satellite Server. Satellite exports composite content views as regular content views.
The composite nature is not retained. On importing the exported archive, a regular content view is created or updated on your downstream Satellite Server.
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
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
Satellite does not export content view definitions and metadata such as package filters.
Prerequisites
- The export directory has enough free storage space to accommodate the export.
-
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. - Download policy is set to Immediate for all repositories within the content view version you export. For more information, see Section 6.1, “Download policies overview”.
- Products that you export are synchronized to the required date.
- The user exporting the content has the Content Exporter role.
Procedure
List versions of the content view that are available for export:
$ hammer content-view version list \ --content-view="My_Content_View" \ --organization="My_Organization"Note the version number that you want to export. In the following example, the version number is
1.0.Export the content view version:
$ hammer content-export complete version \ --content-view="Content_View_Name" \ --version=1.0 \ --organization="My_Organization"In many cases, the exported archive might be several gigabytes in size. You might want to split it into smaller chunks of a smaller size. You can use the
--chunk-size-gboption to export the content view version into smaller chunks, for example--chunk-size-gb=2to split the archives into 2 GB chunks.
Verification
Verify that the archive containing the exported version of a content view is located in the export directory:
# ls -lh /var/lib/pulp/exports/My_Organization/Content_View_Name/1.0/2021-02-25T18-59-26-00-00/You require all three files, the
tar.gzarchive file, thetoc.jsonfile, and themetadata.jsonfile, to import the content successfully.
11.4.5. Exporting a content view version in the syncable format Copy linkLink copied to clipboard!
You can export a content view version in syncable format to serve from a custom CDN over HTTP/HTTPS or import on a matching Satellite version.
After you have exported the content view, you can do either of the following:
- Synchronize the content from your custom CDN over HTTP/HTTPS.
-
Import the content using
hammer content-import. Note that this requires both the Export and Import servers to run Satellite 6.19.
You can import Syncable Format exports directly by using the hammer content-import command. This is the recommended method for consuming syncable exports.
Alternatively, you can serve the generated content using a local web server on the importing Satellite Server or in another Satellite Server organization:
- Copy the generated content to an HTTP/HTTPS web server that is accessible to importing Satellite Server.
- Update your CDN configuration to Custom CDN.
- Set the CDN URL to point to the web server.
- Optional: Set an SSL/TLS CA Credential if the web server requires it.
- Enable the repository.
- Synchronize the repository.
The export contains directories with the packages, listing files, and metadata of the repository in Yum format that can be used to synchronize in the importing Satellite Server.
You can export the following content types in the syncable format from Satellite Server:
- Custom file type content
- Kickstart repositories
- Yum content
You cannot export Ansible collections or Docker content in the syncable format.
Prerequisites
- Download policy is set to Immediate for all repositories within the content view you export. For more information, see Section 6.1, “Download policies overview”.
- Products that you export are synchronized to the required date.
- The user exporting the content has the Content Exporter role.
Procedure
List versions of the content view that are available for export:
$ hammer content-view version list \ --content-view="My_Content_View_Name" \ --organization="My_Organization"Note the version number that you want to export. In the following example, the version number is
1.0.Export the content view version in a syncable format:
$ hammer content-export complete version \ --content-view="My_Content_View_Name" \ --version=1.0 \ --organization="My_Organization" \ --format=syncable
Verification
Verify that the exported content is located in the export directory:
# ls -lh /var/lib/pulp/exports/My_Organization/My_Content_View_Name/1.0/2021-02-25T18-59-26-00-00/
11.4.6. Exporting a content view version incrementally Copy linkLink copied to clipboard!
You can export only the content that changed in a content view version since the last export to reduce archive size when full exports are too resource-intensive.
Exporting complete content view versions can be a very expensive operation in terms of system resources. Content view versions that have multiple Red Hat Enterprise Linux trees can occupy several gigabytes of space on Satellite Server.
In such cases, you can create an incremental export which contains only pieces of content that have changed since the last export. Incremental exports typically result in smaller archive files than the full exports.
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
Procedure
Create an incremental export:
$ hammer content-export incremental version \ --content-view="My_Content_View" \ --organization="My_Organization" \ --version="My_Content_View_Version"If you want to create a syncable export, add
--format=syncable. By default, Satellite creates an importable export.
Next steps
Optional: View the exported content view:
# find /var/lib/pulp/exports/My_Organization/My_Exported_Content_View/My_Content_View_Version/- You can import your exported content view version into Satellite Server. For more information, see Section 11.5.4, “Importing a content view version”.
11.4.7. Exporting a repository Copy linkLink copied to clipboard!
You can export a repository from the Library environment to an archive file and recreate the same repository on another Satellite Server or organization.
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
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
- The export directory has enough free storage space to accommodate the export.
-
The
/var/lib/pulp/exports/directory has enough free storage space equivalent to the size of the repository that you export. - Download policy is set to Immediate for the repository you export. For more information, see Section 6.1, “Download policies overview”.
- Products that you export are synchronized to the required date.
- The user exporting the content has the Content Exporter role.
Procedure
Export a repository:
$ hammer content-export complete repository \ --name="My_Repository" \ --product="My_Product" \ --organization="My_Organization"NoteThe size of the exported archive depends on the number and size of the packages within the repository. If you want to split the exported archive into chunks, export your repository using the
--chunk-size-gbargument to limit the size by an integer value in gigabytes, for example--chunk-size-gb=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/2022-09-02T03-35-24-00-00/
11.4.8. Exporting a repository in the syncable format Copy linkLink copied to clipboard!
You can export the content of a repository in the Library environment of an organization to a syncable format that you can use to create your custom CDN and synchronize the content from the custom CDN over HTTP/HTTPS.
You can import Syncable Format exports directly by using the hammer content-import command. This is the recommended method for consuming syncable exports.
Alternatively, you can serve the generated content using a local web server on the importing Satellite Server or in another Satellite Server organization:
- Copy the generated content to an HTTP/HTTPS web server that is accessible to importing Satellite Server.
- Update your CDN configuration to Custom CDN.
- Set the CDN URL to point to the web server.
- Optional: Set an SSL/TLS CA Credential if the web server requires it.
- Enable the repository.
- Synchronize the repository.
The export contains directories with the packages, listing files, and metadata of the repository in Yum format that can be used to synchronize in the importing Satellite Server.
You can export the following content types in the syncable format from Satellite Server:
- Custom file type content
- Kickstart repositories
- Yum content
You cannot export Ansible collections or Docker content in the syncable format.
Prerequisites
- Download policy is set to Immediate for the repository you export. For more information, see Section 6.1, “Download policies overview”.
- The user exporting the content has the Content Exporter role.
Procedure
Export a repository using the repository name or ID:
$ hammer content-export complete repository \ --organization="My_Organization" \ --product="My_Product" \ --name="My_Repository" \ --format=syncableOptional: Verify that the exported content is located in the export directory:
# du -sh /var/lib/pulp/exports/My_Organization/Export-My_Repository/1.0/2021-03-02T03-35-24-00-00
11.4.9. Exporting a repository incrementally Copy linkLink copied to clipboard!
You can export only repository content that changed since the previous export to reduce archive size when full repository exports are too large.
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.
You can export the following content from Satellite Server:
- Ansible collections
- Docker content
- Custom file type content
- Kickstart repositories
- Yum content
The example below shows incremental export of a repository in the Library lifecycle environment.
Procedure
Create an incremental export:
$ hammer content-export incremental repository \ --name="My_Repository" \ --organization="My_Organization" \ --product="My_Product"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
11.4.10. Exporting a repository incrementally in the syncable format Copy linkLink copied to clipboard!
You can export only changed repository content in the syncable format to reduce transfer size when serving content from a custom CDN over HTTP/HTTPS.
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 full exports.
You can export the following content types in the syncable format from Satellite Server:
- Custom file type content
- Kickstart repositories
- Yum content
You cannot export Ansible collections or Docker content in the syncable format.
The procedure below shows an incremental export of a repository in the Library lifecycle environment.
Procedure
Create an incremental export:
$ hammer content-export incremental repository \ --format=syncable \ --name="My_Repository" \ --organization="My_Organization" \ --product="My_Product"Optional: View the exported data:
# find /var/lib/pulp/exports/Default_Organization/My_Product/2.0/2023-03-09T10-55-48-05-00/ -name "*.rpm"
11.4.11. Keeping track of your exports Copy linkLink copied to clipboard!
Query and manage export records on the upstream Satellite Server to organize incremental exports and track which content was exported to specific downstream servers.
Procedure
Optional: Track the destinations of content exports. Use the
--destination-serverargument during export to indicate the target server. This option is available for allcontent-exportoperations.For example, specify the destination server when exporting a content view version:
$ hammer content-export complete version \ --content-view="My_Content_View_Name" \ --destination-server=My_Downstream_Server_1 \ --organization="My_Organization" \ --version=1.0Query export records by listing the exports:
$ hammer content-export list \ --organization="My_Organization"
11.5. Importing exported content Copy linkLink copied to clipboard!
When synchronizing content by using export and import, import exported content into the downstream Satellite Server Library environment, content view versions, or individual repositories.
11.5.1. Importing exports in the syncable format Copy linkLink copied to clipboard!
Import syncable exports from an allowed import path on your downstream Satellite Server into the Library environment.
Prerequisites
-
The syncable exports must be located in one of your
ALLOWED_IMPORT_PATHSas specified in/etc/pulp/settings.py. By default, this includes/var/lib/pulp/imports/. - The importing organization must be configured to synchronize content through exports. For more information, see Configuring Satellite Server to synchronize content through exports by using Satellite web UI in Installing Satellite Server in a disconnected network environment.
Procedure
Import the syncable exports into the Library environment of your organization:
$ hammer content-import library \ --organization="My_Organization" \ --path="My_Path_To_Syncable_Export"
11.5.2. Importing into the Library environment Copy linkLink copied to clipboard!
You can import exported Library content into the Library environment of an organization on a downstream Satellite Server.
Prerequisites
-
The exported files must be in a directory under
/var/lib/pulp/imports. - The importing organization must be configured to synchronize content through exports. For more information, see Configuring Satellite Server to synchronize content through exports by using Satellite web UI in Installing Satellite Server in a disconnected network environment.
- If there are any Red Hat repositories in the exported content, the subscription manifest of the importing organization must contain subscriptions for the products contained within the export.
- The user importing the content has the Content Importer role.
Procedure
-
Copy the exported files to a subdirectory of
/var/lib/pulp/importson Satellite Server where you want to import. 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/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- Identify the Organization that you want to import into.
Import the Library content to Satellite Server:
$ hammer content-import library \ --organization="My_Organization" \ --path=/var/lib/pulp/imports/2021-03-02T03-35-24-00-00/You must specify the absolute path as in the example:
/var/lib/pulp/imports/2021-03-02T03-35-24-00-00/. Relative paths do not work.Verify that you imported the Library content by checking the contents of the product and repositories. A new content view called
Import-Libraryis 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 Satellite web UI.
Import-Libraryis not meant to be assigned directly to hosts. Instead, assign your hosts toDefault Organization Viewor another content view as you would normally.The importing Satellite Server extracts the
/var/lib/pulp/importsdirectory to/var/lib/pulp/.Delete the import files after a successful import:
# rm -fr /var/lib/pulp/imports/2021-03-02T03-35-24-00-00/
11.5.3. Importing into the Library environment from a web server Copy linkLink copied to clipboard!
You can import exported Library content directly from a web server into the Library environment on a downstream Satellite Server when exports are in syncable format.
Prerequisites
- The exported files must be in the syncable format.
- The exported files must be accessible through HTTP/HTTPS.
- If there are any Red Hat repositories in the exported content, the subscription manifest of the importing organization must contain subscriptions for the products contained within the export.
- The user importing the content has the Content Importer role.
Procedure
- Identify the Organization that you want to import into.
To import the Library content to Satellite Server, enter the following command:
$ hammer content-import library \ --organization="My_Organization" \ --path=http://server.example.com/pub/exports/2021-02-25T21-15-22-00-00/A new content view called
Import-Libraryis 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 Satellite web UI.
Import-Libraryis not meant to be assigned directly to hosts. Instead, assign your hosts toDefault Organization Viewor another content view.
11.5.4. Importing a content view version Copy linkLink copied to clipboard!
You can import an exported content view version to recreate the same content in an organization on a downstream Satellite Server.
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. Custom repositories, products and content views are automatically created if they do not exist in the importing organization.
Prerequisites
-
The exported files must be in a directory under
/var/lib/pulp/imports. - The importing organization must be configured to synchronize content through exports. For more information, see Configuring Satellite Server to synchronize content through exports by using Satellite web UI in Installing Satellite Server in a disconnected network environment.
- If there are any Red Hat repositories in the exported content, the subscription manifest of the importing organization must contain subscriptions for the products contained within the export.
- The user importing the content view version has the Content Importer role.
Procedure
-
Copy the exported files to a subdirectory of
/var/lib/pulp/importson Satellite Server where you want to import. Set the ownership of the import directory and its contents to
pulp:pulp:# chown -R pulp:pulp /var/lib/pulp/imports/2021-02-25T21-15-22-00-00/Verify that the ownership is set correctly:
# ls -lh /var/lib/pulp/imports/2021-02-25T21-15-22-00-00/Import the content view version to Satellite Server:
$ hammer content-import version \ --organization=My_Organization \ --path=/var/lib/pulp/imports/2021-02-25T21-15-22-00-00/You must specify the absolute path as in the example:
/var/lib/pulp/imports/2021-02-25T21-15-22-00-00/. Relative paths do not work.Verify that you imported the content view version successfully by listing the content view versions for your organization:
$ hammer content-view version list \ --organization-id=My_Organization_IDThe importing Satellite Server extracts the
/var/lib/pulp/importsdirectory to/var/lib/pulp/.Delete the import files after a successful import:
# rm -fr /var/lib/pulp/imports/2021-02-25T21-15-22-00-00/
11.5.5. Importing a content view version from a web server Copy linkLink copied to clipboard!
You can import an exported content view version directly from a web server when the export is in syncable format and accessible over HTTP/HTTPS.
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. Custom repositories, products, and content views are automatically created if they do not exist in the importing organization.
Prerequisites
- The exported files must be in a syncable format.
- The exported files must be accessible through HTTP/HTTPS.
- If there are any Red Hat repositories in the exported content, the importing organization’s manifest must contain subscriptions for the products contained within the export.
- The user importing the content view version must have the Content Importer role.
Procedure
Import the content view version into Satellite Server:
$ hammer content-import version \ --organization=My_Organization \ --path=http://server.example.com/pub/exports/2021-02-25T21-15-22-00-00/
11.5.6. Importing a repository Copy linkLink copied to clipboard!
You can import an exported repository into an organization on a downstream Satellite Server to match content from the upstream server.
Prerequisites
-
The exported files must be in a directory under
/var/lib/pulp/imports/. - The importing organization must be configured to synchronize content through exports. For more information, see Configuring Satellite Server to synchronize content through exports by using Satellite web UI in Installing Satellite Server in a disconnected network environment.
- If the export contains any Red Hat repositories, the subscription manifest of the importing organization must contain subscriptions for the products contained within the export.
- The user importing the content has the Content Importer role.
Procedure
-
Copy the exported files to a subdirectory of
/var/lib/pulp/importson Satellite Server where you want to import. 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/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- Identify the Organization that you want to import into.
Import the repository content into Satellite Server:
$ hammer content-import repository \ --organization="My_Organization" \ --path=/var/lib/pulp/imports/2021-03-02T03-35-24-00-00/You must specify the absolute path as in the example:
/var/lib/pulp/imports/2021-03-02T03-35-24-00-00. Relative paths do not work.-
Verify that you imported the repository by checking the contents of the product and repository. The importing Satellite Server extracts the
/var/lib/pulp/importsdirectory to/var/lib/pulp/. Delete the import files after a successful import:
# rm -fr /var/lib/pulp/imports/2021-03-02T03-35-24-00-00/
11.5.7. Importing a repository from a web server Copy linkLink copied to clipboard!
You can import an exported repository directly from a web server when the export is in syncable format and accessible over HTTP/HTTPS.
Prerequisites
- The exported files must be in a syncable format.
- The exported files must be accessible through HTTP/HTTPS.
- If the export contains any Red Hat repositories, the subscription manifest of the importing organization must contain subscriptions for the products contained within the export.
- The user importing the content has the Content Importer role.
Procedure
- Select the organization into which you want to import.
Import the repository to Satellite Server:
$ hammer content-import repository \ --organization="My_Organization" \ --path=http://server.example.com/pub/exports/2021-02-25T21-15-22-00-00/
11.6. Hammer CLI cheat sheet for exporting and importing content Copy linkLink copied to clipboard!
Use these Hammer CLI commands as a quick reference when exporting and importing content between Satellite Servers.
| Intent | Command |
|---|---|
| Fully export an Organization’s Library |
|
| Incrementally export an Organization’s Library (assuming you have exported something previously) |
|
| Fully export a content view version |
|
| Export a content view version promoted to the Dev Environment |
|
| Export a content view in smaller chunks (2-GB slabs) |
|
| Incrementally export a content view version (assuming you have exported something previously) |
|
| Fully export a Repository |
|
| Incrementally export a Repository (assuming you have exported something previously) |
|
| List exports |
|
| Intent | Command |
|---|---|
| Import into an Organization’s Library |
|
| Import to a content view version |
|
| Import a Repository |
|