Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Guru
Created on 08-24-2018 09:55 AM - edited 09-16-2022 01:44 AM
There are at times we would need to move kerberos database to different nodes or upgrade the OS of KDC node ( for e.x CentOS6 to CentOS7 ). Obviously you would not want to lose you the kdc users especially if your HDP cluster is configured to use this kdc.
Follow below steps to backup and restore kerberos database.
prerequisite
* Backup the keytab from the HDP cluster under /etc/security/keytabs from all nodes. * Note down your kdc admin principal and password * Backup /etc/krb5.conf * Backup /var/kerberos directory
Backup
* Take the kerberos database dump using below command ( to be executed on node running kerberos ) kdb5_util dump kdb5_dump.txt * Safely backup the kdb5_dump.txt.
Restore
* Restore the kerberos database execute below command kdb5_util load kdb5_dump.txt * Restore the /etc/krb5.conf from backup * Restore /var/kerberos/krb5kdc/kdc.conf from backup * Restore /var/kerberos/krb5kdc/kadm5.acl from backup * Run below command to store master principal in stash file ( kdc admin password is required ) kdb5_util stash * Start KDC server using below command service krb5kdc start
2,428 Views