I have just gone through the process of moving my installation from v30 on Ubuntu 14.04 to v52 on Ubuntu 18.04. I recovered my backups successfully and mail seems be to flowing ok. However, I got a notification today saying that the backup had failed:
No such file or directory: ‘/home/user-data/backup/secret_key.txt’
Any suggestions as to how I can fix this?
Sounds like you are missing an encryption key for your backups. This file is created during setup, so running
sudo mailinabox again should fix your situation.
I have tried running sudo mailinabox a couple of times and it doesn’t create the backup and encryption directories under user-data and neither does it create the encryption key.
hm that is odd. it should be created as part of the setup here: https://github.com/mail-in-a-box/mailinabox/blob/master/setup/management.sh#L57-L61.
what is the output of
ls -l /home/user-data?
I have grabbed a screenshot of sudo mailinabox output and it appears to halt at nextcloud. So it isn’t getting as far as running management.sh
Sorted! When I compared nextcloud.sh with the git version lines 27 and 28 were different. I edited my version to be the same and re-ran sudo mailinabox. Now I have a backup directory!
Glad you got it working. The fix for this landed on master after
v0.52 was released and should be part of the next release.
You should make a copy of the
secret_key.txt to store it somewhere else for disaster recovery.
Thanks, I have done that.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.