Comments on How to upgrade Debian Wheezy to Jessie safely
How to upgrade Debian Wheezy (7) to Debian Jessie (8). This tutorial explains how to upgrade your Debian system from Wheezy to Jessie in a few simple steps.
50 Comment(s)
Comments
Thank you very much, this is clear and efficient.
Thanks. It is nice, but how can I restore mysql database ?
Regards.
zoltan
Mysql gets just updated, all databases and users stay intact. so no need to restore them.
Yes, if the upgrade procedure works well.. :-)
but the question.. how can I restore the dumped mysql database..
(mysqldump --defaults-file=/etc/mysql/debian.cnf -cCeQ --hex-blob --quote-names --routines --events --triggers --all-databases -r all_databases.sql )
sorry, my english is very poor
Regards.
zoltan
Mysql databases get imported with the MySQL command.
mysqldump --defaults-file=/etc/mysql/debian < all_databases.sql
The update does not remove any databases so you don't have to import them, the backup has been made to reinstall the server in case the update failed.
I used this procedure and was able to upgrade, Thanks for writting it.
My only suggestion to improve this is to start the computer with prompt only, without xwindows & desktop environment.
This way in the middle of process do not need to stop and start a new domain.
What about multicluster setup and mysql(5.5) replications.
Are they staying intact too?
Start with the master and after that upgrade the slaves?
Dunno if you're monitoring this post much anymore, but I was running through these steps today trying to upgrade from 7 to 8 at my vps and got to this step:
apt-get dist-upgrade
when the upgrade process removed upstart and replaced it with sysvinit, then promptly failed. I wonder, since I have wheezy fully updated, if I can skip the upgrade step and go straight to modifying the sources.list to do the upgrade to 8?
You can try to skip this step and update from a not up to date wheezy system to Jessie, but I haven't tested that. But I wonder why you have upstart on Debian wheezy, Debian wheezy uses sysvinit and not upstart by default.
Thanks
After the upgrade packages where left back. To make the update complete i needed to do a apt-get dist-upgrade
I end up formatting my cloud and install jessie from scratch because of those apache error. Its a waste of time you should put a warning on that before upgrading to jessie
I upgraded quite a few servers of our customers from wheezy to Jessie, the updates were flawlessly. When your server is broken before or you don't have a clean setup, then you might encounter issues. So when your Wheezy system is broken or not cleanly installed, fix it before you update.
Hello Pixelcone,
I have upgraded using these instructions and found that they worked in fact I upgraded all 32 of my Wheezy Kernels to Jessie. Then I wondered about your situation so I broke my Apache server (did a remove and a partial install by stopping the installation with a system crash) and tried to load from Wheezy to Jessie on the system with the broken server. This was what I found: The conversion from Wheezy to Jessie failed catastrophically, resulting in having to load Jessie on a by reloading Wheezy from noob and the upgrading and updating it, then upgrading to Jessie. The instructions are for a clean Wheezy system. Therefore, the information provided is sufficient, but there should be a warning stating that this has been tested and a clean Wheezy system is mandatory to upgrade to a Jessie system.
Debian includes instructions with the release notes to every stable release. For this particular case see this link https://www.debian.org/releases/jessie/i386/release-notes/ch-upgrading.en.html .
This guide has incomplete backup instructions, for which I'm now dealing with the fallout of on a system I'm trying to rescue. For anyone else considering this guide, consider at least this part of the official instructions:
"
4.1.1. Back up any data or configuration informationBefore upgrading your system, it is strongly recommended that you make a full backup, or at least back up any data or configuration information you can't afford to lose. The upgrade tools and process are quite reliable, but a hardware failure in the middle of an upgrade could result in a severely damaged system.
The main things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg --get-selections "*" (the quotes are important). If you use aptitude to manage packages on your system, you will also want to back up/var/lib/aptitude/pkgstates.
The upgrade process itself does not modify anything in the /home directory. However, some applications (e.g. parts of the Mozilla suite, and the GNOME and KDE desktop environments) are known to overwrite existing user settings with new defaults when a new version of the application is first started by a user. As a precaution, you may want to make a backup of the hidden files and directories (“dotfiles”) in users' home directories. This backup may help to restore or recreate the old settings. You may also want to inform users about this.
Any package installation operation must be run with superuser privileges, so either log in as root or use su or sudo to gain the necessary access rights.
The upgrade has a few preconditions; you should check them before actually executing the upgrade."
Also, be aware this guide may fail if you have any packages on hold or use APT pinning.
all done. Thanks for this Tutorial. I made an snapshot of the system before, then i dont need to make manual backups... all works fine.
Worked for me as of 2016 May 8th.
Only issues after upgrade where with the usual Nvidia driver B.S. which I had previoulsy with the original Wheezy install.
Fixed those by installing the nvidia driver deb packages as per debian.org
Thank you for the guide it was most helpful.
thank you!
I had problems with dependencies that I couldn´t resolve, apache2 failed config etc.So I made the backups as discribed above. How can I use them to restore the system? I had to re-install the whole server. Would it destruct the system again, when I just pasted the etc folder? Thanks, and greetz.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Any help ?
thanks for sharing !!! works excellent !!!
I didn't realize this but if you've upgraded your mysql and the update procedure did not use mysql_upgrade then it will break the root@localhost's permission to access certain table. I manually tried to fix this but made it worse. Since my server was used for VPN only, I just wiped out the php5/mysql and reinstalled it and that took care of the permission issue and was able to finish the update. I strongly encourage you to backup your mysql prior to running your update.
i had key errors after first trying apt-get update (after new Jessie sources added) and found this solution worked after simple google search (i had to add multiple new keys before running apt-get).
http://ccm.net/faq/809-debian-apt-get-no-pubkey-gpg-error
Nice one worked for me.
Worked a charm
I appreciate the guide. I haven't attempted to upgrade a Linux distro in years and in the past it never seemed to work smoothly. My testing Web server was stuck on wheezy and I wanted to upgrade, but didn't want to go through the trouble of copying all of the data over the network and back again. It's not mission critical data; most of the data I care about is copied or tracked with version control, but some of it I would have to get over and start from scratch. In any case, I was nervous about starting an upgrade and having to go through the pains of reinstalling the system if it failed. It was freenode's notice of irssi being insecure today that prompted me to try to upgrade the distro itself. I could have gotten the source, but there was likely other software out of date that would benefit from a whole distribution upgrade. I'm sure wheezy is somewhat safe still since I think it's still supported by the security team, but it feels good to have an up-to-date system. I followed the guide and rebooted and aside from postgresql giving me some balls (which I wasn't using really anyway) I had no trouble. I ended up uninstalling the old postresql packages and installing 9.4 again afterward. Seemed to work fine. I'll figure that out if I ever get around to using it.
Sorry, but I would put it a bit more harsh than DebianUser, don't use this so called howto. Just go to https://www.debian.org/releases/jessie/i386/release-notes/ch-upgrading.en.html and use the source.
Did you even try the tutorial or are you just a trolling here? The above tutorial works flawlessly, I updated 5 servers by using it without an issue.
I did it with a Raspberry Pi (raspbian), and all went well.
Just performed the upgrade using these step by step guides. Worked like a charm - took some time to upgrade all the Plesk packages too though.
Again, after another sucessful upgrade. Thank you very much, this is clear and efficient.
Hi, another successfull upgrade.
It is worth mentioning that people with SSD's should probably trim their partitions BEFORE and AFTER upgrading or they may run out of space.
In my case:
sudo fstrim -v /sudo fstrim -v /home
I have removed all PHP stuff drom dotweb and their repository. Then installed the default php packages.
Also removed all repos that where for Wheezy only (all except webmin in my case).
MariaDB was installed from their repo (which was removed before jessie upgrade). I was able to upgrade it with a simple apt-get install mariadb-server (after Jessie upgrade).
Configuration file in /etc/apache2/sites-enabled/ must have a ".conf" extension, otherwise, apache won't start.
worked smoothly. thanks.
I want to update my VPS from Putty, Debian to Jessie, How ?
Thanks, this worked perfectly, exacly what I needed.
Excellent tutorial, very easy to follow and works like a charm.
Thanks so much
I would like to add that after successfully upgrading to Jessie, do a update-->upgrade-->dist-upgrade sequence again.
Systems updated to wheezy safely but kernel is still on 3.2.0-4-amd64 instaed of 3.16.0-4-amd64!
Did you reboot after upgrade? If not, reboot now. If yes, check the grub boot loader config, maybe you defined there a specific kernel to be booted instead of the latest one.
I am on EC2 HVM so had ot replace extlinux with grub in order to boot from newer kernels.
Pretty handy for those of us who don't spend much time administering or upgrading linux. However; since I applied it to a laptop, a previously pretty stable system on wheezy has started locking its console shortly after login & while I'm using it and then blanking the screen!
I am using a Dockstar with a flash drive to run debian Wheezy. After I followed this instruction and upgrade to Jessie and reboot, I could not ssh into it anymore. I checked the sshd_configure file which seems to be ok. Before reboot after upgrade, everything seems working fine. It seems to me that one possible reason is that sshd did not run after reboot. Please advise if there is any hint to fix this problem. I have to use another mechine to edit the configuration files when necessary since there is no way for this setup to connect to a monitor/keyboard. Thanks a lot.
Hey there, is the upgrade from jessie to stretch as easy as wheezy to jessie? After dist-upgrade do I need to rerun ispconfig updater or something like that (may some change config files...)?
Probably yes, I've never had any real issues with a Debian upgrade. But I haven't tested it yet.
Sorry for the new comment (not reply). Seems there's a technical bug on comments area.
About the upgrade from jessie to stretch: If a recreation of the config files is needed, how can I reconfigure my services? Is there a ispconfig script which can be run (like the updater script)? Also do I need to change some settings after upgrade, e.g. php-pathes in admin are...?
Thanks!
Just run the ISPConfig update script and choose to reconfigure services.
I've used this wonderful guide for the wheezy to jessie upgrade. That's saying qute a bit as I absoultly dread OS upgrades on the server.
Now considering upgrading from jessie to stretch. However was unable to locate a similar guide.
Are the steps similar enough so that I need only edit in the new stretch repository locations?
Thanks. Clear and easy.
Running jessie, thanks to your clear instructions.
As usual, on Linux nothing works...
apt-get update dies with Some index files failed to download. They have been ignored, or old ones used instead.