Upgrade from v0.26c to the latest

As the title suggests, I have to update the server to the latest version available.

However from the guide (Mail-in-a-Box version v0.40 and moving to Ubuntu 18.04) there is this indication:

“* Upgrade your existing Ubuntu 14.04 Mail-in-a-Box to version v0.30 first. This is mandatory and relates to limitations in the PHP versions supported by ownCloud/Nextcloud database migrations. This step is no longer possible because PHP maintainers have discontinued support for PHP packages for Ubuntu 14.04. If you have not used any Nextcloud features — contacts, calendar, shared files, etc. — it is possible to skip this step. If you have used any Nextcloud features, you will not be able to smoothly upgrade using these instructions. Please open a new topic on this forum for help.

I find myself in exactly this situation.

Where there is extensive use of all Nexcloud functions (cloud storage, Caldav, Carddav) with many domains …

Is there a way, even with manual steps, to go about solving PHP limitations?

Oh my … @ufficiotecnico

Did you at least run updates on Ubuntu 14.04 itself before it went EoL?

This is the list of upgradable packages

root@box:/home/ubuntu# apt list --upgradable
Listing… Done
apt/trusty-updates 1.0.1ubuntu2.24 amd64 [upgradable from: 1.0.1ubuntu2.19]
apt-transport-https/trusty-updates 1.0.1ubuntu2.24 amd64 [upgradable from: 1.0.1ubuntu2.19]
apt-utils/trusty-updates 1.0.1ubuntu2.24 amd64 [upgradable from: 1.0.1ubuntu2.19]
base-files/trusty-updates 7.2ubuntu5.6 amd64 [upgradable from: 7.2ubuntu5.5]
ca-certificates/trusty-updates 20170717~14.04.2 all [upgradable from: 20170717~14.04.1]
cloud-init/trusty-updates 0.7.5-0ubuntu1.23 all [upgradable from: 0.7.5-0ubuntu1.22]
grub-common/trusty-updates 2.02~beta2-9ubuntu1.17 amd64 [upgradable from: 2.02~beta2-9ubuntu1.14]
grub-legacy-ec2/trusty-updates 0.7.5-0ubuntu1.23 all [upgradable from: 0.7.5-0ubuntu1.22]
grub-pc/trusty-updates 2.02~beta2-9ubuntu1.17 amd64 [upgradable from: 2.02~beta2-9ubuntu1.14]
grub-pc-bin/trusty-updates 2.02~beta2-9ubuntu1.17 amd64 [upgradable from: 2.02~beta2-9ubuntu1.14]
grub2-common/trusty-updates 2.02~beta2-9ubuntu1.17 amd64 [upgradable from: 2.02~beta2-9ubuntu1.14]
ifupdown/trusty-updates 0.7.47.2ubuntu4.5 amd64 [upgradable from: 0.7.47.2ubuntu4.4]
initramfs-tools/trusty-updates 0.103ubuntu4.11 all [upgradable from: 0.103ubuntu4.10]
initramfs-tools-bin/trusty-updates 0.103ubuntu4.11 amd64 [upgradable from: 0.103ubuntu4.10]
landscape-client/trusty-updates 14.12-0ubuntu6.14.04.4 amd64 [upgradable from: 14.12-0ubuntu6.14.04.2]
landscape-common/trusty-updates 14.12-0ubuntu6.14.04.4 amd64 [upgradable from: 14.12-0ubuntu6.14.04.2]
libapt-inst1.5/trusty-updates 1.0.1ubuntu2.24 amd64 [upgradable from: 1.0.1ubuntu2.19]
libapt-pkg4.12/trusty-updates 1.0.1ubuntu2.24 amd64 [upgradable from: 1.0.1ubuntu2.19]
libldap-2.4-2/trusty-updates 2.4.31-1+nmu2ubuntu8.5 amd64 [upgradable from: 2.4.31-1+nmu2ubuntu8.4]
libldap2-dev/trusty-updates 2.4.31-1+nmu2ubuntu8.5 amd64 [upgradable from: 2.4.31-1+nmu2ubuntu8.4]
libplymouth2/trusty-updates 0.8.8-0ubuntu17.2 amd64 [upgradable from: 0.8.8-0ubuntu17.1]
mountall/trusty-updates 2.53ubuntu1 amd64 [upgradable from: 2.53]
php5/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 all [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-cli/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-common/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-curl/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-dev/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-fpm/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-gd/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-intl/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-pspell/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-readline/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-sqlite/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
php5-xsl/trusty-updates,trusty-security 5.5.9+dfsg-1ubuntu4.29 amd64 [upgradable from: 5.5.9+dfsg-1ubuntu4.24]
plymouth/trusty-updates 0.8.8-0ubuntu17.2 amd64 [upgradable from: 0.8.8-0ubuntu17.1]
plymouth-theme-ubuntu-text/trusty-updates 0.8.8-0ubuntu17.2 amd64 [upgradable from: 0.8.8-0ubuntu17.1]
pollinate/trusty-updates 4.33-0ubuntu1~14.04.1 all [upgradable from: 4.25-0ubuntu1~14.04.1]
python-apt/trusty-updates 0.9.3.5ubuntu3 amd64 [upgradable from: 0.9.3.5ubuntu2]
python-apt-common/trusty-updates 0.9.3.5ubuntu3 all [upgradable from: 0.9.3.5ubuntu2]
python3-apt/trusty-updates 0.9.3.5ubuntu3 amd64 [upgradable from: 0.9.3.5ubuntu2]
python3-distupgrade/trusty-updates 1:0.220.11 all [upgradable from: 1:0.220.10]
spamassassin/trusty-updates,trusty-security 3.4.2-0ubuntu0.14.04.1 all [upgradable from: 3.4.0-1ubuntu2.1]
ubuntu-minimal/trusty-updates 1.325.1 amd64 [upgradable from: 1.325]
ubuntu-release-upgrader-core/trusty-updates 1:0.220.11 all [upgradable from: 1:0.220.10]
ubuntu-standard/trusty-updates 1.325.1 amd64 [upgradable from: 1.325]
update-notifier-common/trusty-updates 0.154.1ubuntu8 all [upgradable from: 0.154.1ubuntu3]
zlib1g/trusty-updates 1:1.2.8.dfsg-1ubuntu1.1 amd64 [upgradable from: 1:1.2.8.dfsg-1ubuntu1]
zlib1g-dev/trusty-updates 1:1.2.8.dfsg-1ubuntu1.1 amd64 [upgradable from: 1:1.2.8.dfsg-1ubuntu1]

If you did not regularly do upgrades, you will need to change the PPA’s to the archive PPA’s that Ubuntu manages. This MAY help…

From there you are going to have to install each old version which has a NC upgrade one at a time, after you move to Ubuntu 18. There is a thread on this buried somewhere. All in all this is going to take you SEVERAL hours to accomplish.

If you didn’t have NC data, this would be easy using an alternative method. NC is what is going to make this difficult.

I have tried to upgrade a single package; because of the dependencies, all the others have arrived …

I aborted the operation, but they seem to be updatable:

“root@box:/var/log/roundcubemail# apt-get update && apt-get upgrade zlib1g
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty InRelease
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates InRelease
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-backports InRelease
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release.gpg
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release
Ign http://ppa.launchpad.net trusty InRelease



Ign http://eu-west-1.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages were automatically installed and are no longer required:
libvpx1 libzip5 linux-headers-3.13.0-142 linux-headers-3.13.0-142-generic
linux-headers-3.13.0-143 linux-headers-3.13.0-143-generic
linux-headers-3.13.0-144 linux-headers-3.13.0-144-generic
linux-headers-3.13.0-147 linux-headers-3.13.0-147-generic
linux-headers-3.13.0-149 linux-headers-3.13.0-149-generic
linux-headers-3.13.0-151 linux-headers-3.13.0-151-generic
linux-headers-3.13.0-153 linux-headers-3.13.0-153-generic
linux-headers-3.13.0-155 linux-headers-3.13.0-155-generic
linux-headers-3.13.0-156 linux-headers-3.13.0-156-generic
linux-headers-3.13.0-160 linux-headers-3.13.0-160-generic
linux-headers-3.13.0-161 linux-headers-3.13.0-161-generic
linux-headers-3.13.0-162 linux-headers-3.13.0-162-generic
linux-headers-3.13.0-164 linux-headers-3.13.0-164-generic
linux-headers-3.13.0-165 linux-headers-3.13.0-165-generic
linux-headers-3.13.0-166 linux-headers-3.13.0-166-generic
linux-headers-3.13.0-167 linux-headers-3.13.0-167-generic
linux-image-3.13.0-142-generic linux-image-3.13.0-143-generic
linux-image-3.13.0-144-generic linux-image-3.13.0-147-generic
linux-image-3.13.0-149-generic linux-image-3.13.0-151-generic
linux-image-3.13.0-153-generic linux-image-3.13.0-155-generic
linux-image-3.13.0-156-generic linux-image-3.13.0-160-generic
linux-image-3.13.0-161-generic linux-image-3.13.0-162-generic
linux-image-3.13.0-164-generic linux-image-3.13.0-165-generic
linux-image-3.13.0-166-generic linux-image-3.13.0-167-generic
linux-modules-3.13.0-166-generic linux-modules-3.13.0-167-generic
php-http-request php-net-dime php-net-url php7.2-soap
Use ‘apt-get autoremove’ to remove them.
The following packages have been kept back:
ubuntu-minimal
The following packages will be upgraded:
apt apt-transport-https apt-utils base-files ca-certificates cloud-init
grub-common grub-legacy-ec2 grub-pc grub-pc-bin grub2-common ifupdown
initramfs-tools initramfs-tools-bin landscape-client landscape-common
libapt-inst1.5 libapt-pkg4.12 libldap-2.4-2 libldap2-dev libplymouth2
mountall php5 php5-cli php5-common php5-curl php5-dev php5-fpm php5-gd
php5-intl php5-pspell php5-readline php5-sqlite php5-xsl plymouth
plymouth-theme-ubuntu-text pollinate python-apt python-apt-common
python3-apt python3-distupgrade spamassassin ubuntu-release-upgrader-core
ubuntu-standard update-notifier-common zlib1g zlib1g-dev
47 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 7,326 kB/13.8 MB of archives.
After this operation, 545 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.”

In your opinion, do I forward all updates?

In any case, I don’t understand what you mean by “NC data”.

NextCloud data … which you have.

I wish I had a better understanding of NextCloud, but unfortunately I do not.

Probably upgrade to PHP 7 first? Then try to upgrade to v.30

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0

Recommend you to clone/backup your server before trying to figure out the migration.

A good way to figure out the packages you need to upgrade to v.30 is to look at mailinabox/setup/owncloud.sh at v0.30 · mail-in-a-box/mailinabox · GitHub

apt_install
dbconfig-common
php5-cli php5-sqlite php5-gd php5-imap php5-curl php-pear php-apc curl libapr1 libtool libcurl4-openssl-dev php-xml-parser
php5 php5-dev php5-gd php5-fpm memcached php5-memcached

apt-get purge -qq -y owncloud*

apt_install php7.0 php7.0-fpm
php7.0-cli php7.0-sqlite php7.0-gd php7.0-imap php7.0-curl php-pear php-apc curl
php7.0-dev php7.0-gd php7.0-xml php7.0-mbstring php7.0-zip php7.0-apcu php7.0-json php7.0-intl

Then you try to make sure you can install all those packages, from other repository, manually. After installation, maybe try manually removing those lines before running your set up again, so that it will skip the apt installs (if not your setup will probably halt since they cannot find the files in the distro)

I think that should work, but I don’t have an installation to try, so I can only point to you a direction and hopefully it works for you.

Being a virtual server, I can take the snapshot.

The gist of the matter is the installation of PHP version 7 in order to satisfy the requirements of the MIB 0.30. Now the “PHP limitations” mentioned in the update article are clearer.

Trying to run a test command something finds:


root @ box: / home / ubuntu # apt-cache search php7.0
php7.0-xsl - XSL module for PHP (dummy)
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.0-gd - GD module for PHP
php7.0-mcrypt - libmcrypt module for PHP
php-apcu - APC User Cache for PHP
php7.0-common - documentation, examples and common module for PHP
php-msgpack - PHP extension for interfacing with MessagePack
php-apcu-bc - APCu Backwards Compatibility Module
php7.0-intl - Internationalization module for PHP
php7.0-soap - SOAP module for PHP
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-zip - Zip module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0-curl - CURL module for PHP
php7.0-readline - readline module for PHP
php7.0-json - JSON module for PHP
php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-pspell - pspell module for PHP
php7.0-imap - IMAP module for PHP
php7.0-dev - Files for PHP7.0 module development
php7.0-sqlite3 - SQLite3 module for PHP
php-memcached - memcached extension module for PHP, uses libmemcached
php-igbinary - igbinary PHP serializer
php7.0-mbstring - MBSTRING module for PHP


So you advise me:

  1. Create a snaphot (before doing this I close the IMAP / POP / SMTP ports and the HTTP ports to public addresses, so that the data is not altered in the meantime).

  2. Update all server packages

  3. install PHP 7

  4. update to version 0.30

It’s correct?

What i’m saying is to create a snapshot of your server, then do whatever migration test you need on this cloned server, making sure all files are copied correctly etc, then you repeat the steps on your real server (with backups done as well) of course.

The suggestions above are not tested, and I have no where to test, which is the reason why I asked you to test with a clone first. Remember the steps, then take action on your real server if everything is working correctly.