Kerberos服务数据备份

使用/usr/sbin/kdb5_util dump命令可以dump整个Kerberos数据库

在Admin节点执行

/usr/sbin/kdb5_util dump /etc/krb5kdc/slave_datatrans

定期执行备份的操作即可

#!/bin/bash

date=`date +%F`
backup_dir="/home/hadoop/backup/kerberos/$date"
mkdir $backup_dir
sudo cp -r /etc/krb5kdc/slave_datatrans $backup_dir
sudo cp -r /etc/krb5kdc/principal $backup_dir