8.9. バックアップからの IdM サーバーの復元
IdM バックアップから IdM サーバーまたはその LDAP データを復元します。
図8.1 この例で使用されるレプリケーショントポロジー

サーバーのホスト名 | 機能 |
---|---|
| バックアップから復元する必要があるサーバー |
|
|
|
|
前提条件
手順
ipa-restore
ユーティリティーを使用して、完全なサーバーまたはデータのみのバックアップを復元します。バックアップディレクトリーがデフォルトの
/var/lib/ipa/backup/
の場合は、ディレクトリーの名前のみを入力します。[root@server1 ~]# ipa-restore ipa-full-2020-01-14-12-02-32
バックアップディレクトリーがデフォルトの場所にない場合は、完全パスを入力します。
[root@server1 ~]# ipa-restore /mybackups/ipa-data-2020-02-01-05-30-00
注記ipa-restore
ユーティリティーは、ディレクトリーに含まれるバックアップのタイプを自動的に検出し、デフォルトで同じタイプの復元を実行します。完全なサーバーバックアップからデータのみの復元を実行するには、--data
オプションをipa-restore
コマンドに追加します。[root@server1 ~]# ipa-restore --data ipa-full-2020-01-14-12-02-32
Directory Manager パスワードを入力します。
Directory Manager (existing master) password:
Yes
を入力して、現在のデータをバックアップで上書きしていることを確認します。Preparing restore from /var/lib/ipa/backup/ipa-full-2020-01-14-12-02-32 on server1.example.com Performing FULL restore from FULL backup Temporary setting umask to 022 Restoring data will overwrite existing live data. Continue to restore? [no]: yes
ipa-restore
ユーティリティーは、利用可能なすべてのサーバーでレプリケーションを無効にします。Each master will individually need to be re-initialized or re-created from this one. The replication agreements on masters running IPA 3.1 or earlier will need to be manually re-enabled. See the man page for details. Disabling all replication. Disabling replication agreement on server1.example.com to caReplica2.example.com Disabling CA replication agreement on server1.example.com to caReplica2.example.com Disabling replication agreement on caReplica2.example.com to server1.example.com Disabling replication agreement on caReplica2.example.com to replica3.example.com Disabling CA replication agreement on caReplica2.example.com to server1.example.com Disabling replication agreement on replica3.example.com to caReplica2.example.com
その後、このユーティリティーは IdM サービスを停止し、バックアップを復元し、サービスを再起動します。
Stopping IPA services Systemwide CA database updated. Restoring files Systemwide CA database updated. Restoring from userRoot in EXAMPLE-COM Restoring from ipaca in EXAMPLE-COM Restarting GSS-proxy Starting IPA services Restarting SSSD Restarting oddjobd Restoring umask to 18 The ipa-restore command was successful
復元されたサーバーに接続したすべてのレプリカを再初期化します。
domain
接尾辞のレプリカトポロジーセグメントのリストを表示します。復元されたサーバーに関連するトポロジーセグメントを書き留めます。[root@server1 ~]# ipa topologysegment-find domain ------------------ 2 segments matched ------------------ Segment name: server1.example.com-to-caReplica2.example.com Left node: server1.example.com Right node: caReplica2.example.com Connectivity: both Segment name: caReplica2.example.com-to-replica3.example.com Left node: caReplica2.example.com Right node: replica3.example.com Connectivity: both ---------------------------- Number of entries returned 2 ----------------------------
復元されたサーバーとともにすべてのトポロジーセグメントの
domain
接尾辞を再初期化します。この例では、
server1
からのデータでcaReplica2
の再初期化を実行します。[root@caReplica2 ~]# ipa-replica-manage re-initialize --from=server1.example.com Update in progress, 2 seconds elapsed Update succeeded
認証局データに移動し、
ca
接尾辞のレプリケーショントポロジーセグメントのリストを表示します。[root@server1 ~]# ipa topologysegment-find ca ----------------- 1 segment matched ----------------- Segment name: server1.example.com-to-caReplica2.example.com Left node: server1.example.com Right node: caReplica2.example.com Connectivity: both ---------------------------- Number of entries returned 1 ----------------------------
復元されたサーバーに接続されているすべての CA レプリカを再初期化します。
この例では、
server1
からのデータを使用してcaReplica2
のcsreplica
を再初期化します。[root@caReplica2 ~]# ipa-csreplica-manage re-initialize --from=server1.example.com Directory Manager password: Update in progress, 3 seconds elapsed Update succeeded
復元されたサーバー
server1.example.com
のデータですべてのサーバーが更新されるまで、レプリケーショントポロジーを介して、後続のレプリカを再初期化します。この例では、
caReplica2
からのデータで、replica3
のdomain
接尾辞を再初期化することのみが必要になります。[root@replica3 ~]# ipa-replica-manage re-initialize --from=caReplica2.example.com Directory Manager password: Update in progress, 3 seconds elapsed Update succeeded
すべてのサーバーで SSSD のキャッシュをクリアし、無効なデータによる認証の問題を回避します。
SSSD サービスを停止します。
[root@server ~]# systemctl stop sssd
SSSD からキャッシュされたコンテンツをすべて削除します。
[root@server ~]# sss_cache -E
SSSD サービスを起動します。
[root@server ~]# systemctl start sssd
- サーバーを再起動します。
関連情報
-
ipa-restore (1)
の man ページでは、復元中の複雑なレプリケーションシナリオの処理方法が詳細に説明されています。