Upgrade and backup
Which layers upgrade in place, how, and how to roll back. What the daily backup produces, when to take a full backup, and the difference between restoring to the same machine and a new one.
Model B only. The Model A container appliance has no data-preserving upgrade: replacing the image means deleting volumes, which wipes the identity store. Production runs Model B.
Upgrade
| Layer | In place | How |
|---|---|---|
Console (dist/) | Yes | Replace the directory, no restart |
| Licence layer | Yes | Overwrite the py files, restart per the table below |
| Configuration / playbook | Yes | Rerun the playbook; idempotent |
FreeIPA itself (ipa-server RPM) | No | See below |
| OS major version | No | Reinstall and restore, as a project |
IDMatrix releases (features, localisation, gating, bug fixes) all fall into the first three rows and never touch FreeIPA itself.
Before upgrading
sudo ipa-backup # full; stops dirsrv ~30 s, maintenance window
sudo tar czf /root/license-state-preupgrade.tgz -C /var/lib idmatrix-license # licence state is outside ipa-backup
rpm -q ipa-server; ls -la /opt/idmatrix/dist/index.html # note versions for rollbackKeep the previous bundle.
Recommended: rerun the playbook
Take the new bundle, keep the old customer.env, point IDM_WEBUI_DIST_SRC and IDM_LIC_SRC at the new bundle, rerun:
cd <new bundle> && ./deploy/render-inventory.sh
ansible-playbook -i deploy/inventory.generated.yml deploy-ipaserver.ymlThe ipaserver role skips when IPA is already installed; overwritten console and licence files trigger their own restarts.
Manual: console only
Build output carries content hashes; empty the directory first or old and new files pile up:
cd /opt/idmatrix/dist && find . -mindepth 1 -delete
tar xzf /tmp/dist-<new version>.tar.gz -C /opt/idmatrix/distStatic files only; no service restart, Ctrl+F5 in the browser.
Manual: licence layer only
sudo install -m 0755 -o root -g root <new>/license_gate.py <new>/gate_wsgi.py /opt/idmatrix-license/
sudo rm -rf /opt/idmatrix-license/__pycache__
python3 /opt/idmatrix-license/license_gate.py # must print self-test: PASS
sudo systemctl restart httpd| Changed | Restart | Why |
|---|---|---|
gate_wsgi.py / license_gate.py | systemctl restart httpd | mod_wsgi daemons must re-import |
idmatrix_hostlimit.py (server plugin) | ipactl restart | Plugins load at api.finalize() |
phonehome.py / license_api.py | None | Each call is a fresh process |
Three checks afterwards: curl -sk -o /dev/null -w '%{http_code}\n' https://<FQDN>/ipa/modern-ui/ returns 200; ipa user-show admin works; valid in status.json is unchanged. Then attempt a write in an unlicensed module and confirm it is refused. A broken gate lets things through; it does not error.
Not upgraded in place: FreeIPA itself
Not tied to IDMatrix releases. Air-gapped sites have no yum repo and a cross-version upgrade needs a full dependency closure; major versions run ipa-server-upgrade with schema migration that is hard to roll back; restore requires the same version, so upgrading IPA strands older backups. For security advisories, contact Reallysec for a dedicated plan; do not dnf update ipa-server on your own.
Rollback
| Upgraded | Rollback |
|---|---|
| Console | Empty dist/, unpack the previous version |
| Licence layer | Restore the previous py files, restart per the table |
| Data damage | ipa-restore <pre-upgrade full backup>, restore license-state-preupgrade.tgz |
Backup
Two things to back up: the IPA identity store (users, groups, hosts, policies, certificates, CA, DNS) and the licence state (/var/lib/idmatrix-license/).
Backups contain the CA private key and directory data. Encrypt them once off the host and restrict access.
Two kinds
| Command | Scope | Service | Use |
|---|---|---|---|
ipa-backup | Full: data + CA + certificates + config | Stops dirsrv ~30 s | Disaster recovery; weekly, and before trust setup, bulk policy changes, upgrades |
ipa-backup --data --online | LDAP data only | No interruption | Daily; preconfigured at install |
Output lands in /var/lib/ipa/backup/ipa-full-<timestamp> or ipa-data-<timestamp>. Nothing leaves the host on its own; copy it off and keep at least two generations.
Daily automatic backup
The playbook installs /usr/local/sbin/idmatrix-backup.sh and idmatrix-backup.timer, producing two artefacts at 02:30 daily in about 5 seconds without stopping services:
| Artefact | Path |
|---|---|
| Data backup | /var/lib/ipa/backup/ipa-data-<timestamp>/ |
| Licence state | /var/lib/ipa/backup/license-state-<timestamp>.tgz |
Anything older than 14 days is pruned (idm_backup_keep_days). Sites with their own backup system set idm_setup_backup=false at install. Inspect with systemctl list-timers idmatrix-backup.timer and journalctl -u idmatrix-backup.service; run one now with systemctl start idmatrix-backup.service.
With multi-master
Back up each IPA server. Restore a full backup on one server only, then re-initialise the others from it (ipa-replica-manage re-initialize --from <restored server>); otherwise the data conflicts.
Restore
Restore overwrites the identity store; services are down for about 45 seconds during ipa-restore. Use a maintenance window.
Requirements: same IPA version, same hostname / realm / domain. A full restore normally goes onto a freshly installed IPA server.
sudo cp -a /offsite/ipa-full-<timestamp> /var/lib/ipa/backup/
sudo ipa-restore /var/lib/ipa/backup/ipa-full-<timestamp>
# only when restoring to the same machine
sudo tar xzf license-state.tgz -C /var/lib
sudo systemctl restart httpdAfterwards: ipactl status all RUNNING; kinit admin && ipa user-find --sizelimit=1; ipa trust-show <AD domain> where a trust exists; License Activation page shows valid.
Two lines of normal output, not faults: Could not open file for writing: /etc/httpd/conf.d/nss.conf (this version uses mod_ssl; the file never exists) and the note about re-initialising replicas (irrelevant on a single server; handle multi-master as above).
The target machine decides whether the licence survives
| Restore to | machine-id | Licence |
|---|---|---|
| Same host (reinstall, rollback) | Unchanged | Still valid; restore /var/lib/idmatrix-license with it |
| New host, new hardware (DR rebuild) | Changed | Invalid. Take the new fingerprint, Reallysec reissues, upload on the activation page |
DR sequence: install the same IPA version on the new host (same hostname / realm) → ipa-restore → identity store back → reissue the licence for the new fingerprint → with a trust, verify ipa trust-show and id <AD user>@<AD domain>.
Measured on a 4 GB / 2 vCPU single server: full backup 30 seconds, full restore 45 seconds; afterwards all 11 services up, objects created after the backup rolled back, AD trust intact, console returning 200.
Adding a second IPA server
Add a replica with ipa-replica-install for multi-master. Pre-flight checks, the install commands, which warnings to ignore, post-install checks, and how to clean up and retry after a failure.
Console overview
What each of the five navigation groups manages, which are controlled by licence modules, and when to use the CLI instead.