Hi there!
I spent some time setting up rsync. There were some points that got me confused along the way. So, I’m just writing a post here to make things a little easier for others in the future.
Setting it up:
- Login to your Mailinabox dashboard and find the backups page.
- Configure the rsync connection and click ok, it should notify you with “ok” if all is good.
At this point you don’t need to do anything more. You can just wait overnight and the backup should work. It will notify you by email if it doesn’t work.
Testing right away:
If you want to verify right away can ssh login to your server and call sudo mailinabox/management/backup.py --verify
. But! This will fail with error message “no backup chains found” if there aren’t any backups created yet.
Instead I had to first do a backup by calling sudo mailinabox/management/backup.py
. Heads up, running the backup command won’t output any log message (the reason for this is probably because it’s tailored to be run as an automated cron job).
Afterwards, the verify command worked fine!
Troubleshooting:
- Is your public key correctly installed, are you able to ssh into your backup destination from your MiaB server? Try with
sudo ssh -i /root/.ssh/id_rsa_miab youruser@destination.com
. - When running the backup are you running into “rsync error:13”? I ran into it and the error was a folder permission error. My user had rights to read and write files in the target folder but was not setup to be an owner of the target folder itself. When I ensured that the user owned both the files and folder containing the files it solved the issue.