Asterisk Upgrade from cli

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

viewtopic.php?f=1&t=80592&p=166057&hilit=upgrade&sid=e1f192fd7e8ea72966ace6293ac4e8dd#p166057

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