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
백업 디렉터리가 기본 위치에 없는 경우 전체 경로를 입력합니다.If the backup directory is not in the default location, enter its full path:
[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
복원된 서버에 연결된 모든 복제본을 다시 초기화합니다.
복원된 서버와 관련된 토폴로지 세그먼트를 기록하여
도메인
접미사의 모든 복제 토폴로지 세그먼트를 나열합니다.[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 ----------------------------
복원된 서버가 있는 모든 토폴로지 세그먼트의
도메인
접미사를 다시 초기화합니다.이 예에서는
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
의도메인
접미사만 다시 초기화해야 합니다.[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)
도움말 페이지에서는 복원 중에 복잡한 복제 시나리오를 처리하는 방법에 대해서도 설명합니다.