Overview

Part 9 makes FreeIPA backup operationally tangible. FreeIPA backup is not just files: it covers LDAP data, Kerberos, CA material, certificates, replication state and whether a restore can be tested in time.

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

What a FreeIPA Backup Must Cover

  • Back up directory data and identity objects reproducibly.

  • Do not lose CA and certificate material.

  • Store backups encrypted and access-restricted.

  • Document restore target, time window and responsibilities.

  • Regularly perform restore tests outside production.

Create the Backup

`ipa-backup` is the central entry point. For operations documentation, record timestamp, hostname, FreeIPA version, backup path and hashes.

bash
backup_root=/root/ipa-backups/$(date +%F-%H%M)
mkdir -p "$backup_root"
hostname -f | tee "$backup_root/hostname.txt"
ipa --version | tee "$backup_root/ipa-version.txt"
ipactl status | tee "$backup_root/ipactl-status-before-backup.txt"
ipa-backup --data --logs | tee "$backup_root/ipa-backup.log"
find /var/lib/ipa/backup -maxdepth 2 -type f -printf '%p
' | sort | tee "$backup_root/backup-files.txt"
sha256sum /var/lib/ipa/backup/*/* 2>/dev/null | tee "$backup_root/sha256sums.txt"

Store the Backup Safely

The backup contains sensitive identity and key material. It must not live only on the same host. Transfer, target and retention need controls.

bash
rsync -aH --numeric-ids --chmod=go-rwx /var/lib/ipa/backup/ backup01.example.test:/srv/backup/freeipa/ipa01.example.test/
ssh backup01.example.test 'find /srv/backup/freeipa/ipa01.example.test -maxdepth 2 -type f -ls'

Define the Restore Window

A backup is only reliable when it is clear how long restore may take and which dependencies must exist: DNS, time, hostname, network, Fedora version, storage and access credentials.

Hostname/FQDN

Why it matters
FreeIPA is name-sensitive
Evidence
ipa01.example.test documented

Time/NTP

Why it matters
Kerberos tolerates only small clock skew
Evidence
chronyc tracking

DNS

Why it matters
clients and replicas find servers by name
Evidence
dig and getent

Backup integrity

Why it matters
broken archives fail before the emergency
Evidence
sha256sum and restore test

Access

Why it matters
backup data is highly sensitive
Evidence
0600/0700, separated admin roles

Restore target

Why it matters
emergency needs a clear target
Evidence
runbook and test VM

Regular Restore Test

At least one technical restore in an isolated environment should be part of operations. Do not overwrite production; use a test system with identical naming/network assumptions or deliberately isolated DNS visibility.

bash
# On an isolated restore test system, not directly on production:
ipa-restore /var/lib/ipa/backup/ipa-full-YYYY-MM-DD-HH-MM-SS
ipactl status
kinit admin
ipa user-find --sizelimit=5
ipa host-find --sizelimit=5

Result Check

Backup

Check
ipa-backup runs successfully
Result
PASS required

Data

Check
backup files and logs exist
Result
PASS required

Integrity

Check
hashes created and stored
Result
PASS required

Security

Check
backup access-restricted and offloaded
Result
PASS required

Restore

Check
isolated restore test documented
Result
PASS required

Identity

Check
kinit, user-find, host-find after restore
Result
PASS required

Do Not Skip This

  • Do not confuse backup with restore capability.

  • Store backup data encrypted and separate from the FreeIPA system.

  • Restore regularly in isolation.

  • Document DNS, time and hostname as restore dependencies.