ipa-restore(1)

πŸ“¦ version 4.13.4, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

✨ 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.conf as 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 --data option.
  • --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 --data option.
  • --backend=BACKEND β€” the backend to restore within an instance or instances. Requires data-only backup or the --data option.
  • -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 🌈

  • 0 if the command was successful β€” slay πŸ’–
  • 1 if 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 πŸŽ€βœ¨