migration of attachment-storage from files to S3



  • Hi,

    I wanted to migrate my attachments from files to s3, but i had no success. i changed my server.conf as follows:

    ...
    attachment_storage = s3
    attachment_path        = 
    attachment_s3_hostname = s3-eu-west-1.amazonaws.com
    attachment_s3_protocol = https
    attachment_s3_uristyle = virtualhost
    attachment_s3_accesskeyid = {{ s3_accesskeyid }}
    attachment_s3_secretaccesskey = {{ s3_secretaccesskey }}
    attachment_s3_bucketname = mail.domain.tld
    ...
    

    i have commented out the following options:

    attachment_files_fsync  = yes
    attachment_path         = /var/lib/kopano/attachments
    attachment_compression	= 6
    

    I copied all files from my local attachment storage to s3 by the following command:

    aws s3 sync /var/lib/kopano/attachments/ s3://mail.domain.tld/ --sse --delete
    

    after that i started kopano-server with the “–ignore-attachment-storage-conflict” option and it started without any error. But it was not possible to open any attachment. In the logs i got the following error:

    Amazon S3 return status HttpErrorBadRequest, error: <unknown>, resource: "<none>"
    

    Is there a change in the structure the attachments are stored in S3 or what is wrong in my configuration?


  • Kopano

    Hello @tengeleiter ,

    since the file structure is still the same wehter you use attachments on disk or on s3, I would say that you have a configuration mistake.


Log in to reply
 

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.