ipa-restore(1)
β¨ NAME β¨
ipa-restore β the glow-up button for your IPA master π bestie this is literally the "put it back the way it was" command, brought to you by the ipa-restore(1) page in the IPA Manual Pages.
π¦ SYNOPSIS π¦
ipa-restore [OPTION]... BACKUP
π DESCRIPTION π
okay so first thing, queen: you only pass in the name of the backup, not the full path. Backups live in a subdirectory inside /var/lib/ipa/backup, that's just where they hang out. But if your backup is chilling somewhere else entirely, then yeah, you gotta hand over the full path. no shortcuts there π
The naming convention for full backups is ipa-full-YEAR-MM-DD-HH-MM-SS, and that timestamp is in the GMT time zone.
The naming convention for data backups is ipa-data-YEAR-MM-DD-HH-MM-SS β also GMT, keep up bestie π«Ά
The type of backup gets automatically detected, it's giving main character energy honestly. And a data restore can be done from either type. flexible icon.
WARNING: a full restore will restore files like/etc/passwd,/etc/group,/etc/resolv.confas well. Any file that IPA may have touched is backed up and restored. yes literally anything, it does not hold back π
An encrypted backup is also automatically detected, and the root keyring and gpg-agent is used by default. If you wanna use a custom keyring and gpg2 configuration, set the GNUPGHOME environment variable. periodt.
Inside that subdirectory there's a file called header, and it describes the back up β including the type, system, date of backup, the version of IPA, the version of the backup, and the services on the master. it's basically the backup's little diary β¨
Two hard nos, write these on your mirror:
- A backup can not be restored on another host.
- A backup can not be restored in a different version of IPA.
Restoring from backup sets the server as the new data master. All other masters will need to be re-initialized. The first step in restoring a backup is to disable replication on all the other masters β this is so the changelog doesn't overwrite the data in the backup. protect the bag, fr fr.
Use the ipa-replica-manage and ipa-csreplica-manage commands to re-initialize other masters. Heads up: ipa-csreplica-manage only needs to be executed on masters that have a CA installed. iykyk π₯
πΈ REPLICATION πΈ
The restoration on other masters needs to be done carefully, to match the replication topology, working outward from the restored master. Example time: if your topology is A <-> B <-> C and you restored master A, you would restore B first, then C. order matters bestie, it's a whole choreography π
Replication is disabled on all masters that are available when a restoration is done. But if a master is down at the time of the restoration, you will need to proceed with extreme caution. If this master is brought back up after the restoration is complete, it may send out replication updates that apply the very changes you were trying to back out. the audacity π The only safe answer is to reinstall the master. This would involve deleting all replication agreements to the master. This could have a cascading effect if the master is a hub to other masters β they would need to be connected to other masters before removing the downed master.
If the restore point is from a period prior to a replication agreement, then the master will need to be re-installed. For example: you have masters A and B and you create a backup. You then add master C from B. Then you restore from the backup. The restored data is going to lose the replication agreement to C. The master on C will have a replication agreement pointing to B, but B won't have the reverse agreement. Master C won't be registered as an IPA master. It may be possible to manually correct these and re-connect C to B, but it would be very prone to error. nope nope nope π
If re-initializing on an IPA master version prior to 3.2, then the replication agreements will need to be manually re-enabled β otherwise the re-initialization will never complete. To manually enable an agreement, use ldapsearch to find the agreement name in cn=mapping tree,cn=config. The value of nsds5ReplicaEnabled needs to be on, and enabled on both sides. Remember that CA replication is done through a separate agreement and will need to be updated separately. two separate things, don't merge them in your head π
And if you have older masters? you should consider re-creating them rather than trying to re-initialize them. sometimes a fresh start is the vibe π¦
π OPTIONS π
-p,--password=PASSWORDβ the Directory Manager password. the keys to the kingdom, keep it safe π--dataβ restore the data only. The default is to restore everything in the backup.--no-logsβ exclude the IPA service log files in the backup (if they were backed up). skip the receipts bestie.--onlineβ perform the restore on-line. Requires data-only backup or the--dataoption.--instance=INSTANCEβ restore only the databases in this 389-ds instance. The default is to restore all found (at most this is the IPA REALM instance and the PKI-IPA instance). Requires data-only backup or the--dataoption.--backend=BACKENDβ the backend to restore within an instance or instances. Requires data-only backup or the--dataoption.-v,--verboseβ print debugging information. she's chatty and we love her π£οΈ-d,--debugβ alias for--verbose. same energy, different letter.-q,--quietβ output only errors. silent but deadly β¨--log-file=FILEβ log to the given file.
π EXIT STATUS π
0if the command was successful β slay π1if an error occurred β not slay π
π§ ENVIRONMENT VARIABLES π§
GNUPGHOMEβ use custom GnuPG keyring and settings (default:~/.gnupg).
π FILES π
/var/lib/ipa/backup- the default directory for storing backup files. home sweet home π
/var/log/iparestore.log- the log file for restoration.
β SEE ALSO β
and that's the whole page bestie, you ate it up π this was the IPA manual page, dated Mar 22 2013 β go forth and restore responsibly, mwah πβ¨
π¦ where this page comes from
- centos-stream 10: ipa-server 4.13.4-1.el10 Β· GPL-3.0-or-later
- centos-stream 9: ipa-server 4.13.4-1.el9 Β· GPL-3.0-or-later
- fedora 43: freeipa-server 4.12.5-3.fc43 Β· GPL-3.0-or-later
- fedora 43: freeipa-server 4.13.4-2.fc43
- fedora 43: freeipa-server 4.13.4-3.fc43 Β· GPL-3.0-or-later
- fedora 44: freeipa-server 4.13.1-9.fc44 Β· GPL-3.0-or-later
- fedora 44: freeipa-server 4.13.4-2.fc44
- fedora 44: freeipa-server 4.13.4-3.fc44 Β· GPL-3.0-or-later
- Copyright (C) 2013 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms