mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.

Home Page:https://mailinabox.email/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIAB Maintenance / Restore Documentation for S3 could be enhanced to avoid confusion

snrkl opened this issue · comments

Docs covering restoration from s3 (https://mailinabox.email/maintenance.html) have code snippets for the duplicity command for restoring a MIAB install from an S3 bucket:

Amazon S3 backups

If your backups are stored in Amazon S3, get your account credentials handy and then run a duplicity restore:

export AWS_SECRET_ACCESS_KEY=paste your AWS secret access key here
export PASSPHRASE=$(cat your_backup_secret_key_file.txt)
sudo -E duplicity restore --force s3://s3.amazonaws.com/your-bucket-name/your-backup-path/ ```

The s3:// URI example is misleading, as the S3 URI does not need a FQDN. If you construct a URI in the pattern of the example, it will return errors such as:

Attempt of list Nr. 1 failed. ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden
Attempt of list Nr. 2 failed. AttributeError: 'NoneType' object has no attribute 'objects'

More details of the error can be seen in forum posts showing that people hit these errors all the time, following the provided documentation.

The documentation could be updated to reflect the real nature of the s3:// URIs.

Amazon S3 backups

If your backups are stored in Amazon S3, get your account credentials handy and then run a duplicity restore:

export AWS_SECRET_ACCESS_KEY=paste your AWS secret access key here
export PASSPHRASE=$(cat your_backup_secret_key_file.txt)
sudo -E duplicity restore --force s3://your-bucket-name/your-backup-path/ ```

Additionally, the docs could reference the S3 tools (https://console.aws.com) available to copy the needed URIs from the S3 web administration interface:

Screenshot 2024-05-16 at 21 41 02