Using MIAB On ARM

I know that ARM is officially unsupported (I see the warning on every update) but I nonetheless use it, mostly because I have a free t4g.small instance from AWS and host my MIAB on there.

I have been receiving backup errors for some time now and have ignored them.

`GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: Note: ‘–force-mdc’ is not considered an option
gpg: Note: ‘–symmetric’ is not considered an option
gpg: WARNING: no command supplied. Trying to guess what you mean …
usage: gpg [options] [filename]
===== End GnuPG log =====

Traceback (most recent call last):
File “/home/ubuntu/mailinabox/management/backup.py”, line 647, in
perform_backup(full_backup)
File “/home/ubuntu/mailinabox/management/backup.py”, line 318, in perform_backup
shell(‘check_call’, [
File “/home/ubuntu/mailinabox/management/utils.py”, line 126, in shell
ret = getattr(subprocess, method)(cmd_args, **kwargs)
File “/usr/lib/python3.10/subprocess.py”, line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/bin/duplicity’, ‘full’, ‘–verbosity’, ‘warning’, ‘–no-print-statistics’, ‘–archive-dir’, ‘/home/user-data/backup/cache’, ‘–exclude’, ‘/home/user-data/backup’, ‘–volsize’, ‘250’, ‘–gpg-options’, “‘–cipher-algo=AES256’”, ‘–allow-source-mismatch’, ‘/home/user-data’, ‘file:///home/user-data/backup/encrypted’]’ returned non-zero exit status 31.`

I decided to dive into the issue.

It seems that Duplicity for ARM is only available through version 0.8.21 (duplicity : arm64 : Jammy (22.04) : Ubuntu) which had a bug in it and was causing my GPG errors. (Backup script failing

Snap, however, has newer versions of duplicity that work on ARM.

I removed tha apt version of duplicity and installed the snap version.

However when installing via snap the MIAB scripts did not find duplicity because it was installed in /snap/bin instead of /usr/bin

To fix this I created symlink sudo ln -s /snap/bin/duplicity /bin/duplicity which then allowed the snap version of duplicity to be called by the MIAB scripts which reference /usr/bin/

Let me know if this is unclear or if you have any follow up questions.

Thanks to @dms and @KiekerJan for helping me work through this

4 Likes

Hi, and thanks for posting a solution to this issue. I am running MIAB on Arm (Ubuntu 22).
Please post a step by step guide including the removal of the apt version and installation of the snap.

Please help because I am not that good at the command line.

Thanks @ jacobrosenfeld

I will reply it for myself: this is what i did:

sudo apt-get remove --purge duplicity
sudo snap install duplicity --classic --edge
sudo ln -s /snap/bin/duplicity /bin/duplicitty

I waited for the nightly reports and no error message arrived. The script is working you can check the admin backups section of your box.

Thanks again @ jacobrosenfeld

I use mailinabox on ARM, because I use Hetzner ARM servers, which are cheaper and have twice the memory of AMD servers. I’ve been standardizing on ARM.

I am hesitant of installing anything else though. I prefer to use mailinabox as-is. If the backup doesn’t work, so be it. I use external backup.

Based on the Moving to a New Box procedure, it should be enough to backup /home/user-data. Right?

I suppose I need to try it. Create a new box, restore /home/user-data, point my browser to the new box, and check if my settings and data are there.

I do not keep my mail in mailinabox. I move it periodically to separate dovecot server.

That should work. Relatedly I use AWS graviton arm server which looks much cheaper than heater after briefly glancing at their site

I tried it. It worked. Backing up /home/ is enough. There is no need to backup things like /etc/nsd/zones. They are generated by running mailinabox.

A Hetzner ARM instance with 4 GB RAM, 40 GB SSD, 2 shared cpus, and practically unlimited bandwidth (20TB) costs € 3.79 / month (without VAT). A t4g.small AWS instance (2 GiB RAM) costs 0.0168/h = $12/month on-demand. This does not include the disk or bandwidth, which are charged separately. With a 1 year term paid up-front, you get 33% savings. A 4 GB AWS instance (t4g.medium) is twice the price. I abandoned AWS years ago. Hetzner’s pricing is also much simpler. There is a single monthly price and a single hourly price, and you automatically get whatever costs less for the amount of time that you use it.

FYI it seems MIAB reinstalls the apt version on MIAB update so I had to uninstall it to get backups working when upgrading to v67.

They only have AMD available in the US, a deal breaker for me.