[bd] Data Storage [Paid] 1.2.5b

Store data in remote servers.

  1. nhatkymua

    nhatkymua New Member

    #81 nhatkymua, Feb 24, 2017
    Last edited: Feb 24, 2017
    Mình làm dc rôi
    phải add bucket policy trên s3 để tất cả các file tự upload cho public
    mà có cách nào cho thư mục internal_data lên s3 luôn khoog bạn.
    mình có mua
    [bd] Attachment Store nhưng mình không thích nó upload kiểu thư mục riêng lẽ như vậy. có các nào upload luôn internal_data được không. Thanks bạn
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Nếu ACL đã để public thì không cần bucket policy nữa. Không rõ từ trước bucket của bạn có để policy gì không?
    Về internal_data, không thể upload hết thư mục này vì chủ yếu đó là temp và cần truy xuất nhanh + xóa ngay. Nếu bạn xài [bd] Attachment Store bạn có thể dùng external_data mode, file sẽ được đưa qua [bd] Data Storage để upload.
     
  3. nhatkymua

    nhatkymua New Member

    thanks để mình thử lại. với lại cái Attachment của mình trên 40gb. Chạy rebuild attachment data được chút xíu là ngưng. không lên được s3. Phải có chức năng giống bên [bd] Data Storage. Tự mình upload thư mục attachment lên s3. Xong rồi kết nối xenforo qua s3.
     
  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Bạn có thể chuyển qua external data, chạy move tool như vậy sẽ nhanh. Sau đó dùng tool ngoài upload lên S3. Xong xuôi thì dùng storage options tool để cập nhật lại là được.
     
  5. nhatkymua

    nhatkymua New Member

    Mình có pm inbox bạn, bạn xem giúp với
     
  6. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    xfrocks updated [bd] Data Storage with a new update entry:

    Minor Update

    Read the rest of this update entry...
     
    pete likes this.
  7. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    For owners of this add-on who plan to upgrade to XenForo 2. You can configure XenForo to use FTP-server as external data file storage with these lines in config.php:

    PHP:
    $config['fsAdapters']['data'] = function () {
        return new \
    League\Flysystem\Adapter\Ftp([
            
    'host' => 'ftp.domain.com',
            
    'username' => 'username',
            
    'password' => 'password',
            
    'passive' => false,
            
    'root' => '/domains/ftp.domain.com/public_html/data',
        ]);
    };
    $config['externalDataUrl'] = 'http://ftp.domain.com/data';
     
  8. Whissi

    Whissi New Member

    FYI, with latest update (1.2.5) I am getting
    Code:
    ErrorException: Fatal Error: Call to a member function getStatus() on boolean - library\bdDataStorage\StreamWrapper\S3.php:97
    errors when I try to "Upload a file" in a posting.

    Looks like you have changed bdDataStorage_StreamWrapper_S3::_downloadFile() ins this version. This functions seems to check if there's already such a file. For new files, you will get a 404 and therefore $response is FALSE. In previous versions you checked the return value... adding back such a check, i.e.
    PHP:
    if ($response !== false && $response->getStatus() === 200) {
    fixes the problem for me.
     
  9. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    That was indeed a nasty bug and your fix is spot on. I have just released v1.2.5b with the fix. Thank you very much.
     
  10. Solari

    Solari Webmaster

    For those of us using FTP, can we have it point to the existing data directory on the webserver without needing to make a copy? The reason we want to use FTP is because our sites are on a load balancer so by using your add-on with remote FTP we can make sure our primary webserver is used (and replicated from to other servers).

    Would this also apply to your attachment store add-on?

    Thanks,
    Ray
     
  11. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Yes, we don't check for file existence. Just make sure all your files are there.
     
  12. Solari

    Solari Webmaster

    #92 Solari, Mar 24, 2018
    Last edited: Mar 24, 2018
    Gotcha, thanks.

    Silly question, I know --- how do I copy my existing data folder over to S3 per your instructions before using this add-on? Do I also need to create a /data folder on S3?

    Regarding data folder, I already use bd-attachments on S3, so do I assume I don't need to copy the /data/attachments over to S3 again?

    Also, what about the other folders inside /data like /bdCache? It's huge and I'd rather not have to copy that one over. Does this add-on only deal with avatars? If so, I'd just upload data/avatars?

    Appreciate any insight.

    Many thanks,
    Ray
     
  13. Solari

    Solari Webmaster

    @xfrocks can you chime in on the above when you get a chance? Thanks.
     
  14. Solari

    Solari Webmaster

    @xfrocks We really need to resolve this, esp. about other folders like bdCache inside /data which we wouldn't want in the cloud. Please see above. Thanks.

    Ray
     
  15. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    I have just replied to your message on xenforo.com, sorry for the late reply here.

    You can use the tool you are most familiar with, it doesn't matter. We often use the aws cli. And you need to upload everything inside data into the S3 bucket root. e.g. data/avatar goes to s3://bucket-name/avatar.
     
Loading...