Comments on How to Upgrade Debian 8 (Jessie) to 9 (Stretch) safely

This tutorial shows you how to upgrade your Debian system from Debian Jessie (8) to Debian Stretch (9) in a few simple steps. It also shows useful commands to test if the server is upgradable and how to backup data before you perform the update.

32 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: diablo666

Works with ispconfig installed right?

Something to do for that?

By: Ben

Some optional cleanup steps, before editing sources...

apt-get --purge remove `deborphan`  (purge some unneeded packages - repeat until nothing is removed )

apt-get --purge autoremove  ( purge auto-installed packages)

aptitude search "~o"  (to find obsolete packages, which might be worth removing)

By: Tomas

Will this upgrade the kernel as well? It looks like it does not.

By: till

Yes, a dist upgrade will upgrade the Linux Kernel,

By: Grant

I would add one step. After doing the update, but before the upgrade do "apt-get dist-upgrade -d"  Having everything downloaded and local before you start can be a significant benefit, not dealing with network issues during an upgrade.

By: peter3332

Will this work over 2 versions from debian 7 to 9  or i shoud do 7 -> 8 -> 9 ?

By: till

I won't skip a release in the upgrade process. But it might work, just haven't tested that.

By: SamTzu

I would remove fail2ban before upgrading. It usually brakes during upgrade.

By: pattone

What is better.... "apt-get update && apt-get upgrade"  or "apt update && apt upgrade" ??

By: toto1988

Thank you! :)

By: simon

work ok 

Thank

By: Z3r0h0ur

