Thanks a lot to the input and patience of @alento and @just4t and also the analysis of @stephank for the reason why the way of the manual doesent work anymore
We finally have a Workaround for the Upgrade from a Ubuntu 14.04 with maximum v0.30 to the latest version (for now v0.42b) with every neccesary step, that we together planed and testet.
If u have already running MiaB v0.40 jump in at 6)
@stephank i hope u still have the chance to do so
1) Force a Backup from old MiaB (v0.30) save the encrypted directory and your secret_key.txt
2) Setup Ubuntu 18.04 LTS & update and upgrade to last date and import your secret_key.txt (for example in your home dir) and your saved backup (with S3 Backup u just need the secret_key.txt on your machine)
3) Install v0.40 via github
sudo git clone -b v0.40 https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
sudo git checkout
sudo setup/start.sh
4) Delete new generated SSL Data before importing the v0.30 backup
cd /home/user-data/
sudo tar cpf old-ssl.tar ssl
sudo rm -r ./ssl/*
5) Import your v0.30 backup
Local backup import
export PASSPHRASE=$(cat /path/to/secret_key.txt)
sudo -E duplicity restore --force file:///path/to/backup /home/user-data/
Amazon S3 backups
export AWS_ACCESS_KEY_ID=paste your AWS access key ID here
export AWS_SECRET_ACCESS_KEY=paste your AWS secret access key here
export PASSPHRASE=$(cat /path/to/secret_key.txt)
sudo -E duplicity restore --force s3://s3.amazonaws.com/your-bucket-name/your-backup-path /home/user-data/
6) run “sudo mailinabox” to upgrade the imported backup to v0.40 standards
6) move the existing mailinabox directory of v0.40
cd /home/USER
sudo mv ./mailinabox ./mailinabox.v40
7) upgrade to v0.41 via github
sudo git clone -b v0.41 https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
sudo git checkout
sudo setup/start.sh
8) move the existing mailinabox directory of v0.41
cd /home/USER
sudo mv ./mailinabox ./mailinabox.v41
9) repeat steps 7) & 8) for every MiaB-Version were a major Nexcloud update is included
10) upgrade from the version with just one Major Nextcloud release away from the last (in my case v0.41) to the last Version(in my case v0.42b) via curl command
curl -s https://mailinabox.email/setup.sh | sudo -E bash
11) UPDATE! to prevent problems with backups u must be sure your old secret_key.txt is back in /home/user-data/backup
sudo mv /home/user-data/backup/secret_key.txt /home/user-data/backup/secret_key.txt.old
sudo cp /path/to/secret_key.txt /home/user-data/backup/secret_key.txt
(first is the path in the cp command is where u have imported your v0.30 backup data or wher u imported th secret_key.txt file)
Enjoy MiaB in the latest release!
P.S.: @alento or @just4t since i have no expirence with github bugreporting can u report it so we maybe can include a version check for a warning for neccesary upgrades of NC versions (or include the setup of intermediate MiaB versions in the setupscript) ?