Questo contenuto non è disponibile nella lingua selezionata.

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


The requirements to migrate from Embedded to an External PostgreSQL Database:

Procedure 13.3. Migrating to an External PostgreSQL Database

  1. Shut down all services on the Red Hat Satellite server, but start the Embedded Database with db-control:
    [root@satellite ~]# rhn-satellite stop
    [root@satellite ~]# db-control start
    
    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. Update your 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 on the External PostgreSQL Database.
  4. Create a directory to hold your database snapshot.
    [root@satellite ~]# mkdir ~/dbbackup
    [root@satellite ~]# cd ~/dbbackup
    
    Copy to Clipboard Toggle word wrap
  5. 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
  6. Stop the Embedded Database:
    [root@satellite dbbackup]# db-control stop
    
    Copy to Clipboard Toggle word wrap
  7. Use spacewalk-setup to populate the External PostgreSQL Database:
    [root@satellite dbbackup]# spacewalk-setup --db-only --external-postgresql
    
    Copy to Clipboard Toggle word wrap
    The script asks for your database details so Satellite can connect and populate the database. Enter your External PostgreSQL Database details:
    ** Database: Setting up database connection for PostgreSQL backend.
    Hostname (leave empty for local)? postgresql.example.com
    Port [5432]?
    Database? myextdb
    Username? root
    Password?
    
    Copy to Clipboard Toggle word wrap
    The script populates the database.
  8. 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
  9. 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
  10. Start Red Hat Satellite.
    [root@satellite ~]# rhn-satellite start
    
    Copy to Clipboard Toggle word wrap
The database is now migrated from an Embedded Database to an External PostgreSQL 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