Asterisk Upgrade from cli

Can someon explein me step by step how can I upgrade my asterisk server from asterisk to asterisk without losing configuratio, do I need to upgrade dagdi to.


to be sure you save your configuration file.

usually most important are sip.conf chan_dahdi.conf and extension.conf or simply save the asterisk etc directory
for dahdi save the /etc/dahdi/system.conf

i usually do make clean and then i procede with the new install (libpri dahdi asterisk) from source. after i replace the brand new created conf file with my previous saved and i restart the daemon at the end. this work for me also upgrading 1.6 to 1.8