Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from v0.24 to v0.30 fails #1596

Closed
ccnoyes opened this issue Jul 3, 2019 · 9 comments
Closed

Upgrade from v0.24 to v0.30 fails #1596

ccnoyes opened this issue Jul 3, 2019 · 9 comments

Comments

@ccnoyes
Copy link

ccnoyes commented Jul 3, 2019

When I try to upgrade from v0.24 to v0.30, I get the following error:

Primary Hostname: xxxxxxxxxxxx
Public IP Address: xxxxxxxxxxxxx
Mail-in-a-Box Version: v0.30

Updating system packages...
Installing system packages...
Initializing system random number generator...
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...
Installing Nginx (web server)...

FAILED: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install nginx php7.0-cli php7.0-fpm

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php7.0-cli
E: Couldn't find any package by regex 'php7.0-cli'
E: Unable to locate package php7.0-fpm
E: Couldn't find any package by regex 'php7.0-fpm'

I can ssh to my mailinabox server, but when I run:

/root/mailinabox/management/status_checks.py

I get this error:
-bash: /root/mailinabox/management/status_checks.py: /usr/local/lib/mailinabox/env/bin/python: bad interpreter: No such file or directory

At the moment I'm stuck. The mail function works (I can send and receive mail).
BTW: I just use mail, not any of the other features.
Can I revert back to v0.24?

Thanks

@pandruszkow
Copy link

pandruszkow commented Jul 5, 2019

Why not export all your emails using something like imapsync and move the data over to a newly installed MiaB instance? You would avoid package upgrade problems because you'd be starting from a fresh Ubuntu install, though I imagine moving across all the data and making sure nothing is lost would take some effort.

Edit: have you tried making a MiaB backup and then restoring it on a newly installed MiaB instance? It might work.

@alento-group
Copy link
Contributor

The Ubuntu version used then is EndofLife meaning that the packages needed are no longer available in the repository.
Ubuntu does offer a repository that contains them, but I do not know the specific details of the PPA. You will need to add that PPA.

@alento-group
Copy link
Contributor

Edit: have you tried making a MiaB backup and then restoring it on a newly installed MiaB instance? It might work.

In theory this will not work as to do a proper restore onto v0.40+ the backup needs to be from v0.29 or v0.30.

@ccnoyes
Copy link
Author

ccnoyes commented Jul 6, 2019

Since DigitalOcean is hosting my server, I'll take a snapshot of my current server (just in case...).
Then take a full backup (sftp to a remote server) of:
/home/user-data/mailboxes/
/home/user-data/backup/secret_key.txt
and the various ssl directories (I really don't want to lose the keys)

Then spin up a new miab server using a fresh ubuntu 18.04 installation and restoring the backup files that I copied above.

Does that make sense?

@alento-group
Copy link
Contributor

alento-group commented Jul 6, 2019

Does that make sense?

It makes sense, but it may not work. The problem will be the huge gap in NextCloud versions between MiaB v0.24 and v0.30.

This is what @JoshData wrote on the subject:

When upgrading, you must first upgrade your existing Ubuntu 14.04 Mail-in-a-Box box to the latest release supporting Ubuntu 14.04 --- that's v0.30 --- before you migrate to Ubuntu 18.04. If you are running an older version of Mail-in-a-Box which has an old version of ownCloud or Nextcloud, you will not be able to upgrade your data because older versions of ownCloud and Nextcloud that are required to perform the upgrade cannot be run on Ubuntu 18.04.

If it does not work I can suggest two possible remedies ...

First, if DO has Ubuntu 14.04 still available for installation, which I doubt, reinstall on that first as the packages should be up to date ... again, if 14.04 is even still available. Then upgrade MiaB to v0.30. After which you will have to do the entire process again to migrate to Ubuntu 18.04.
OR
Second, install the necessary repositories in your Ubuntu 14.04 install as I originally suggested. This will be the path of least resistance, IMHO. Upgrade MiaB to v0.30 and then do the migration to Ubuntu 18.04.
See here: https://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release

@ccnoyes
Copy link
Author

ccnoyes commented Jul 8, 2019

You're right - DO doesn't have a 14.04 server for installation.

I'm still confused...

Why can't I backup (to an external server) all the emails, secret_key.txt and SSL keys on my 14.04 MIAB server, then create a shinny new 18.04 x64 Ubuntu server running v0.40 MIAB. When I get that running, simply copy my saved emails and SSL keys onto the new server. I don't use OwnCloud/NextCloud. I just run an email server.

Thanks.

@JoshData
Copy link
Member

JoshData commented Jul 8, 2019

You can. Nextcloud is the component that requires upgrades through intermediate versions. If you're not using it, I believe a backup+restore upgrade from any Mail-in-a-Box version to any later Mail-in-a-Box version will work fine.

@ccnoyes
Copy link
Author

ccnoyes commented Jul 9, 2019

Thanks Josh. My server is hosted by Digital Ocean, so I'll take a snapshot of my current MIAB server before I do anything.

@ccnoyes
Copy link
Author

ccnoyes commented Jul 10, 2019

I think I have a workable plan now, so this thread can be closed.

@ccnoyes ccnoyes closed this as completed Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants