6

I have a couple of blogs running on an Ubuntu 9.04 machine and I'd like to upgrade it. Is it safe to do so?

Note, I also have a few daemons that were manually compiled like MySQL, Nginx, PHP, etc.

6 Answers 6

9

The only way to be really sure is to test. Create a test environment that mimics your production environment as closely as possible and then carry out the upgrades, monitor what happens and make a decision based on that.

6

dist-upgrade is extremely safe. I have dist-upgraded hundreds of production machines. I have systems running squeeze that were originally installed on sarge. I've executed apt-get dist-upgrade literally thousands upon thousands of times on production machines.

That's not to say that it's guaranteed safe. I have encountered problems, but I can count those on one hand.

That being said, you should always test your intended new deployment in a non-production environment first. Including testing the upgrade process.

4
  • 2
    Have a +1 for being direct. But it's worth reiterating that you can only consider it "extremely safe" if you're doing everything in a Ubuntu-aware way - which compiling from source normally isn't.
    – Coops
    Aug 13, 2011 at 21:04
  • Was the "Windows users..." bit intended to be facetious or not?
    – jscott
    Aug 13, 2011 at 23:43
  • No, I'm completely serious. It's absolutely absurd to have to reformat a computer every six months because the vendor creates such crappy products. It's even worse that you can't upgrade a server and have to install completely fresh on new hardware. The abysmal design of Windows has grown some extremely bad habits among those who should know better.
    – bahamat
    Aug 14, 2011 at 2:40
  • I dropped back by this thread and would also like to add that if you're compiling from source you should build a package and distribute the package. Never install directly from source.
    – bahamat
    Mar 26, 2014 at 17:07
3

I'd disagree with pepoluan's comment that it is never safe.

It can be safe, and Ubuntu is far better at handling release upgrades than most other distributions I've handled. (You mention hand compiled software, that is where your trouble may lie).

However in order to be confident in an answer you have to make a judgement call on what risk your willing to take -- and then test it. Never say "never" :-)

2
  • Someone care to explain the downvote? It's good manners to leave a comment indicating why.
    – Coops
    Aug 13, 2011 at 20:35
  • Down vote was me. Sorry, I misread "disagree" as "agree". You are actually absolutely right. My vote's locked unless you edit it, but if you do I'll change to +1.
    – bahamat
    Aug 13, 2011 at 21:14
2

If you want to update your distribution running dist-upgrade will be the way to go. It will only update packages installed via apt-get or dpkg. It would not touch your manually compiled stuff. Also it would give you the summary before doing the job, so you could see it yourself.

If you want to upgrade the Ubuntu version to newer one then you would have to run do-release-upgrade. I feel in your setup doing so would be risky. There are two ways to approach this task:

  1. do complete test as @lain says;
  2. reinstall your manually compiled packages via the package manager. Fix and verify your configuration. Then run do-release-upgrade or use the alternative CD upgrade option (personally I would to the latter).
1

Recommend a backup tool timeshift. If you are not sure about what you are going to do, you could backup your system first. timeshift allow you to back up your system hourly automatically.

$ sudo apt install timeshift
$ sudo timeshift --create --tags H

By the way, don't forget to modify the config file of timeshift.

$ sudo nano /etc/timeshift/timeshift.json

Otherwise, the backup won't be automatically.

1
  • this was no relationship with he question. software recommendations are off-topic. and I believe he knows that he has to do the backup before due its best practice.
    – djdomi
    Jul 25, 2021 at 12:25
-2

I would not consider that a safe thing to do.

Even with testing...how much testing are you going to do?

I would migrate to a new server rather than trying to upgrade the existing. Using apt-get should make this fairly easy, assuming the blog platform doesn't have a ton of unusual dependencies.

PS. I always avoid installing software that isn't packaged when possible. And for me, in my experience, it's always been possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .