Restoring backup(v0.16) to new server (v0.21) - owncloud update failed


I was able to restore the duplicity backups on a new VPS but encountered error on the last step when running Mail-in-a-Box setup now that my old files are back.

sudo mailinabox

Mail-in-a-Box Version: v0.21c

Updating system packages…
Installing system packages…
Initializing system random number generator…
Opening alternate SSH port 1896.
Firewall is active and enabled on system startup
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
bayes: synced databases from journal in 0 seconds: 1373 unique entries (2537 total entries)
Installing Nginx (web server)…
Installing Roundcube (webmail)…
Updating database schema (2015111100)… [OK]
Installing ownCloud (contacts/calendar)…
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Reset log level

I have users using the the contacts and calendar so I cannot just comment out the ownCloud portion during Read about needing to manually upgrade ownCloud from their documentation.

Anyone with experience or insights? TIA!


Did you try to update ownCloud by yourself? Then - after the update- run the mailinabox installation command and you should probably good to go.


To “fix” my issue, I manually upgraded ownCloud from v8.1.1 to v8.2.10 by:

  1. backup /home/user-data/own cloud
  2. get ownCloud v8.2.10 tarball from
  3. extract tarball and replace /usr/local/lib/owncloud
  4. create symlink to /home/user-data/owncloud/config.php at /usr/local/lib/owncloud/config
    Note: ensure owner of link is www-data
  5. cd to /usr/local/lib/owncloud/
  6. sudo -u www-data php occ upgrade

After above is done successfully, there will be no issue running mailinabox setup again which will upgrade owncloud to v9.1.1
7. sudo mailinabox



I have run into the same issue but am reluctant to try to do any manual upgrades… Is there an official response as to why this problem is happening with new installations?


This error from ownCloud indicates that you’ve jumped too far ahead in one step as you restore a backup. If you’re creating a new Mail-in-a-Box (not restoring from a backup), this should not arise since we’ve recently made it so that we will do several step by step upgrades as necessary. But we probably don’t have this working for backup restores yet.

You could do an intermediate upgrade e.g.:

$ export TAG=v0.19
$ curl -s | sudo bash

This would install version v0.19 of Mail-in-a-Box.

I’m not sure what intermediate version(s) you would need to go through for whatever version you are at now in the backup, unfortunately.


I faced the same issue when I tried to test howto restore a MIAB box from backups. I restored backups from MIAB version 0.19b and then installed the latest version of MIAB (v0.23a I believe) on a clean Ubuntu box. And then I got this issue.

So this issue is not yet resolved?