Show Table of Contents
第9章 Subscription Asset Manager インスタンスの管理
本章では、バックアップやデータの復元などの Subscription Asset Manager インスタンスの基本的なメンテナンスタスクを説明します。
9.1. Subscription Asset Manager のバックアップ
Subscription Asset Manager のすべての情報のバックアップを作成するユーティリティーはありません。設定ファイルは手動で保存し、バックエンドデータベースのデータはバックアップファイルにダンプする必要があります。
バックアップ操作はすべて、
root で実行する必要があります。
- バックアップディレクトリーを作成します。この例では
umaskを設定することで、バックアップディレクトリーが適切なパーミッションで作成されます。次に、このディレクトリーをpostgresシステムグループに追加します。Subscription Asset Manager が PostgreSQL データベースをバックエンドとして使用するためです。[root@server]# umask 0017 [root@server]# mkdir /backup [root@server]# chgrp postgres /backup
- バックアップディレクトリーに移動します。
[root@server]# cd /backup
tarまたはzipを使って Subscription Asset Manager 設定ファイルの全アーカイブを作成します。例を示します。[root@server]# tar --selinux -czvf config_files.tar.gz \ /etc/katello \ /etc/elasticsearch \ /etc/candlepin \ /etc/gofer \ /etc/grinder \ /etc/pki/katello \ /etc/pki/pulp \ /etc/qpidd.conf \ /etc/sysconfig/katello \ /etc/sysconfig/elasticsearch \ /root/ssl-build \ /var/www/html/pub/*
- Elastic Search ディレクトリー用に別のアーカイブを作成します。
[root@server]# tar --selinux -czvf elastic_data.tar.gz /var/lib/elasticsearch
- PostgreSQL データベースすべてをバックアップします。デフォルトのデータベース名は
katelloschemaとcandlepinになります。Subscription Asset Manager インスタンスでデフォルト名が使用されていない場合は、カスタム値はkatello-configure.confファイルのdb_nameパラメーターになります。[root@server]# grep db_name /etc/katello/katello-configure.conf
pg_dumpコマンドを実行して、各データベースのバックアップを作成します。データベースのサイズによって、数分間かかる場合があります。[root@server]# su postgres -c "pg_dump -Fc katelloschema > /backup/katello.dump" [root@server]# su postgres -c "pg_dump -Fc candlepin > /backup/candlepin.dump"
pg_dumpコマンドを実行するには、postgresサービスが実行中である必要があります。このサービスが実行中でない場合は、PostgreSQL データディレクトリーに zip または tar を実行してバックアップを作成できます。例を示します。[root@server]# tar --selinux -czvf pgsql_data.tar.gz /var/lib/pgsql/data/
ディレクトリー全体をアーカイブ化して全データベースのバックアップを作成します。データベースはすべてシャットダウンするので、データディレクトリーのアーカイブ化はメンテナンス中に行なってください。PostgreSQL バックアップについての詳細は、pg_dumpman ページまたは PostgreSQL documentation を参照してください。 pg_dumpを実行したら、指定されたバックアップディレクトリーに適切な.dumpファイルが作成されていることを確認します。例を示します。# ls /backup candlepin.dump config_files.tar.gz elastic_data.tar.gz katello.dump

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.