705Maintenance - amagerard/Freeradius GitHub Wiki

RedHat/FreeRadius

RedHat10/SambaAd

01- Synoptic 02- SambaAD 03- PdnsRecursor 04- Settings
05- Maintenance 06- Selinux 07- GnomeShell
FreeRadius DaloRadius OpenLdap

5. Maintenance

5.1 Update.

https://samba.tranquil.it/doc/en/samba_config_server/redhat8/server_upgrade_samba_redhat.html
Download last version.
Example Redhat 10
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-TISSAMBA-10 https://samba.tranquil.it/RPM-GPG-KEY-TISSAMBA-10
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-TISSAMBA-10
Make a backup before update.

samba -V  
systemctl stop samba  
  
samba-tool dbcheck  
If you have errors.  
samba-tool dbcheck --cross-ncs --fix --yes  
  
samba-tool ntacl sysvolcheck  
If you have errors.  
samba-tool ntacl sysvolreset  
  
samba-tool dbcheck  
samba-tool ntacl sysvolcheck  

rsync -avAX /var/lib/samba /root/backup_samba_20250321/

systemctl start samba

dnf update

Re-check Samba-AD

systemctl start samba  
samba -V  
systemctl stop samba  
  
samba-tool dbcheck  
If you have errors.  
samba-tool dbcheck --cross-ncs --fix --yes  
  
samba-tool ntacl sysvolcheck  
If you have errors.  
samba-tool ntacl sysvolreset  
  
samba-tool dbcheck  
samba-tool ntacl sysvolcheck  
systemctl start samba  

5.2 Backup and restore with tar.

Backup.
cd /var/lib
tar --acls -cvzf /home/teacher/my-samba-backup.tar samba
Restore.
cd /var/lib
mv samba samba_ori
tar --acls -xvzf /home/teacher/my-samba-backup.tar

The tar --acls command keeps the ACLS if the restore is on the server
but does not keep the ACLS if the restore is on another server.

The tar --acls command keeps the ACLS for another server if the server is stopped .
You must start the server from a Live CD Almalinux.
Then mount the server partitions and use the tar --acls command for backups.