このコンテンツは選択した言語では利用できません。
Chapter 2. Cloning Satellite Server
You can clone your Satellite Server to create instances to test upgrades and migration of instances to a different machine or operating system. This is an optional step to provide more flexibility during the upgrade or migration.
You cannot use the Satellite clone tool on a Capsule Server. Instead, you must backup the existing Capsule Server, restore it on the target server, and then reconfigure Capsule Server.
Note that because of the high volume of data that you must copy and transfer as part of the cloning process, it can take a significant amount of time to complete.
If you create a new instance of the Satellite Server, decommission the old instances after restoring the backup. Cloned instances are not supposed to run in parallel in a production environment.
Review the following definitions before proceeding:
- Source server
- The old server to be cloned.
- Target server
- The new server that you copy files to and clone the source server to.
2.1. Cloning process overview リンクのコピーリンクがクリップボードにコピーされました!
- Back up the source server.
- Clone the source server to the target server.
- Power off the source server.
- Update the network configuration on the target server to match the IP address of the target server with its new host name.
- Test the new target server.
2.2. Prerequisites for cloning リンクのコピーリンクがクリップボードにコピーされました!
To clone Satellite Server, ensure that you have the following resources available:
- A minimal install of Red Hat Enterprise Linux 9 to become the target server. Do not install Red Hat Enterprise Linux 9 software groups or third-party applications. Ensure that your server complies with all the required specifications. For more information, see Preparing environment for Satellite Server installation in Installing Satellite Server in a connected network environment.
-
A backup of your Satellite Server that you make using the
satellite-maintain backupscript. You can use a backup with or without Pulp data. - A Satellite subscription for the target server.
Before you begin cloning, ensure the following conditions exist:
- The target server is on an isolated network. This prevents the cloned Satellite Server from accidentally communicating with the source Satellite Server, Capsule Servers, and hosts.
- The target server has at least the same storage capacity as the source server.
-
If you have any customized configurations on your source server that are not managed by the
satellite-installertool or Satellite backup process, you must manually back up these files.
2.3. Pulp data considerations リンクのコピーリンクがクリップボードにコピーされました!
You can clone Satellite Server without including Pulp data. However, for your cloned environment to work, you do require Pulp data. If the target server does not have Pulp data, it is not a fully working Satellite.
To transfer Pulp data to a target server, you have two options:
- Clone using backup with Pulp data
Clone using backup without Pulp data and copy
/var/lib/pulpmanually from the source server.If your
pulp_data.tarfile is greater than 500 GB, or if you use a slow storage system, such as NFS, and yourpulp_data.tarfile is greater than 100 GB, do not includepulp_data.tarin the backup because this can cause memory errors during extraction. Instead, copy thepulp_data.tarfile from the source server to the target server.
2.3.1. Cloning without Pulp data リンクのコピーリンクがクリップボードにコピーされました!
You can clone Satellite Server without including Pulp data.
Procedure
Follow the steps in the procedure in Section 2.4, “Preparing the source server for cloning” and Section 2.5, “Cloning to the target server” replace the steps that involve cloning with Pulp data with the following steps:
Perform a backup with PostgreSQL databases active excluding the Pulp data:
satellite-maintain backup offline --skip-pulp-content \ --assumeyes /var/backup
# satellite-maintain backup offline --skip-pulp-content \ --assumeyes /var/backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow Stop and disable Satellite services:
satellite-maintain service stop satellite-maintain service disable
# satellite-maintain service stop # satellite-maintain service disableCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the Pulp data to the target server:
rsync --archive --partial --progress --compress \ /var/lib/pulp/ target_server.example.com:/var/lib/pulp/
# rsync --archive --partial --progress --compress \ /var/lib/pulp/ target_server.example.com:/var/lib/pulp/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Next Steps
Proceed to Section 2.5, “Cloning to the target server”.
2.4. Preparing the source server for cloning リンクのコピーリンクがクリップボードにコピーされました!
Prepare the source Satellite Server for cloning.
Procedure
Determine the size of the Pulp data:
du -sh /var/lib/pulp/
# du -sh /var/lib/pulp/Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you have less than 500 GB of Pulp data, perform a backup with PostgreSQL databases active including the Pulp data. If you have more than 500 GB of Pulp data, skip the following steps and complete the steps in Section 2.3, “Pulp data considerations” before you continue.
satellite-maintain backup offline --assumeyes /var/backup
# satellite-maintain backup offline --assumeyes /var/backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow Stop and disable Satellite services:
satellite-maintain service stop satellite-maintain service disable
# satellite-maintain service stop # satellite-maintain service disableCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Next steps
2.5. Cloning to the target server リンクのコピーリンクがクリップボードにコピーされました!
To clone your server, complete the following steps on your target server:
-
The
satellite-clonetool defaults to using/backup/as the backup folder. If you copy to a different folder, update thebackup_dirvariable in the/etc/satellite-clone/satellite-clone-vars.ymlfile. -
Place the backup files from the source Satellite in the
/backup/folder on the target server. You can either mount the shared storage or copy the backup files to the/backup/folder on the target server. - Power off the source server.
Register your instance to the Red Hat Customer Portal and enable only the required repositories:
subscription-manager register subscription-manager repos --disable=* subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms \ --enable=rhel-9-for-x86_64-baseos-rpms \ --enable=satellite-maintenance-6.18-for-rhel-9-x86_64-rpms
# subscription-manager register # subscription-manager repos --disable=* # subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms \ --enable=rhel-9-for-x86_64-baseos-rpms \ --enable=satellite-maintenance-6.18-for-rhel-9-x86_64-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
satellite-clonepackage:dnf install satellite-clone
# dnf install satellite-cloneCopy to Clipboard Copied! Toggle word wrap Toggle overflow After you install the
satellite-clonetool, you can adjust any configuration to suit your own deployment in the/etc/satellite-clone/satellite-clone-vars.ymlfile.Run the
satellite-clonetool:satellite-clone
# satellite-cloneCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reconfigure DHCP, DNS, TFTP, and remote execution services. The cloning process disables these services on the target Satellite Server to avoid conflict with the source Satellite Server.
- Reconfigure and enable DHCP, DNS, and TFTP in the Satellite web UI. For more information, see Integrating provisioning infrastructure services..
-
Log in to the Satellite web UI, with the username
adminand the passwordchangeme. Immediately update the admin password to secure credentials. - Ensure that the correct organization is selected.
- In the Satellite web UI, navigate to Content > Subscriptions.
- Click Manage Manifest.
- Click Refresh and then click Close to return to the list of subscriptions.
- Verify that the available subscriptions are correct.
-
Follow the instructions in the
/usr/share/satellite-clone/logs/reassociate_capsules.txtfile to restore the associations between Capsules and their lifecycle environments. -
Update your network configuration, for example, DNS, to match the IP address of the target server with its new host name. The
satellite-clonetool changes the host name to the source server’s host name. If you want to change the host name to something different, you can use thesatellite-change-hostnametool. For more information, see Renaming Satellite Server in Administering Red Hat Satellite. -
If the source server uses the
virt-whodaemon, install and configure it on the target server. Copy all thevirt-whoconfiguration files in the/etc/virt-who.d/directory from the source server to the same directory on the target server. For more information, see Configuring virt-who for virtual machine subscriptions. After you perform an upgrade using the following chapters, you can safely decommission the source server.