Overview

Part 10 deliberately distinguishes restore from replica rebuild. Not every FreeIPA outage requires a backup restore. Sometimes it is safer to remove a broken replica from topology and rebuild it cleanly.

https://ipa01.example.test/ipa/ui/

Lab Baseline

Domain: example.test
Realm: EXAMPLE.TEST
Primary: ipa01.example.test
Replica: ipa02.example.test
Client: client01.example.test
Distribution: Fedora Linux 44
Goal: production-like FreeIPA operations without using real customer domains

Decision Tree

A client cannot log in

Useful reaction
Check client, DNS, SSSD and time
Why
server restore would be excessive

One replica is broken, primary is healthy

Useful reaction
remove and rebuild replica
Why
cleaner than restoring an inconsistent replica

Primary lost, replica healthy

Useful reaction
check roles, make replica operational core if needed
Why
data still exists in the topology

All servers lost

Useful reaction
restore from tested backup
Why
no living replication partner remains

CA role affected

Useful reaction
check CA roles and certificate chain separately
Why
identity may later fail without CA

First Diagnosis

bash
for host in ipa01.example.test ipa02.example.test; do
echo "### $host"
ssh "$host" 'hostname -f; ipactl status; chronyc tracking || true; df -h / /var; journalctl -p warning -n 50 --no-pager'
done
kinit admin
ipa server-find
ipa topologysegment-find domain
ipa topologysegment-find ca

Remove a Broken Replica

If a replica is no longer trustworthy, do not half-repair and keep running it. The topology must stay consistent.

bash
# Only after validation and maintenance approval:
ipa server-del ipa02.example.test
ipa server-find
ipa topologysegment-find domain
ipa topologysegment-find ca

Rebuild the Replica

bash
# On the newly installed Fedora 44 target system:
dnf install -y freeipa-server freeipa-client
ipa-client-install --domain example.test --realm EXAMPLE.TEST --server ipa01.example.test
ipa-replica-install --server ipa01.example.test --setup-ca

Restore from Backup

Restore is the path when no reliable replication source remains or the documented restore test says so. Restore commands belong in a runbook, not in improvised emergency chat.

bash
# Isolated or prepared restore target:
ipa-restore /var/lib/ipa/backup/ipa-full-YYYY-MM-DD-HH-MM-SS
ipactl status
kinit admin
ipa config-show
ipa user-find --sizelimit=5
ipa host-find --sizelimit=5

Test Emergency Access

An identity outage must not mean that nobody can administer systems anymore. Break-glass accounts, local root paths, SSH access and documentation must be defined upfront.

  • Local console access to FreeIPA servers exists.

  • Break-glass procedure is documented and tightly protected.

  • Backup access does not depend on the broken identity system.

  • DNS and NTP baseline services are reachable in emergencies.

  • Communication path for maintenance approval is clear.

Result Check

Diagnosis

Check
server/client/replication failure isolated
Result
PASS required

Topology

Check
server-find and topologysegment-find plausible
Result
PASS required

Replica

Check
broken replica removed or rebuilt
Result
PASS required

Restore

Check
ipa-restore only by runbook/test path
Result
PASS required

Login

Check
kinit and client login successful
Result
PASS required

Policy

Check
HBAC/sudo/keytab spot check successful
Result
PASS required

Do Not Skip This

  • Do not answer every failure with restore.

  • Remove broken replicas only after topology validation.

  • Test break-glass access before the emergency.

  • After restore or replica rebuild, validate real logins and policies.