Backup script failing

The error is back and I can not longer downgrade to 1.2.3
running 0.8.21

+1, broken for me again. Rolled back to 0.8.21, but it definitely looks sus

I had the same issue when 2.0 dropped, downgraded to 1.2.3, but got hit again with 2.1.0. Can’t downgrade to 1.2.3 this time, so downgrade to 0.8.12. Complained about missing boto (I use AWS S3) so installed python3-boto. New issue is socket.gaierror: [Errno -5] No address associated with hostname in boto. At present, backups are not working.

Update
Upgrading to 2.1.0 and applying this patch to mailinabox/management/backup.py seems to resolve my issue. As with anything on the internet, YMMV

2 Likes

didn’t work for me, am I missing something?

Can you provide a bit more detail as to what’s not working? What version of MiaB are you running? Are you running duplicity 2.1.0? Exactly which file did you modify? Are you seeing the same error, or a new error?

dms,

How do you upgrade Duplicity so the 2.x version is replaced by the 1.2.3 version?

sudo apt update && sudo apt upgrade seems like it should do it, but does nothing.

root@box:~# duplicity --version
duplicity 2.1.0

I’m feeling a bit concerned/paranoid since I can’t mess this server up.

Thanks.

I believe there’s instructions above on how to downgrade your duplicity package to 1.2.3. I am running 2.1.0 with the patch from the github link posted above by @sesser and so far everything seems to be working correctly.

I see. I might wait until the ubuntu repos are fixed then. Tks

Restart the MiaB server after applying the referenced patch and all should be well.

Thank you @sesser !
It worked just fine.

These commands are to upgrade to the latest version (2.1.0).
To downgrade you would have to indicate the target version as in sudo apt install duplicity=0.8.21-1build1
But the the patch @sesser highlighted will fix your script. There are only two lines that need editing and restart miab:sudo systemctl restart ssh.service

Hi thanks for the reply, will give that ago tomorrow as I’m away from any access till then.

I’m not sure why that would work but let’s see. :grinning:

After the mod I did not restart miab will try this tomorrow as no access today.
Thanks

I’m sure it’s user error but the @sesser fix to add the single quotes around the args plus a restart hasn’t worked for me. I still get ‘something is wrong with the backup’ when I access the admin page.

What I’ve noticed though is that my backup.py is not quite the same as the one on GitHub and is shorter (596 lines versus 625 in GitHub).

I’ve confirmed that my duplicity has updated overnight and is v 2.1.0 and I’ve also initiated a miab upgrade just in case (I was pretty sure I was up to date already) and nothing has changed with the length of backup.py and I’m still v63 for miab. The quotes remained in place after the upgrade.

I’m loathe to start tinkering too far but am I missing something obvious?

I just managed 15 mins on the server before I leave and well I never, why on earth didn’t I remember to do that… YES a simple reboot resolved all of the problems.

Thanks very much for your time guys @SHAdmin & @dms

To reply to my own post:
After a bit of investigation I’ve found that both the @sesser and the other fix from jvolkenant which is referred to in one of the GitHub posts (and has more changes within it) both work when run manually (I can see my S3 bucket receiving daily deltas), and therefore possibly during the overnight miab processing? It’s when accessing via the admin backup status page that I get the error message only. Good enough for me for now and I’ll get back to the day job :slight_smile:

Ah, I see where the confusion is. I was in the same boat as @AndrewJRae. I updated the backup script in my user’s directory. The main installation is /root/mailinabox however. Update /root/mailinabox/management/backup.py and restart mailinabox

systemctl restart mailinabox.service

Backup status page and nightly backups should start working

1 Like

Thank you! Upgraded to duplicity 2.1.0 and backup failed. Applied this patch to backup.py and just ran success backup.

Bingo!

Amazing, thanks.

Today I have learnt “sudo -i” to switch to root within an AWS EC2 instance as otherwise it’s all done as the ubuntu user via SSH :slight_smile:

Please don’t do as I did and apply the patch suggested by @sesser to a downgraded version (0.8.21) and then scratch your head trying to work out why it wasn’t working.

Carry out the upgrade to v2.1.0, apply the patch to backup.py, restart the mailinabox service and then retry.

Backups and backup status page both now working without error and showing full/incremental backups.

Thanks for everyone’s help.

1 Like