Questo contenuto non è disponibile nella lingua selezionata.

13.8.5. Migrating from an External PostgreSQL Database to an Embedded Database


The requirements to migrate from an External PostgreSQL Database to an Embedded database:
  • A complete installation of Red Hat Satellite server (satellite.example.com) using an External PostgreSQL Database (postgresql.example.com).

Procedure 13.6. Migrating to an Embedded Database from an External PostgreSQL Database

  1. Shut down all services on the Red Hat Satellite server:
    [root@satellite ~]# rhn-satellite stop
    
    Copy to Clipboard Toggle word wrap
  2. Make sure your External PostgreSQL Database is still running.
  3. Remove the rhn-upgrade if it exists on your server:
    [root@satellite ~]# yum remove rhn-upgrade
    
    Copy to Clipboard Toggle word wrap
  4. Update the External PostgreSQL Database to the latest schema version:
    [root@satellite ~]# yum update satellite-schema
    [root@satellite ~]# spacewalk-schema-upgrade
    
    Copy to Clipboard Toggle word wrap
    This ensures that your database version matches the latest version for the Embedded Database.
  5. Create a directory to hold your database snapshot.
    [root@satellite ~]# mkdir ~/dbbackup
    [root@satellite ~]# cd ~/dbbackup
    
    Copy to Clipboard Toggle word wrap
  6. Export the database using spacewalk-dump-schema:
    [root@satellite dbbackup]# spacewalk-dump-schema --to=postgresql > migrate-to-postgresql.sql
    
    Copy to Clipboard Toggle word wrap
  7. Stop the External Database. It is no longer required.
  8. Install the PostgreSQL installation and Satellite database tools packages on the Satellite server:
    [root@satellite dbbackup]# yum install -y spacewalk-setup-postgresql spacewalk-dobby
    
    Copy to Clipboard Toggle word wrap
  9. Use spacewalk-setup to populate the Embedded Database:
    [root@satellite dbbackup]# spacewalk-setup --db-only
    
    Copy to Clipboard Toggle word wrap
    The script populates the database. Wait until this process completes.
    ** Database: Setting up database connection for PostgreSQL backend.
    ** Database: Installing the database:
    ** Database: This is a long process that is logged in:
    ** Database:   /var/log/rhn/install_db.log
    *** Progress: #
    ** Database: Installation complete.
    ** Database: Populating database.
    *** Progress: ####################################
    
    Copy to Clipboard Toggle word wrap
  10. When the script completes database population, restore the database schema:
    [root@satellite dbbackup]# spacewalk-sql -i < migrate-to-postgresql.sql
    
    Copy to Clipboard Toggle word wrap
  11. Start Red Hat Satellite.
    [root@satellite ~]# rhn-satellite start
    
    Copy to Clipboard Toggle word wrap
The database is now migrated from an External PostgreSQL Database to an Embedded Database.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat