Backup your MIAB for free to TransIP Stack using WebDAV

Backup and copy mail-in-a-box backup files to stack using rsync to a local webdav mount.

I wanted to use my free TransIP Stack as a backup target for my MIAB.
The TransIP Stack service has a free 1TB of cloud storage plan and is based on Owncloud.
It currently is invite only for the free plan, but if you enter your e-mail at https://www.transip.nl/stack/, you’ll generally receive an invite quite quickly. Furthermore, the invite page is currently in Dutch only, but all you have to do is enter your mail address and hit “inschrijven”.
TransIP also offers a 2TB plan for 10 euros per month or 10 TB for 50 euros per month. It than also supports backups so you never lose data when by mistake deleting files. I do not need this, so I went with the free plan.
Your data will be hosted in the Netherlands and TransIP promises to not analyse your data. There is no maximum file size.

Unfortunately, the MIAB web interface does not support using WebDAV, it currently only supports Rsync and Amazon S3, even though duplicity does seem to support backing up to a WebDAV target. I did not want to mess with the code of my MIAB, therefore I created the following workaround.

Stack

  • Create separate user / password combination to be used by mail-in-a-box

Setup system

Install Ubuntu 14.04
Install mailinabox using the instructions or video on https://mailinabox.email

Install davfs2

Login to the system

sudo apt-get install davfs2 usermod -aG davfs2 yourusername logout & login dpkg-reconfigure davfs2

  • allow non-root users to mount davfs2 volumes. -> yes

Create mount point

Create save credentials storage folder and add credentials

mkdir ~/.davfs2 sudo cp /etc/davfs2/secrets ~/.davfs2/secrets sudo chown yourusername:yourusername ~/.davfs2/secrets sudo chmod 600 ~/.davfs2/secrets nano ~/.davfs2/secrets

  • add: https://yourstackname.stackstorage.com/remote.php/webdav/ username password

Add mount point to fstab

  • add:
  • logout & login

Perform initial mount and mount after reboot and network services are up.

mount ~/stack crontab -e

  • add: @reboot sleep 60 && mount ~/stack

Create backup folder if not existing

Configure Mail-in-a-box

  • Go to System -> Backup status

Enter the following settings:

  • Backup to: rsync
  • Hostname: localhost
  • Path: /home/yourusername/stack/backups/
  • Username: yourusername
  • Click “Save”

Make sure Mail-in-a-box can authenticate:

  • Copy the public SSH key
  • Paste key underneath existing content

Create initial backup

  • cd mailinabox sudo management/backup.py

Save backup key

Copy

to secure offline location to enable decryption of backups on other machines. Put Stack credentials in the same folder as well.

Do this by opening it:

Copy all contents and paste it in a local notepad text editor like Notepad++ on your computer and save the file.
Be sure to make an exact copy, including enters at the end of the file, otherwise the key might not work.

2 Likes

Thanks for that … No doubt this info. will help me a lot! I’ll try it by linking It to my current ‘Nextcloud’ that is running in my other (external) WEB server (just because sounds better & safest to me than using a FREE service alternative to host my backups).

Yes it should work on normal Nextcloud / Owncloud instances just fine.

In reply to your doubts about using a free service:
I also use some other services at TransIP and I’ve been a customer for years, so I am not that much afraid of losing data. Generally, I’ve never experienced any real problems.

In this case, I do not even worry a lot about stability, although my experience has been great using Stack, because:

  • MIAB will verify and warn that backups aren’t run properly.
  • I’ll then still have local backups, this is only for offsite backup.
  • It’s easy to migrate those to another service.
  • Therefore, it would only be a problem if both my mail server, which is at another provider, and the stack storage would stop functioning at the same time.
  • Even a hack wouldn’t bother me that much, since all data will still be strongly encrypted.

Hi @phol Can you help me activate this ? I am not in NL or BE

Well, basically it is as simple as entering your email address into the box next to “inschrijven” on the website I linked. After a while, when they are handing out new invites, you’ll receive an e-mail with a code.
You can then create a user account at them and enter your invite code in the control panel.

Or are you experiencing some kind of geographical blockade? In that case, please DM me and I might be able to help.

Hi,
I had the same problem.
You need to access their site from the Netherlands or Belgium, for someone living outside these two countries you can use a proxy or VPN.
An Email address ending on .nl or .be is not necessary.
:slight_smile:

1 Like

This topic was automatically closed after 61 days. New replies are no longer allowed.