# service samba-ad-dc stop
# mkdir sambabackup-20220213-offline
# samba-tool domain backup offline --targetdir=/root/sambabackup-20220213-offline
# mv /var/lib/samba /var/lib/samba.bakup
# samba-tool domain backup restore --newservername=DC01 --backup-file=/root/sambabackup-20220213-offline/samba-backup-2022-02-13T19-38-42.702607.tar.bz2 --targetdir=/var/lib/samba
# vim /etc/samba/smb.conf # set new "netbios name"
# service samba-ad-dc start
# samba_dnsupdate
TL;DR: https://wiki.samba.org/index.php/Back_up_and_Restoring_a_Samba_AD_DC
If you use bind-dlz this needs to be re-setup
# samba_upgradedns --dns-backend=BIND9_DLZ
# service named restart
TL;DR: https://wiki.samba.org/index.php/Dns_tkey_negotiategss:_TKEY_is_unacceptable
# dig +noall +short @localhost _ldap._tcp.$(hostname -d) SRV
# dig +noall +short @localhost _kerberos._udp.$(hostname -d) SRV