Chapter 1. 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 Capsule Servers. To create a clone of a Capsule Server, you must first backup the existing Capsule Server, restore it on the target server, and then reconfigure Capsule Server.
1.1. Cloning process overview Copy linkLink copied to clipboard!
The cloning process involves backing up your source server, transferring it to a target server, and reconfiguring it to operate in the new environment.
The source server is the old server that you want to clone. The target server is the new server that you copy files to and clone the source server to.
Cloning Satellite Server consists of the following high-level steps:
- 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.
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.
1.2. Prerequisites for cloning Copy linkLink copied to clipboard!
Ensure that your environment meets the following prerequisites before you can clone your Satellite Server.
Ensure that the target server complies with all the required specifications for a Satellite Server:
- The target server is a minimal install of Red Hat Enterprise Linux 9. Do not install Red Hat Enterprise Linux 9 software groups or third-party applications.
- You have a Satellite subscription for the target server.
- For a complete list of requirements, see Installing Satellite Server in a connected network environment.
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.
1.3. Preparing the source server for cloning Copy linkLink copied to clipboard!
To prepare the source Satellite Server for cloning, perform a backup of the Satellite data. Depending on the size of your Pulp data, you might need to transfer Pulp data to the target server manually.
While you can clone Satellite Server without Pulp data, you must transfer the Pulp data afterwards to achieve a fully working environment. If the target server does not include Pulp data, it is not a fully working Satellite.
Procedure
Determine the size of the Pulp data:
# du -sh /var/lib/pulp/If you have a large amount of Pulp data, perform a backup without Pulp data and transfer it to the target server manually. Choose this option if you have more than 500 GB of Pulp data, or if you use a slow storage system, such as NFS, and have more than 100 GB of Pulp data.
Perform a backup with PostgreSQL databases active excluding the Pulp data:
# satellite-maintain backup offline --skip-pulp-content \ --assumeyes /var/backupStop and disable Satellite services:
# satellite-maintain service stop # satellite-maintain service disableCopy the Pulp data to the target server:
# rsync --archive --partial --progress --compress \ /var/lib/pulp/ target_server.example.com:/var/lib/pulp/
If you have less than 500 GB of Pulp data, perform a backup with PostgreSQL databases active including the Pulp data.
# satellite-maintain backup offline --assumeyes /var/backupStop and disable Satellite services:
# satellite-maintain service stop # satellite-maintain service disable
1.4. Cloning to the target server Copy linkLink copied to clipboard!
To clone a Satellite Server, you must prepare the target server with backup files, register it with Red Hat, install the cloning tool, and run the restoration process.
Procedure
-
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.
Prepare the target server for cloning:
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.19-for-rhel-9-x86_64-rpmsInstall the
satellite-clonepackage:# dnf install satellite-cloneAfter you install the
satellite-clonetool, you can adjust any configuration to suit your own deployment in the/etc/satellite-clone/satellite-clone-vars.ymlfile. For example, thesatellite-clonetool defaults to using/backup/as the backup folder. If your backup is located in a different folder, update thebackup_dirvariable in the/etc/satellite-clone/satellite-clone-vars.ymlfile.
Run the
satellite-clonetool on the target server:# satellite-clone
1.5. Post-cloning tasks Copy linkLink copied to clipboard!
To complete the cloning, perform the following tasks to ensure your new Satellite Server is fully functional and the source server is decommissioned.
Procedure
-
Log in to the Satellite web UI, with the username
adminand the passwordchangeme. Update the admin password to secure credentials. Reconfigure provisioning services on the target server:
- 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.
In the Satellite web UI, refresh subscriptions:
- Ensure that the correct organization is selected.
- 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. - Decommission the source server.