免费注册
帮助文档(华北一、二)

  • ● 通过REST API定义hdfs存储库的配置:

     
    PUT /_snapshot/my_hdfs_repository 
    {   
      "type": "hdfs",   
      "settings": {     
      "uri": "hdfs://namenode:8020/",     
      "path": "elasticsearch/respositories/my_hdfs_repository"   
      } 
    # uri: hdfs的地址,例如:"hdfs://<host>:<port>/" 
    # path: 数据存储/加载的文件系统中的文件路径,例如:"path/to/file"

    创建成功,可以获取hdfs仓库信息:

     GET /_snapshot/my_hdfs_repository

    示例:

     
    {   
      "my_hdfs_repository": {     
      "type": "hdfs",     
      "settings": {       
        "path": "elasticsearch/respositories/my_hdfs_repository",       
        "uri": "hdfs://namenode:8020/"     
        }   
      } 
    }

    ● 创建快照:

     
    PUT /_snapshot/my_hdfs_repository/snapshot_1 
    {   
      "indices": "index_1,index_2",   
      "ignore_unavailable": true,   
      "include_global_state": false 
    }

    创建成功,可以获取快照信息:

     GET /_snapshot/my_hdfs_repository/snapshot_1

    示例:

     
    {   
      "snapshots": [     
      {       
        "snapshot": "snapshot_1",       
        "uuid": "yr9T6jtLTCeVFRoNGN-9Lw",       
        "version_id": 5050199,       
      &