Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

13.8. Migrating the Database


If you have installed Red Hat Satellite 5 but later need to transition your database, use the following sections to guide your migration process.

13.8.1. Migrating from an Embedded Database to a Managed Database

The requirements to migrate from Embedded to Managed Database are:
  • The Red Hat Satellite installation ISO
  • A complete installation of Red Hat Satellite server with an Embedded Database (satellite.example.com)
  • A new system to host the Managed Database with Red Hat Enterprise Linux 6 installed (manageddb.example.com)

Procedure 13.2. Migrating to a Managed Database

  1. Shut down the Red Hat Satellite instance:
    [root@satellite ~]# rhn-satellite stop
    
    Copy to Clipboard Toggle word wrap
  2. Remove the rhn-upgrade if it exists on your server:
    [root@satellite ~]# yum remove rhn-upgrade
    
    Copy to Clipboard Toggle word wrap
  3. Use db-control to create a database backup
    [root@satellite ~]# mkdir ~/dbbackup
    [root@satellite ~]# db-control backup ~/dbbackup
    
    Copy to Clipboard Toggle word wrap
  4. Copy the database backup from the Satellite server to the Managed Database server.
    [root@satellite ~]# scp -r ~/dbbackup root@manageddb.example.com:~/.
    
    Copy to Clipboard Toggle word wrap
  5. Install the Managed Database using the Red Hat Satellite installation ISO. For full instructions, see Section 4.2.6, “Installing the Managed Database”.
  6. After you have installed the Managed External Database, shut it down and back up the database configuration and access control files.
    [root@manageddb ~]# db-control stop
    [root@manageddb ~]# cp /opt/rh/postgresql92/root/var/lib/pgsql/data/postgresql.conf ~/dbbackup
    [root@manageddb ~]# cp /opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.conf ~/dbbackup
    
    Copy to Clipboard Toggle word wrap
    You need to backup these files because the migration process will erase them.
  7. Use db-control to restore the database backup to the Managed Database server.
    [root@manageddb ~]# db-control restore ~/dbbackup
    
    Copy to Clipboard Toggle word wrap
  8. Restore the database configuration and access control files from backup to the Managed Database.
    [root@manageddb ~]# cp ~/dbbackup/postgresql.conf /opt/rh/postgresql92/root/var/lib/pgsql/data/postgresql.conf
    [root@manageddb ~]# cp ~/dbbackup/pg_hba.conf /opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.conf
    
    Copy to Clipboard Toggle word wrap
  9. On the Satellite server, edit the /etc/rhn/rhn.conf file and change db_host to the domain name of the Managed Database and set the db_port to 5432. For example:
    db_host = manageddb.example.com
    db_port = 5432
    
    Copy to Clipboard Toggle word wrap
  10. Remove postgresql92-postgresql from the /etc/rhn/service-list file on the Satellite server.
    [root@satellite ~]# sed -i 's/postgresql92-postgresql //g' /etc/rhn/service-list
    
    Copy to Clipboard Toggle word wrap
  11. On the Managed Database, edit the /etc/rhn/rhn.conf file and change db_name, db_user, db_password to reflect the same values in /etc/rhn/rhn.conf on the Satellite server. For example:
    db_name = mydb
    db_user = mydbuser
    db_password = mydbpassword
    
    Copy to Clipboard Toggle word wrap
  12. Start the Managed Database instance using db-control.
    [root@manageddb ~]# db-control start
    
    Copy to Clipboard Toggle word wrap
  13. Remove the postgresql92-server and spacewalk-dobby packages from the Satellite server.
    [root@satellite ~]# yum remove postgresql92-server spacewalk-dobby
    
    Copy to Clipboard Toggle word wrap
  14. Restart Red Hat Satellite.
    [root@satellite ~]# rhn-satellite start
    
    Copy to Clipboard Toggle word wrap
The database is now migrated from an Embedded Database to a Managed Database.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat