How to synchronize different contents using hammer CLI into Red Hat Capsule 6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • Red Hat Capsule 6

Issue

  • What hammer command can be used to synchronize the following contents into Red Hat Capsule 6?

    • All content from Red Hat Satellite 6 environment
    • A specific Lifecycle Environment
    • One specific Content View from a specific Lifecycle Environment
    • One specific Repository from a Content View and Lifecycle Environment

Resolution

  • Before proceeding, execute following hammer commands on the Satellite server to obtain the capsule_id, repository_id, lifecycle_environment_id, and content_view_id to replace against $values in the following procedures:

    # hammer capsule list
    # hammer content-view list
    # hammer repository list
    # hammer lifecycle-environment list
    
  • Following command can be used to synchronize:

    • All content from Red Hat Satellite 6 environment to Red Hat Capsule 6:

      # hammer capsule content synchronize --id $capsule_id
      
    • A specific Lifecycle Environment from Red Hat Satellite 6 environment to Red Hat Capsule 6:

      # hammer capsule content synchronize  --id $capsule_id  --lifecycle-environment-id $lifecycle_environment_id
      
    • One specific Content View from a specific Lifecycle Environment from Red Hat Satellite 6 environment to Red Hat Capsule 6:

      # hammer capsule content synchronize --id $capsule_id --content-view-id $content_view_id --lifecycle-environment-id  $lifecycle_environment_id
      
    • One specific Repository from a Content View and Lifecycle Environment from Red Hat Satellite 6 environment to Red Hat Capsule 6:

      # hammer capsule content synchronize --id $capsule_id --repository-id $repository_id --content-view-id $content_view_id --lifecycle-environment-id $lifecycle_environment_id
      
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.