Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Recovering from data loss with VM snapshots
If a data loss event occurs, you can restore a Virtual Machine (VM) snapshot of a Certificate Authority (CA) replica to repair the lost data, or deploy a new environment from it.
4.1. Recovering from only a VM snapshot Copia collegamentoCollegamento copiato negli appunti!
If a disaster affects all IdM servers, and only a snapshot of an IdM CA replica virtual machine (VM) is left, you can recreate your deployment by removing all references to the lost servers and installing new replicas.
Prerequisites
- You have prepared a VM snapshot of a CA replica VM. See Preparing for data loss with VM snapshots.
Procedure
- Boot the desired snapshot of the CA replica VM.
Remove replication agreements to any lost replicas.
ipa server-del lost-server1.example.com ipa server-del lost-server2.example.com
[root@server ~]# ipa server-del lost-server1.example.com [root@server ~]# ipa server-del lost-server2.example.com ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install a second CA replica. See Installing an IdM replica.
- The VM CA replica is now the CA renewal server. Red Hat recommends promoting another CA replica in the environment to act as the CA renewal server. See Changing and resetting IdM CA renewal server.
- Recreate the desired replica topology by deploying additional replicas with the desired services (CA, DNS). See Installing an IdM replica
- Update DNS to reflect the new replica topology. If IdM DNS is used, DNS service records are updated automatically.
- Verify that IdM clients can reach the IdM servers. See Adjusting IdM Clients during recovery.
Verification
Test the Kerberos server on every replica by successfully retrieving a Kerberos ticket-granting ticket as an IdM user.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the Directory Server and SSSD configuration on every replica by retrieving user information.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the CA server on every CA replica with the
ipa cert-showcommand.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Recovering from a VM snapshot among a partially-working environment Copia collegamentoCollegamento copiato negli appunti!
If a disaster affects some IdM servers while others are still operating properly, you may want to restore the deployment to the state captured in a Virtual Machine (VM) snapshot. For example, if all Certificate Authority (CA) Replicas are lost while other replicas are still in production, you will need to bring a CA Replica back into the environment.
In this scenario, remove references to the lost replicas, restore the CA replica from the snapshot, verify replication, and deploy new replicas.
Prerequisites
- You have prepared a VM snapshot of a CA replica VM. See Preparing for data loss with VM snapshots.
Procedure
- Remove all replication agreements to the lost servers. See Uninstalling an IdM server.
- Boot the desired snapshot of the CA replica VM.
Remove any replication agreements between the restored server and any lost servers.
ipa server-del lost-server1.example.com ipa server-del lost-server2.example.com
[root@restored-CA-replica ~]# ipa server-del lost-server1.example.com [root@restored-CA-replica ~]# ipa server-del lost-server2.example.com ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the restored server does not have replication agreements to any of the servers still in production, connect the restored server with one of the other servers to update the restored server.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Review Directory Server error logs at
/var/log/dirsrv/slapd-YOUR-INSTANCE/errorsto see if the CA replica from the snapshot correctly synchronizes with the remaining IdM servers. If replication on the restored server fails because its database is too outdated, reinitialize the restored server.
ipa-replica-manage re-initialize --from server2.example.com
[root@restored-CA-replica ~]# ipa-replica-manage re-initialize --from server2.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - If the database on the restored server is correctly synchronized, continue by deploying additional replicas with the desired services (CA, DNS) according to Installing an IdM replica.
Verification
Test the Kerberos server on every replica by successfully retrieving a Kerberos ticket-granting ticket as an IdM user.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the Directory Server and SSSD configuration on every replica by retrieving user information.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the CA server on every CA replica with the
ipa cert-showcommand.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Recovering from a VM snapshot to establish a new IdM environment Copia collegamentoCollegamento copiato negli appunti!
If the Certificate Authority (CA) replica from a restored Virtual Machine (VM) snapshot is unable to replicate with other servers, create a new IdM environment from the VM snapshot.
To establish a new IdM environment, isolate the VM server, create additional replicas from it, and switch IdM clients to the new environment.
Prerequisites
- You have prepared a VM snapshot of a CA replica VM. See Preparing for data loss with VM snapshots.
Procedure
- Boot the desired snapshot of the CA replica VM.
Isolate the restored server from the rest of the current deployment by removing all of its replication topology segments.
First, display all
domainreplication topology segments.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Next, delete every
domaintopology segment involving the restored server.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Finally, perform the same actions with any
catopology segments.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Install a sufficient number of IdM replicas from the restored server to handle the deployment load. There are now two disconnected IdM deployments running in parallel.
- Switch the IdM clients to use the new deployment by hard-coding references to the new IdM replicas. See Adjusting IdM clients during recovery.
- Stop and uninstall IdM servers from the previous deployment. See Uninstalling an IdM server.
Verification
Test the Kerberos server on every new replica by successfully retrieving a Kerberos ticket-granting ticket as an IdM user.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the Directory Server and SSSD configuration on every new replica by retrieving user information.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Test the CA server on every new CA replica with the
ipa cert-showcommand.Copy to Clipboard Copied! Toggle word wrap Toggle overflow