3.6. Exporting Entities from Satellite 5
spacewalk-export command as a wrapper. This wrapper command calls the following commands to export Satellite 5 entities:
- spacewalk-report channels
- Export all custom and cloned channels and repositories for all organizations.
- spacewalk-report activation-keys
- Export activation keys.
- spacewalk-report kickstart-scripts
- Exports kickstart scripts for all organizations.
- spacewalk-report users
- Export organizations and users.
- spacewalk-report system-groups
- Export all system groups for all organizations.
- spacewalk-report config-files-latest
- Export information on configuration channels and the latest configuration file versions.
- spacewalk-report repositories
- Export repositories.
- spacewalk-report system-profiles
- Export information about the systems managed by Satellite 5.
spacewalk-export functionality, including limiting the data exported, using the --where and --like options. However, if the goal is to export as much as possible - or at most limit by organization - the spacewalk-export tool can manage the process for you.
spacewalk-export command also uses the spacewalk-export-channels command to collect information and content for non-Red Hat channels.
3.6.1. Exporting Data from Satellite 5
# spacewalk-export --list-entities INFO: Currently-supported entities include: INFO: channels : Custom/cloned channels and repositories for all organizations INFO: activation-keys : Activation keys INFO: kickstart-scripts : Kickstart scripts for all organizations INFO: users : Users and Organizations INFO: system-groups : System-groups for all organizations INFO: config-files-latest : Latest revision of all configuration files INFO: repositories : Defined repositories INFO: system-profiles : System profiles for all organizations
--entities option to limit the export by entity.
# spacewalk-export --entities users,repositories
--entities option with the channels parameter to export all channel data available on the Satellite 5 instance. Using this format calls both spacewalk-report-channels and spacewalk-export-channels, and consequently exports both Red Hat and non-Red Hat channels.
--org option to limit the export by organization. Use the spacewalk-report users command to retrieve a list of organization IDs.
# spacewalk-export --org=ORG-ID
spacewalk-export command stores all exports in the ~/spacewalk-export-dir/exports file, and packages all export data into the ~/spacewalk-export-dir/spacewalk_export.tar.gz file. You can use the following options on the command line to specify different values:
# spacewalk-export --export-dir=your-export-directory # spacewalk-export --export-package=your-export-package-name
Example 3.1. Example of a Typical Export Session
# spacewalk-export INFO: Processing channels... Processing organization: GLOBAL SUPPORT SERVI RED HAT, INC. * channel: clone-rhel-x86_64-server-5 with: 15778 packages * channel: clone-rhel-x86_64-server-6 with: 12157 packages * channel: clone-rhel-x86_64-server-optional-6 with: 6931 packages . . * channel: epel-puppet-rhel6-server-x86_64 with: 8 packages * channel: puppet-rhel5-server-x86_64 with: 409 packages * channel: puppet-rhel6-server-x86_64 with: 373 packages INFO: Processing system-groups... INFO: Processing activation-keys... INFO: Processing repositories... INFO: Processing users... INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz
3.6.2. Transferring Exports to Satellite 6
/root/spacewalk-export-dir/spacewalk_export.tar.gz file to the Satellite 6 server. If the two servers are connected over the network, you can use scp or a similar tool to transfer the file. Alternatively, use removable media such as a USB device or DVD.
Warning
spacewalk_export.tar.gz file in the /tmp/ directory on your Satellite 6 system. This ensures that the extracted files have suitable permissions for the import process.
Extract the spacewalk_exports.tar.gz archive into the /tmp/ directory on your Satellite 6 server. This creates a /tmp/exports/ directory that contains all the exported data, ready to import and recreate within the Satellite 6 server. As part of the import process, use the --directory option with the hammer import commands to specify this directory as the source directory.
Important
/tmp/ directory.
/tmp/ directory cannot be used, ensure that you use an alternative that provides sufficient space and read access for the apache user and group.
apache user and group has read access to the /tmp/exports/ directory. If necessary, adjust the group and permissions:
# chgrp -R apache /tmp/exports/ # chmod -R 0750 /tmp/exports/
Important
tmp_t SELinux file context is applied to the /tmp/exports/ directory. If necessary, apply the label manually:
# chcon -R system_u:object_r:tmp_t:s0 /tmp/exports/

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.