Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    migration of attachment-storage from files to S3

    Kopano Groupware Core
    2
    2
    1026
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tengeleiter
      tengeleiter last edited by

      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?

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @tengeleiter last edited by fbartels

        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.

        Edit: correction since this thread has been mentioned somewhere else. My statement about the file structure was a misconception from my side. The file structure is actually not the same. Instead all attachments are stored directly below what has been configured as ´attachment_path´.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post