Web lists-archives.com

Re: [Samba] Samba 4.8.2




Hi Stefan, 

Good question here. 
I'll explain, i'll reply to the list also, this info can also be handy for others .

I always follow this approach for my DC upgrades. 
Start with the DC with FSMO roles then the others. 

1) backup. 
	I use virtual machines for the DC's, so i down all my DC's and take an offline snapshot. 
	If you dont have virtual machines, i suggest the following. 
	Run :  sudo smbd -b | egrep "/var|etc"

	Stop the DC with FSMO and backup every folder you see in the output. 
	I use the follow on an other location. 

###############################################
#!/bin/bash 

systemctl stop samba-ad-dc bind9
# Samba
for x in $(sudo smbd -b | egrep "/var|etc" | awk '{ print $NF }')
do
    # Filebackup
    if [ -f $x ]
    then
        cp $x{,.backup-$(date +%F)}
    elif [ -d $x ]
    # Folder
    then
        cp -r $x{,.backup-$(date +%F)}
    fi
done


# Bind
if [ -d /etc/bind ] || [ -d /etc/bind9 ]
then
    # Folder
    if [ -d /etc/bind ]
    then
        cp -r /etc/bind{,.backup-$(date +%F)}
    else
        cp -r /etc/bind9{,.backup-$(date +%F)}
    fi
Fi
systemctl start samba-ad-dc bind9
# now wait 5 sec, and run samba DB tool check. 
sleep 5
samba-tool dbcheck
samba-tool dbcheck --cross-nc
# error try to fix them before the upgrade or take you chances and to it after. 
# Now, you choose.
# a) before, the + is, a fixed database if all ok, the - is, if there is an error.
#    you can do more harm. 
# b) after, the + is, you have more chance that the newer samba has better ways to fix things.
#    but the - is, you hcan have more problem, if the db had problem before the upgrade.
# so think wisely if you detect error, and if you dont know, mail the list. 
###############################################


2 GET ant DONT install the needed package to upgrade.
In debian : apt-get update && apt-get upgrade -dy  ( download and end it ) 
Then upgrade: apt-get upgrade
If the are package changes, like new added packages then run : apt-get dist-upgrade 
Or run a manual apt-get install packagenames... 

3) The upgrade itself.  
If you run a basic config, then you problemy wont have any problem.
If you have any problem while upgrading then you didnt read the changelogs before the upgrade ;-)... 

Now do the following, look at your screen, you should be able to seen which parameter is given the problem.

If you dont see it run : samba-tool testparm 

Still no go, then go here : http://downloads.van-belle.nl/samba4/Upgrade-info.txt and 
go through this file. I contains almost all info you need to know to find your problem. 
Including the links to wiki and samba historical changelogs.
Now look at the smb.conf changes, and review you smb.conf. 
If your uable to find it, mail the list, you did your best..  ;-) 

4) After the upgrade.
I cleanup my samba logs, and reboot the server and i review my logs.
Samba logs, syslog, daemonlog.
Even while this should not be needed, i do this so i can make a good check of my logs 
And its also check if you server boots correctly. 


I hope this helps someone, more questions, mail the list.

Greetz, 

Louis
Ps. Its no problem to ask question to me personaly, but i preffer the list, so everbody learns from it.


> -----Oorspronkelijk bericht-----
> Van: Stefan G. Weichinger [mailto:lists@xxxxxxxx] 
> Verzonden: vrijdag 18 mei 2018 10:04
> Aan: L.P.H. van Belle
> Onderwerp: Samba 4.8.2
> 
> 
> hi, Louis,
> 
> I just read through your email to the samba-ml regarding the 
> 4.8.2 upgrade
> 
> You write "your upgrade will probably end in an error" and something
> around "correct your smb.conf", but I don't get what changes 
> to make ...
> 
> 2nd: it should be a defensive way to approach this to upgrade one of 2
> DCs first, right?
> 
> thanks, regards, Stefan
> 
> 
> 
> 


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba