検索

3.6. Migrating to External Databases

download PDF

Back up and transfer existing data, then use the satellite-installer command to configure Satellite to connect to external MongoDB and PostgreSQL databases.

Prerequisites

  • You have installed and configured MongoDB and PostgreSQL databases on a Red Hat Enterprise Linux server.

Procedure

  1. On Satellite Server, stop the satellite-maintain services:

    # satellite-maintain service stop
  2. Start the postgreSQL and mongod services:

    # systemctl start postgresql
    # systemctl start mongod
  3. Back up the internal databases:

    # satellite-maintain backup online --skip-pulp-content --preserve-directory -y /var/migration_backup
  4. Transfer the data to the new external databases:

    PGPASSWORD='Foreman_Password' pg_restore -h postgres.example.com -U foreman -d foreman < /var/migration_backup/foreman.dump
    PGPASSWORD='Candlepin_Password' pg_restore -h postgres.example.com -U candlepin -d candlepin < /var/migration_backup/candlepin.dump
    mongorestore --host mongo.example.com --db pulp_database --username pulp_user --password pulp_password /var/migration_backup/mongo_dump/pulp_database/
  5. Use the satellite-installer command to update Satellite to point to the new databases:

    satellite-installer --scenario satellite \
        --foreman-db-host postgres.example.com \
        --foreman-db-password Foreman_Password \
        --foreman-db-database foreman \
        --foreman-db-manage false \
        --katello-candlepin-db-host postgres.example.com \
        --katello-candlepin-db-name candlepin \
        --katello-candlepin-db-password Candlepin_Password \
        --katello-candlepin-manage-db false \
        --katello-pulp-db-username pulp \
        --katello-pulp-db-password pulp_password \
        --katello-pulp-db-seeds mongo.example.com:27017 \
        --katello-pulp-db-name pulp_database \
        --katello-pulp-manage-db false
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.