Show Table of Contents
9.2. Subscription Asset Manager の復元
警告
Subscription Asset Manager を復元すると、Subscription Asset Manager インスタンスのすべての既存データが上書きされます。
復元する Subscription Asset Manager インスタンスを間違えないようにしてください。
重要
この手順では、Subscription Asset Manager サーバーが以前にインストールされてバックアップを作成した同じマシンで復元されることを前提としています。
Subscription Asset Manager インスタンスを別のホストで復元する場合は、そのシステムが同じホスト名および IP アドレスなど、元のシステムと同じ設定になっている必要があります。
復元操作はすべて、
root で実行する必要があります。
- 設定のバックアップからのファイルを使って、元のインスタンスと同じオプションで設定ファイルを作成します。それから、
katello-configureスクリプトを実行します。[root@server ~]# katello-configure --answer-file=/etc/katello/katello-configure.conf
- バックアップファイルを格納しているディレクトリーを開きます。例を示します。
[root@server ~]# cd backup/
- データベース名を確認します。デフォルトのデータベース名は
katelloschemaとcandlepinになります。Subscription Asset Manager インスタンスでデフォルト名が使用されていない場合は、カスタム値はkatello-configure.confファイルのdb_nameパラメーターになります。[root@server backup]# grep db_name /etc/katello/katello-configure.conf
- データベースを復元する前にすべてのサービスを停止します。
[root@server backup]# katello-service stop
- アーカイブ化されたファイルおよびディレクトリーを抽出してシステムファイルを復元します。例を示します。
[root@server backup]# tar --selinux -xzvf config_files.tar.gz -C / [root@server backup]# tar --selinux -xzvf elastic_data.tar.gz -C /
- 既存の Subscription Asset Manager PostgreSQL データベースがある場合は、それらをドロップします。
[root@server backup]# service postgresql start [root@server backup]# su postgres -c "dropdb katelloschema" [root@server backup]# su postgres -c "dropdb candlepin"
すべてのプロセスが先に停止されていない場合は、データベースドロップ操作で以下のエラーが返されます。database xxx is being accessed by other users (他のユーザーがデータベース xxx にアクセスしています)
postgresユーザーとしてpg_restoreコマンドを実行し、データベースを復元します。[root@server backup]# su postgres -c "pg_restore -C -d postgres /backup/katello.dump" [root@server backup]# su postgres -c "pg_restore -C -d postgres /backup/candlepin.dump"
PostgreSQL 復元操作についての詳細は、pg_dumpman ページまたは PostgreSQL documentation を参照してください。- Subscription Asset Manager の全プロセスを再起動します。
[root@server backup]# katello-service restart
/var/log/katello/production.logログファイルでエラーを、/var/log/candlepin/audit.logファイルで拒否をチェックして、すべてのサービスが適切に応答していることを確認します。Subscription Asset Manager インスタンス への ping を試みます。[root@server backup]# katello -u admin -p admin ping -------------------------------------------------------------------------------- Katello Status Status Service Result Duration Message -------------------------------------------------------------------------------- OK candlepin OK 74ms candlepin_auth OK 38ms elasticsearch OK 37ms katello_jobs OK 39ms

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.