How to get to my backup files?

Hi,

I am using MIAB for a couple of weeks now. On its own iron, a PCEngines APU2C4 server. Connected to the DMZ of a pfSense router, that has its WAN interface connected to a (stable) residential connection. After some tinkering his works flawless. A brilliant solution for a long-standing wish: get my mail out of the cloud and back in my own office, while being able to use it safely from home and while on the road. I am really very happy with it :slight_smile:

There is however one area I am outsmarted, and that is backup. ATM the box makes backups to itself. Nice, but not sufficient. I want those files out of there. I do have a Synology NAS on the premises. Although I can make the connection from box to NAS work (I can ssh from box to NAS) I only can do this for a login with user / password. Although one can modify the NAS to use passwordless login this is not really a viable option, for with every OS-update (think every 2 weeks) you need to make the same modifications again. The box-backup on the other hand seems not able to make backups using a user / password pair for login.

So I am wondering, do I miss something? How do I get these backup files on my NAS?

Hope someone can shine some light on this.

Regards,

Paul

Hi Paul.
If you look in the sourcecode, particularly at the file in /management/backup.py, line 24, you’ll see that we store the backups in $STORAGE_ROOT/backup.

Where, you ask, is $STORAGE_ROOT? that can be found in this file: /etc/mailinabox.conf

On most installations, that’s /home/user-data/

so, backups are stored in /home/user-data/backup/

You can read up on how to interact with those backups here: https://mailinabox.email/maintenance.html#moving-boxes

Hi Cromulus,

Thanks for your time. Reading your answer I realize that I did not explain my problem very good. My mistake. The problem is not that I cannot find the backup files, the problem is that I am not able to get those files off the MIAB server, and onto another server, more specifically, my NAS.

So far I was not able to make rsync work, because my NAS does not support (at least, not by default) passwordless login. As an alternative I tried to get these files off to my PC using SFTP. There I also ran into problems because these files are owned by root, and I cannot login as root. Changing the ownership of the backup files did not help and is something I try to prevent, as this is probably overwritten bij MIAB the next backup or the next system update.

Using Amazon S3 is not a real option for me; AWS is (IMO) over complicated and somehow defies the purpose of having my mail out of the cloud and onto my own premises.

So I am a bit stuck here and wondered if and how others have solved this.

Kind regards,

Paul

Ha!

I solved this. Reading over my last reply made me think. At last.

All of yesterday I tried in vain to connect using ‘ssh user@ip-of-the-nas’ to establish that at least the passwordless login to my NAS worked. Couldn’t do it. Just couldn’t. :yum: It made the connection but kept on asking for a password.

I blamed the NAS, the keyfiles, the mode bits and everything else, but the problem lay in the fact that MIAB uses a non-standard filename for it’s private key: id_rsa_miab instead of the standard id_rsa. So I copied id_rsa_miab to id_rsa and voila, I was able to connect using ssh.

And from then on it was easy to make the backup process connect to the NAS using rsync.

The only thing left now is to make the NAS not overwrite the changes I made to enable passwordless login every time it updates its OS (DSM). But that is a Synology thingy.

As for MIAB, with this solved it functions brilliantly for my purposes. A wonderful product!