305Maintenance - amagerard/FreeRadius GitHub Wiki
RedHat/SambaAd
01- Synoptic | 02- SambaAD | 03- PdnsRecursor |
---|---|---|
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 9
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-TISSAMBA-9 https://samba.tranquil.it/RPM-GPG-KEY-TISSAMBA-9
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-TISSAMBA-9
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
Only if you have a secondary server.
Updating from 4.19 to 4.21 does not work with tis-sysvolsync (may 26, 2024).
You will not be able to synchronize Sysvol between the 2 controllers.
I think it is possible with modifications but I will not give you the procedure.
That will be for later.
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.