Upgrade from v30 to v68?

Hi all, What are my challenges upgrading from v30 (Ubuntu 14.04.6) to v68 (Ubuntu 22.04)? Is that even possible, or will I need to first upgrade the OS to Ubuntu 18.04?

I recently upgraded another box from Ubuntu 18.04 to 22.04, so I’m familiar with the process.

Might want to check this thread out.

Update: I attempted to migrate from v30 (Ubuntu 14.04.06) to v57a (Ubuntu 18.04.6), and I perfomed Duplicity restore. However, when I ran “mailinabox” command, I got the following error:

Mail-in-a-Box Version:  v57a

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)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2024-04-14-18:54:09...

Upgrading to Nextcloud version 14.0.6

sha1sum: WARNING: 1 computed checksum did NOT match
Download of https://github.com/nextcloud-releases/contacts/archive/refs/tags/v3.3.0.tar.gz did not match expected checksum.
d5d25f1c855186e7e58c4b4074ca5d696343f197  /tmp/contacts.tgz

e55d0357c6785d3b1f3b5f21780cb6d41d32443a  /tmp/contacts.tgz

What do you mean by this?

When you ran ??

curl -s https://mailinabox.email/setup.sh | sudo bash

Why not go straight to 22.04LTS ?

Yes, I tried both “mailinabox” command and the curl command. Both produced the same error.

I initially tried to migrate directly to 22.04LTS, but the duplicity restore failed, however, I think I’ll try that again. I wonder if there is a problem with the nextcloud release for 14.0.6.

Did you try doing it via this method posted in the other thread?

The “right way” would be to use duplicity – but as stated above there’s versioning stuff to worry about.

basically what I’ve done in the past is something like this:

tar -czvf  user-data.tar.gz /home/user-data/

Then scp that file to the new server.

scp user-data.tar.gz root@

Where is your ip address of the new box

Then decompress it with

tar -xvf user-data.tar.gz

If you need to move it around because you decompressed it in the wrong spot you can always do a

mv /user-data/  /home/user-data 

then just run the installer, you’ll want to use the exact same “box name” as you had before, and the same master email address. once you log in with that after setup is complete you will notice all the other usernames are there, aliases, domains, etc. Mail for the master email (and other email addresses) will be there also…

curl -s https://mailinabox.email/setup.sh | sudo bash

yeah - this is unsupported, but so is moving from 0.30 to 0.68… I bet it would work though

I’m not sure how much has changed in the users.sqlite file in /home/user-data/mail between 0.30 and 0.68 but I’m betting on – not a lot if anything.

I intend to use this method again once I figure out how to get another box from 18.04 LTS (quota’s fork) to 22.04LTS with quotas.

Talking to a developer to see if he can help me rework jrsupplee’s quota fork back into 22.04LTS (v0.68+) and not clobber files and hopefully merge with head of this main project.

I’m not sure if you can go straight from Ubuntu 14.04 to 22.04 as nextcloud needs to be updated on 18.04 first to bring it up to the right version.

I think there was a problem with the nextcloud checksums last year. This is likely related to this. You may need to edit the nextcloud.sh setup script and update the checksums to get past this.

1 Like

Update: I gave up trying to migrate from v30 to v68. I tried a directly going from Ubuntu 14.04 to 22.04 and hit numerous issues, so then I tried going from 14.04 to 16.04, and hit issues with Nextcloud migration.

My new plan is to setup a new v68 (22.04) box and migrate individual email accounts using imapsync.

imapsync \
--host1 box.host1.org --user1 bob@domain.org \
--passfile1 bob \
--host2 n.n.n.n --user2 bob@domain.org \
--passfile2 bob \
--addheader \
--automap \

I gave up upgrading after a number of tries on DigitalOcean. I ended up creating a new droplet from scratch and building the box step by step with the older box still running so I didn’t miss anything. I got a new IP address (DO’s IP’s are always blacklisted by UCEPROTECT-3 but no one else). I used a different domain that I had as spare. I updated the NS records in GoDaddy. I didn’t have a lot of email addresses so that was no problem doing it manually. I FTP’d the contents of the one website from the old box to the new one. It took me a couple of days to account for DNS updates but finally I shuttered the old box and deleted its droplet. The new one has been working fine for over a week now.

If you’re not using ownCloud/Nextcloud, you can just disable the nextcloud part entirely. The rest of the installation should work fine.

If you’re not using ownCloud/Nextcloud, you can just disable the nextcloud part entirely. The rest of the installation should work fine.

Any tips for disabling “nextcloud part”?

I haven’t tried this but maybe just comment out the file and run setup again…

cd  /root/mailinabox/setup

vim (or nano)  start.sh

add a # before source setup/nextcloud.sh

assuming vim, i for insert, # for adding the hash tag comment (use arrow keys to navigate)

# source setup/nextcloud.sh

save the file

(again assuming vim)

(ESC KEY)  :wq

Then rerun setup

sudo mailinabox
1 Like

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.