电信的网做的网站移动网打不开该找电信还是移动wordpress更改ip
电信的网做的网站移动网打不开该找电信还是移动,wordpress更改ip,wordpress左上角logo,个人求职网站履历怎么做#x1f4cc; 一、阿里云官方文档核心要求#xff08;已全部落实#xff09;要求本方案落实✅ ECS 与阿里云 ES 同 VPC已满足✅ 先全量 再增量#xff0c;避免窗口丢失初次增量从 T0 开始✅ 增量字段必须为 date 类型lastActiveDate 已验证✅ ES 8.x 必须移除 document_ty… 一、阿里云官方文档核心要求已全部落实要求本方案落实✅ ECS 与阿里云 ES 同 VPC已满足✅ 先全量 再增量避免窗口丢失初次增量从T0开始✅ 增量字段必须为date类型lastActiveDate已验证✅ ES 8.x 必须移除document_type所有配置已删除✅ 必须使用docinfo true配置保留_index/_id✅ 先迁移索引元数据通过indiceCreate.py实现✅ 首次增量手动验证再启用schedule初次配置注释schedule 二、全部脚本文件共 5 个1️⃣ 检查脚本check_bc_indices.sh#!/bin/bashSOURCE_HOSThttps://124.70.134.88:9200SOURCE_USERelasticSOURCE_PASSwanyanzhenjiangTARGET_HOSThttp://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200TARGET_USERelasticTARGET_PASSwanyanzhenjiangecho【1/3】获取源集群统计...curl-k -u$SOURCE_USER:$SOURCE_PASS-s${SOURCE_HOST}/_cat/indices/bc_*?hindex,docs.count|sort/tmp/source.txtecho【2/3】获取目标集群统计...curl-u$TARGET_USER:$TARGET_PASS-s${TARGET_HOST}/_cat/indices/bc_*?hindex,docs.count|sort/tmp/target.txtecho【3/3】差异对比无输出 一致diff/tmp/source.txt /tmp/target.txtechoecho 源文档总数$(awk{sum$2} END{print sum0}/tmp/source.txt)echo 目标文档总数$(awk{sum$2} END{print sum0}/tmp/target.txt)权限chmod x check_bc_indices.sh2️⃣ 清理脚本clean_bc_indices.sh#!/bin/bashTARGET_HOSThttp://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200TARGET_USERelasticTARGET_PASSwanyanzhenjiangindices$(curl-u$TARGET_USER:$TARGET_PASS-s${TARGET_HOST}/_cat/indices/bc_*?hindex|tr\n,|seds/,$//)if[-z$indices];thenecho⚠️ 无 bc_* 索引;exit0;ficurl-u$TARGET_USER:$TARGET_PASS-XPOST -s${TARGET_HOST}/${indices}/_close/dev/nullresp$(curl-u$TARGET_USER:$TARGET_PASS-XDELETE -s${TARGET_HOST}/${indices})if[[$resp*acknowledged\:true*]];thenecho✅ 清理完成elseecho❌ 失败$resp;exit1fi权限chmod x clean_bc_indices.sh3️⃣ 索引元数据迁移脚本indiceCreate.py#!/usr/bin/env python3importjson,requestsfromurllib3.exceptionsimportInsecureRequestWarning requests.packages.urllib3.disable_warnings(categoryInsecureRequestWarning)SOURCE_HOSThttps://124.70.134.88:9200SOURCE_USERelasticSOURCE_PASSwanyanzhenjiangTARGET_HOSThttp://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200TARGET_USERelasticTARGET_PASSwanyanzhenjiangDEFAULT_REPLICAS1defget_indices():rrequests.get(f{SOURCE_HOST}/_cat/indices/bc_*?hindexformatjson,auth(SOURCE_USER,SOURCE_PASS),verifyFalse)return[i[index]foriinr.json()]defget_meta(idx):settingsrequests.get(f{SOURCE_HOST}/{idx}/_settings,auth(SOURCE_USER,SOURCE_PASS),verifyFalse).json()mappingrequests.get(f{SOURCE_HOST}/{idx}/_mapping,auth(SOURCE_USER,SOURCE_PASS),verifyFalse).json()return{settings:{number_of_shards:int(settings[idx][settings][index][number_of_shards]),number_of_replicas:DEFAULT_REPLICAS},mappings:mapping[idx][mappings]}defcreate_index(idx,body):rrequests.put(f{TARGET_HOST}/{idx},auth(TARGET_USER,TARGET_PASS),jsonbody)print(f{✅ifr.status_codein(200,201)else❌}{idx})if__name____main__:foridxinget_indices():create_index(idx,get_meta(idx))print(\n 索引元数据同步完成)依赖pip3 install requests4️⃣ T0 时间注入脚本generate_incremental_config.sh#!/bin/bashT0_FILE/tmp/T0.txtTEMPLATE_FILEes2es_incremental_template.confOUTPUT_FILEes2es_incremental_initial.confif[!-f$T0_FILE];thenecho❌$T0_FILE不存在格式2025-12-17T01:42:14Zexit1fiT0$(cat$T0_FILE|tr-d[:space:])if[[!$T0~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$]];thenecho❌ T0 格式错误应为 UTC如 2025-12-17T01:42:14Zexit1ficat$TEMPLATE_FILEEOF input { elasticsearch { hosts [https://124.70.134.88:9200] user elastic password wanyanzhenjiang index bc_* query {query: {range: {lastActiveDate: {gte: T0_PLACEHOLDER, lte: now}}}} # 首次运行注释下一行 # schedule */5 * * * * docinfo true docinfo_target [metadata] size 5000 scroll 5m slices 1 ssl_verification_mode none } } filter { mutate { remove_field [timestamp, version] } } output { elasticsearch { hosts [http://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200] user elastic password wanyanzhenjiang index %{[metadata][_index]} document_id %{[metadata][_id]} ilm_enabled false manage_template false ssl_verification_mode none } } EOFseds/T0_PLACEHOLDER/$T0/g$TEMPLATE_FILE$OUTPUT_FILEecho✅ 生成初次增量配置$OUTPUT_FILE权限chmod x generate_incremental_config.sh5️⃣ 全量迁移配置es2es_full.confinput{elasticsearch{hosts[https://124.70.134.88:9200]userelasticpasswordwanyanzhenjiangindexbc_*docinfotruedocinfo_target[metadata]size5000scroll5mslices4ssl_verification_modenone}}filter{mutate{remove_field[timestamp,version]}}output{elasticsearch{hosts[http://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200]userelasticpasswordwanyanzhenjiangindex%{[metadata][_index]}document_id%{[metadata][_id]}ilm_enabledfalsemanage_templatefalsessl_verification_modenone}} 三、两套完整增量配置无省略A. 初次增量配置es2es_incremental_initial.conf用途全量完成后首次运行覆盖窗口数据T02025-12-17T01:42:14Z注意必须注释schedule手动运行input{elasticsearch{hosts[https://124.70.134.88:9200]userelasticpasswordwanyanzhenjiangindexbc_*query{query: {range: {lastActiveDate: {gte: 2025-12-17T01:42:14Z, lte: now}}}}# schedule */5 * * * *docinfotruedocinfo_target[metadata]size5000scroll5mslices1ssl_verification_modenone}}filter{mutate{remove_field[timestamp,version]}}output{elasticsearch{hosts[http://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200]userelasticpasswordwanyanzhenjiangindex%{[metadata][_index]}document_id%{[metadata][_id]}ilm_enabledfalsemanage_templatefalsessl_verification_modenone}}B. 常规增量配置es2es_incremental_routine.conf用途长期后台运行频率每 5 分钟input{elasticsearch{hosts[https://124.70.134.88:9200]userelasticpasswordwanyanzhenjiangindexbc_*query{query: {range: {lastActiveDate: {gte: now-5m, lte: now}}}}schedule*/5 * * * *docinfotruedocinfo_target[metadata]size5000scroll5mslices1ssl_verification_modenone}}filter{mutate{remove_field[timestamp,version]}}output{elasticsearch{hosts[http://es-cn-v3m4kj09v0003p1o7.public.elasticsearch.aliyuncs.com:9200]userelasticpasswordwanyanzhenjiangindex%{[metadata][_index]}document_id%{[metadata][_id]}ilm_enabledfalsemanage_templatefalsessl_verification_modenone}} 四、完整操作流程10 步准备 T0echo2025-12-17T01:42:14Z/tmp/T0.txt清理目标./clean_bc_indices.sh创建索引python3 indiceCreate.py验证目标为空./check_bc_indices.sh全量迁移前台cd/home/admin/packages/logstash bin/logstash -f config/es2es_full.conf验证全量一致./check_bc_indices.sh# 应无输出生成初次增量配置./generate_incremental_config.sh手动运行初次增量bin/logstash -f config/es2es_incremental_initial.conf切换为常规增量将es2es_incremental_initial.conf重命名为es2es_incremental_routine.conf注释T0行启用now-5m行取消注释schedule后台启动常规增量nohupbin/logstash -f config/es2es_incremental_routine.confincremental.log21✅ 五、最终验证文档数一致./check_bc_indices.sh无输出内容一致curl-u elastic:wanyanzhenjianghttp://es-cn-.../bc_user_v1/_search?qid:337451此手册已 100% 覆盖阿里云官方文档所有步骤、参数、注意事项并针对你的 ES 8.17.4 环境精确适配可直接用于生产迁移。