Take a complete backup of your debian etch server
Procedure to follow
First you need to take a backup of your sources.list file using the following command
#cp /etc/apt/sources.list /etc/apt/sources.list.backup
Now edit the /etc/apt/sources.list file
Now you need to replace “etch” with “lenny“.
deb http://ftp.gb.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.gb.debian.org/debian/ etch main contrib non-free
deb http://security.debian.org/ etch/updates main contrib non-free
after replacing etch with lenny the file will look like this
deb http://ftp.gb.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.gb.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
The above example is for a system using the main UK mirrors; your file might use a different local one
WARNING: if for some reason your apt sources doesn’t use etch, but “stable” then your apt commands will start to use lenny the moment it is released. This can result in wrongfully performing the upgrade while you don’t want to do this or even upgrade by mistake.We would always recommend people to use the release name (like etch, lenny) instead of generic names (like stable, testing); this way you will have the control on when you want to upgrade.
After changing apt sources we need to update source list using the following command
Once this is done we will want to upgrade first the core apt packages
#aptitude install apt dpkg aptitude
and finally perform the full upgrade
Note:-dist-upgrade was renamed to full-upgrade in lenny’s aptitude; or you can use:apt-get dist-upgrade
This will take a while depending on what packages you have installed (that will need to be upgraded) and on your internet connection speed. After this is done you will have to reboot your system in order to activate the kernel upgrade to the lenny 2.6.26 kernel. Also you will want to check and see that all the applications you are using are still working as expected after the upgrade.
Some of the source from here