管理对象

管理对象

  • 要将一个对象上传到一个容器,则要运行以下命令:

    $ swift upload CONTAINER OBJECT_FILENAME
    

    To upload an object in chunks, for larger than 5GB files, run the following command:

    $ swift upload -S CHUNK_SIZE CONTAINER OBJECT_FILENAME
    

    重要

    Uploading objects in chunks is mandatory if uploading an object larger than 5GB.

  • 要检查对象的状态,则要运行以下命令:

    $ swift stat CONTAINER OBJECT_FILENAME
    
    Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg
    Container: storage1
    Object: images
    Content Type: application/octet-stream
    Content Length: 211616
    Last Modified: Tue, 18 Feb 2014 00:40:36 GMT
    ETag: 82169623d55158f70a0d720f238ec3ef
    Meta Orig-Filename: images.jpg
    Accept-Ranges: bytes
    X-Timestamp: 1392684036.33306
    
  • 要想列出容器中的对象,则要运行以下命令:

    $ swift list CONTAINER
    
  • 想要从容器中下载一个对象,则要运行以下命令:

    $ swift download CONTAINER OBJECT_FILENAME
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.