The way that always works for me is:
- Upgrade to v0.30
git clone -b v0.30 https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
git checkout
setup/start.sh
- Migrate to v0.40 over a fresh up-to-date Ubuntu 18.04 LTS server
git clone -b v0.40 https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
git checkout
setup/start.sh
Restore the latest v0.30 backup over this step.
- Finally upgrade to v0.42b
git clone -b v0.42b https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
git checkout
setup/start.sh