3.4. 外部データベースへの移行
既存のデータをバックアップおよび転送してから、satellite-installer
コマンドを使用して、外部の PostgreSQL データベースに接続するように Satellite を設定します。
前提条件
- Red Hat Enterprise Linux サーバーに PostgreSQL サーバーをインストールおよび設定していること。
手順
Satellite Server で Satellite サービスを停止します。
satellite-maintain service stop
# satellite-maintain service stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow PostgreSQL サービスを起動します。
systemctl start postgresql
# systemctl start postgresql
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 内部データベースのバックアップを作成します。
satellite-maintain backup online --skip-pulp-content --preserve-directory -y /var/migration_backup
# satellite-maintain backup online --skip-pulp-content --preserve-directory -y /var/migration_backup
Copy to Clipboard Copied! Toggle word wrap Toggle overflow データを新規外部データベースに転送します。
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 PGPASSWORD='Pulpcore_Password' pg_restore -h postgres.example.com -U pulp -d pulpcore < /var/migration_backup/pulpcore.dump
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 PGPASSWORD='Pulpcore_Password' pg_restore -h postgres.example.com -U pulp -d pulpcore < /var/migration_backup/pulpcore.dump
Copy to Clipboard Copied! Toggle word wrap Toggle overflow satellite-installer
コマンドを使用して Satellite が新規データベースを参照するように更新します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow