ES备份

Elasticsearch Liemer_Lius 72℃

1、logstash导出文件

参考:https://www.cntofu.com/book/52/output/file.md

input {
    elasticsearch {
        hosts => ["http://192.168.37.174:9200"]
        index => "yspybd_0002"    // 多个索引用,隔开
        user => "es_user"
        password => "es_passwd_balabalabala"
        docinfo => true
    }
}

filter {
    mutate {
        remove_field => ["@timestamp", "@version"]
    }
}

output {
    file {
        path => "/data/%{[@metadata][_index]}.json.gz"
        gzip => true  // gzip压缩减少空间使用
    }
}

 

转载请注明:liutianfeng.com » ES备份

喜欢 (3)