Postfix is not working after upgrade, as it's upgrading from 2.x to 3.x . Couldn't find a fix for that yet (

By: c3n

The postfix issue is created because of spamd and spamassassin demon. Try to stop those services, then restart postfix service -- everything should be fine. If not, check hostname, hosts, mailname for errors. On most of my servers i had to remove spamd and spamassassin and everything is working fine.

By: Jos

All went well with the above help but....IP address doesn't work anymore, both sites now offline! ISConfig gives empty screen. Please help.Jos..

By: till

Run an ISPConfig update and choose yes when the updater asks you to reconfigure services.

By: Spacestar54

Still can't reply. Is this the update line: ispconfig_update.sh Doesn't help. Jos...

By: Jos

Can't reply. But update did not solved the problem.

By: till

I have no Idea why you write into each reply while sending the reply. But back to your topic, if you need further help, then please make a thread in the ispconfig forum here at howtoforge with the exact errors that you get in the log files of the failed services.

By: David

I did the upgrade as recommanded.

After an initial panic (maria-db wouldn't work), I rebooted the server it came back fine.

I had to uninstall and reinstall fail2ban to make it work (with new config).

I only found one minor problem:In "Server Load" the "Users Online" stays to 0 even when I'm connected with SSH

By: Francis Rodrigues

Por que usar "main contrib non-free" e não o default "main"?

By: HitoDev

Hello,

I followed this guide.

During Debian 8 upgrade, at the end, I got:

*****************************

Preparing to unpack .../mariadb-client_10.1.38-0+deb9u1_all.deb ...Unpacking mariadb-client (10.1.38-0+deb9u1) over (10.0.30-0+deb8u2) ...Preparing to unpack .../mariadb-server_10.1.38-0+deb9u1_all.deb ...Unpacking mariadb-server (10.1.38-0+deb9u1) over (10.0.30-0+deb8u2) ...(Reading database ... 64480 files and directories currently installed.)Removing mariadb-server-10.0 (10.0.30-0+deb8u2) ...6623There is a MySQL server running, but we failed in our attempts to stop it.Stop it yourself and try again!dpkg: error processing package mariadb-server-10.0 (--remove): subprocess installed pre-removal script returned error exit status 1dpkg: mariadb-client-10.0: dependency problems, but removing anyway as you requested: mariadb-server-10.0 depends on mariadb-client-10.0 (>= 10.0.30-0+deb8u2); however:  Package mariadb-client-10.0 is to be removed. roundcube-mysql depends on mariadb-client | mysql-client | virtual-mysql-client; however:  Package mariadb-client is not configured yet.  Package mysql-client is not installed.  Package virtual-mysql-client is not installed.  Package mariadb-client-10.0 which provides virtual-mysql-client is to be removed.Removing mariadb-client-10.0 (10.0.30-0+deb8u2) ...Removing mariadb-client-core-10.0 (10.0.30-0+deb8u2) ...Processing triggers for man-db (2.7.6.1-2) ...Errors were encountered while processing: mariadb-server-10.0E: Sub-process /usr/bin/dpkg returned an error code (1)You have new mail in /var/mail/root

*****************************

This is a Debian 8 / ispConfig server.

what am I supposed to do?

Nees I stop 'manualy' mysql and run again ?

apt-get dist-upgrade

 

 

By: AMPSYS

Didn't see a response to diablo666's question below:  Is this safe with ISPCONFIG installed?

 

I have a multiserver setup (Web, NS1, NS2, and SQL) that are all running 8 @ 3.1.13p1 that I'd like to upgrade to 9.

 

Thanks.

By: till

Dist upgrades are never 100% save as you replace basically all software on your servers, no matter which instructions you use, so always do a backup first. There is always something that can go wrong. Thus said, I've updated several ISPConfig servers using this procedure successfully. First follow this guide, and then do an ispconfig update with reconfigure services = yes on the system to adapt the config files.

By: AMPSYS

Tried this and it broke DNS on my ISPCONFIG 3.1.13p1 multi-server setup.  Fortunately, I took a snapshot prior and was able to revert back rather quickly.

By: Ammad

Is it possible, upgrade from Debian 8 directly to Debian 10? How safe is it? 

By: Han

I'm trying to follow your guide, but after doing apt-get upgrade i'm getting :  0 upgraded, 0 newly installed, 0 to remove and 395 not upgraded.

should i just start with the dist-upgrade or should i break off the upgrade entirely ?

By: ben

Thank you

You saved my day and learnt to me new thing

By: Geoff

Many thanks for the guidance.  Worked first time on a webmin/virtualmin installation.

What about Debian 9 to Debian 10?

By: Baba

Postfix was not working after update to strech. To fix this issue You have to change: daemon_directory = /usr/lib/postfix to daemon_directory = /usr/lib/postfix/sbin This fixed my issues after update.

By: Mike

I updated Debian 8 with ISPConfig 3.1 to Debian 9 according to this guide. The update was successful, no errors, but PHP 5.6 remained installed on the server. The PHP 7.0 distribution did not install completely, so I installed the missing packages from The Perfect Server - Debian 9 (Stretch) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1 here on howtoforge. I updated ISPConfig 3.1 to version 3.2. In ISPConfig in Server Config on the Web tab on the PHP Settings tab, the values for PHP 5 remain:

Apache php.ini path: - /etc/php5/apache2/php.iniCGI php.ini path: - /etc/php5/cgi/php.iniPHP-FPM init script: - php5-fpmPHP-FPM php.ini path: - /etc/php5/fpm/php.iniPHP-FPM pool directory: - /etc/php5/fpm/pool.dPHP-FPM start port: - 9010PHP-FPM socket directory: - /var/lib/php5-fpmPHP open_basedir: - [website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom

In the FastCGI tab, the following remain:

FastCGI starter path: - /var/www/php-fcgi-scripts/[system_user]/FastCGI starter script: - .php-fcgi-starterFastCGI Alias: - /php/FastCGI php.ini Path: - /etc/php5/cgi/FastCGI Children: - 8FastCGI max. Requests: - 5000FastCGI Bin: - /usr/bin/php-cgi

Apache is still running with PHP 5.6 and even the PHP 7: 0 mod module is not allowed, only PHP 5. I need to switch to the PHP 7.0 distribution and get rid of PHP 5.6 completely. Can someone please send me the correct values and paths for the PHP 7.0 distribution in Debian Stretch? Thank you very much for your help.

 

By: blablabla

Hello and how i can fix if this return a package hold? dpkg --get-selections | grep hold return owncloud-files Ive try apt install owncloud-files Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait owncloud-files est déjà la plus récente version disponible. owncloud-files passé en « installé manuellement ». Thanks for any help I'l need to upgrade for letsencrypt :x

By: Azfar

how to perform upgrade in 2022? getting jey errors.

 

W: There is no public key available for the following key IDs:0E98404D386FA1D9W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch-updates/contrib/binary-amd64/Packages  404  Not Found [IP: 199.232.26.132 80]W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found [IP: 199.232.26.132 80]W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch/non-free/binary-amd64/Packages  404  Not Found [IP: 199.232.26.132 80]