3.6. Exporting Entities from Satellite 5
spacewalk-exportcommand 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-exportfunctionality, including limiting the data exported, using the
--likeoptions. However, if the goal is to export as much as possible - or at most limit by organization - the
spacewalk-exporttool can manage the process for you.
spacewalk-exportcommand also uses the
spacewalk-export-channelscommand 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
--entitiesoption to limit the export by entity.
# spacewalk-export --entities users,repositories
--entitiesoption with the
channelsparameter to export all channel data available on the Satellite 5 instance. Using this format calls both
spacewalk-export-channels, and consequently exports both Red Hat and non-Red Hat channels.
--orgoption to limit the export by organization. Use the
spacewalk-report userscommand to retrieve a list of organization IDs.
# spacewalk-export --org=ORG-ID
spacewalk-exportcommand stores all exports in the
~/spacewalk-export-dir/exportsfile, and packages all export data into the
~/spacewalk-export-dir/spacewalk_export.tar.gzfile. 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.gzfile to the Satellite 6 server. If the two servers are connected over the network, you can use
scpor a similar tool to transfer the file. Alternatively, use removable media such as a USB device or DVD.
spacewalk_export.tar.gzfile in the
/tmp/directory on your Satellite 6 system. This ensures that the extracted files have suitable permissions for the import process.
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.
/tmp/directory cannot be used, ensure that you use an alternative that provides sufficient space and read access for the
apacheuser and group.
apacheuser 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/
tmp_tSELinux 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/