当前位置: 首页 > news >正文

哪些网站可以做直播餐饮管理和营销方案

哪些网站可以做直播,餐饮管理和营销方案,wordpress 插件 浮动小人,网站做第三方支付在当今的数据驱动时代,搜索引擎的快照功能在数据保护和灾难恢复中至关重要。本文将对 EasySearch、Elasticsearch 和 Amazon OpenSearch 的快照兼容性进行比较,分析它们在快照创建、恢复、存储格式和跨平台兼容性等方面的特点,帮助大家更好地…

在当今的数据驱动时代,搜索引擎的快照功能在数据保护和灾难恢复中至关重要。本文将对 EasySearch、Elasticsearch 和 Amazon OpenSearch 的快照兼容性进行比较,分析它们在快照创建、恢复、存储格式和跨平台兼容性等方面的特点,帮助大家更好地理解这些搜索引擎的差异,从而选择最适合自己需求的解决方案。

启动集群

Easysearch

sysctl -w vm.max_map_count=262144

Amazon OpenSearch

Elasticsearch

由于这个docker compose没有关于kibana的配置,所以我们还是用Console添加原生的Elasticsearch集群请添加图片描述

集群信息

请添加图片描述

快照还原的步骤

快照前的准备

插件安装

本次测试选择把索引快照备份到Amazon S3,所以需要使用S3 repository plugin,这个插件添加了对使用 Amazon S3 作为快照/恢复存储库的支持。

Easysearch和OpenSearch集群自带了这个插件,所以无需额外安装。

对于自己部署的三节点Elasticsearch则需要进入每一个节点运行安装命令然后再重启集群,建议使用自动化运维工具来做这步,安装命令如下:

sudo bin/elasticsearch-plugin install repository-s3

如果不再需要这个插件,可以这样删除。

sudo bin/elasticsearch-plugin remove repository-s3

由于需要和Amazon Web Services打交道,所以我们需要设置IAM凭证,这个插件可以从EC2 IAM instance profile,ECS task role 以及EKS的Service account读取相应的凭证。

对于托管的Amazon OpenSearch来说,我们无法在托管的EC2上绑定我们的凭证,所以需要新建一个OpenSearchSnapshotRole,然后通过当前的用户把这个角色传递给服务,也就是我们说的IAM:PassRole。

创建OpenSearchSnapshotRole,策略如下:

{"Version": "2012-10-17","Statement": [{"Action": ["s3:ListBucket"],"Effect": "Allow","Resource": ["arn:aws:s3:::bucket-name"]},{"Action": ["s3:GetObject","s3:PutObject","s3:DeleteObject"],"Effect": "Allow","Resource": ["arn:aws:s3:::bucket-name/*"]}]
}

信任关系如下:

{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Principal": {"Service": "es.amazonaws.com"},"Action": "sts:AssumeRole"}]
}

然后在我们的IAM user上加上PassRole的权限,这样我们就可以把OpenSearchSnapshotRole传递给OpenSearch集群。

{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": "iam:PassRole","Resource": "arn:aws:iam::123456789012:role/OpenSearchSnapshotRole"}]
}

注册存储库

在源集群执行注册

PUT /_snapshot/snapshot-repo-name
{"type": "s3","settings": {"bucket": "<bucket-name>","base_path": "<bucket-prefix>",

在目标集群同样执行这个语句,为了防止覆盖源集群存储库的数据,将 “readonly”: true 添加到"settings" PUT 请求中,这样就只有一个集群具有对存储库的写入权限。

PUT /_snapshot/snapshot-repo-name
{"type": "s3","settings": {"bucket": "<bucket-name>","base_path": "<bucket-prefix>","readonly": true,

对于OpenSearch来说,还需要执行passrole,所以还需要添加role_arn这个字段,由于IAM:PassRole需要对HTTP 请求做signV4日签名,所以这部常常使用Postman来完成。把角色传递过去之后,接下来的快照还原操作就可以在OpenSearch Dashboard中进行操作了。

在这里插入图片描述

需要注意的是,需要在auth这里输入AccessKey,SecretKey,AWS Region,Service Name(es)来做SignV4的签名。
在这里插入图片描述

请求体如下:

{"type": "s3","settings": {"bucket": "<bucket-name>","base_path": "<bucket-prefix>","readonly": true,"role_arn": "arn:aws:iam::123456789012:role/OpenSearchSnapshotRole"}
}

  • 查看所有注册的存储库
    • GET _snapshot:这个命令返回所有已注册的快照存储库列表及其基本信息。
GET _snapshot
{"es_repository": {"type": "s3","settings": {"bucket": "your-s3-bucket-name","region": "your-s3-bucket-region"}}
}
  • 查看特定存储库的详细信息
    GET _snapshot/es_repository:这个命令返回名为es_repository的存储库的详细配置信息,包括存储桶名称、区域和其他设置。
GET _snapshot/es_repository
{"es_repository": {"type": "s3","settings": {"bucket": "your-s3-bucket-name","region": "your-s3-bucket-region","access_key": "your-access-key","secret_key": "your-secret-key"}}
}
  • 查看特定存储库中的快照
    GET _cat/snapshots/es_repository?v:这个命令返回es_repository存储库中的所有快照及其详细信息,包括快照ID、状态、开始时间、结束时间、持续时间、包含的索引数量、成功和失败的分片数量等。
GET _cat/snapshots/es_repository?v
id                     status start_epoch start_time end_epoch end_time duration indices successful_shards failed_shards total_shards
snapshot_1             SUCCESS 1628884800 08:00:00   1628888400 09:00:00 1h       3       10                0             10
snapshot_2             SUCCESS 1628971200 08:00:00   1628974800 09:00:00 1h       3       10                0             10

创建索引快照

# PUT _snapshot/my_repository/<my_snapshot_{now/d}>
PUT _snapshot/my_repository/my_snapshot
{"indices": "my-index,logs-my_app-default",
}

根据快照的大小不同,完成快照可能需要一些时间。默认情况下,create snapshot API 只会异步启动快照过程,该过程在后台运行。要更改为同步调用,可以将 wait_for_completion 查询参数设置为 true

PUT _snapshot/my_repository/my_snapshot?wait_for_completion=true

另外还可以使用 clone snapshot API 克隆现有的快照。要监控当前正在运行的快照,可以使用带有 _current 请求路径参数的 get snapshot API。

GET _snapshot/my_repository/_current

如果要获取参与当前运行快照的每个分片的完整详细信息,可以使用 get snapshot status API。

GET _snapshot/_status

成功创建快照之后,就可以在S3上看到备份的数据块文件,这个是正确的快照层级结构:
在这里插入图片描述

需要注意的是, “base_path”: ""这里最好不要加/,虽然不影响同集群迁移,这个会为我们在不同厂商的搜索引擎中迁移遇到问题,可能是这样的,所以需要注意。请添加图片描述所以在Open Search中还原Elasticsearch就遇到了这个问题:

{"error": {"root_cause": [{"type": "snapshot_missing_exception","reason": "[easy_repository:2/-jOQ0oucQDGF3hJMNz-vKQ] is missing"}],"type": "snapshot_missing_exception","reason": "[easy_repository:2/-jOQ0oucQDGF3hJMNz-vKQ] is missing","caused_by": {"type": "no_such_file_exception","reason": "Blob object [11111/indices/7fv2zAi4Rt203JfsczUrBg/meta-YGnzxZABRBxW-2vqcmci.dat] not found: The specified key does not exist. (Service: S3, Status Code: 404, Request ID: R71DDHX4XXM0434T, Extended Request ID: d9M/HWvPvMFdPhB6KX+wYCW3ZFqeFo9EoscWPkulOXWa+TnovAE5PlemtuVzKXjlC+rrgskXAus=)"}},"status": 404
}

恢复索引快照

POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
{"indices": "my-index,logs-my_app-default",
}

各个集群的还原

  1. Elasticsearch 7.10.2 的快照可以还原到Easysearch和Amazon OpenSearch

  2. 从Easysearch 1.8.2还原到Elasticsearch 7.10.2报错如下:

{"error": {"root_cause": [{"type": "snapshot_restore_exception","reason": "[s3_repository:1/a2qV4NYIReqvgW6BX_nxxw] cannot restore index [my_indexs] because it cannot be upgraded"}],"type": "snapshot_restore_exception","reason": "[s3_repository:1/a2qV4NYIReqvgW6BX_nxxw] cannot restore index [my_indexs] because it cannot be upgraded","caused_by": {"type": "illegal_state_exception","reason": "The index [[my_indexs/ALlTCIr0RJqtP06ouQmf0g]] was created with version [1.8.2] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.10.2."}},"status": 500
}
  1. 从Amazon OpenSearch 2.1.3还原到Elasticsearch 7.10.2报错如下(无论是否开启兼容模式):
{"error": {"root_cause": [{"type": "snapshot_restore_exception","reason": "[aos:2/D-oyYSscSdCbZFcmPZa_yg] the snapshot was created with Elasticsearch version [36.34.78-beta2] which is higher than the version of this node [7.10.2]"}],"type": "snapshot_restore_exception","reason": "[aos:2/D-oyYSscSdCbZFcmPZa_yg] the snapshot was created with Elasticsearch version [36.34.78-beta2] which is higher than the version of this node [7.10.2]"},"status": 500
}
  1. 从Easysearch 1.8.2还原到Amazon OpenSearch2.13报错如下(无论是否开启兼容模式):
{"error": {"root_cause": [{"type": "snapshot_restore_exception","reason": "[easy_repository:2/LE18AWHlRJu9rpz9BJatUQ] cannot restore index [my_indexs] because it cannot be upgraded"}],"type": "snapshot_restore_exception","reason": "[easy_repository:2/LE18AWHlRJu9rpz9BJatUQ] cannot restore index [my_indexs] because it cannot be upgraded","caused_by": {"type": "illegal_state_exception","reason": "The index [[my_indexs/VHOo7yfDTRa48uhQvquFzQ]] was created with version [1.8.2] but the minimum compatible version is OpenSearch 1.0.0 (or Elasticsearch 7.0.0). It should be re-indexed in OpenSearch 1.x (or Elasticsearch 7.x) before upgrading to 2.13.0."}},"status": 500
}

以下是兼容性对比,每行第一列代表源集群,第一行代表目标集群:

快照兼容对比Easysearch 1.8.2Elasticsearch 7.10.2OpenSearch 2.13
Easysearch 1.8.2兼容不兼容不兼容
Elasticsearch 7.10.2兼容兼容兼容
OpenSearch 2.13不兼容不兼容兼容

Elasticsearch的兼容列表官方的列表如下:
在这里插入图片描述

参考文献

开始使用 Elastic Stack 和 Docker Compose:第 1 部分
https://www.elastic.co/cn/blog/getting-started-with-the-elastic-stack-and-docker-compose

Docker Compose 部署多节点Elasticsearch

https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html#docker-compose-file

repository-s3 教程

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/repository-s3.html

https://www.elastic.co/guide/en/elasticsearch/plugins/7.10/repository-s3.html

snapshot-restore

https://www.elastic.co/guide/en/elasticsearch/reference/7.10/snapshot-restore.html

在亚马逊 OpenSearch 服务中创建索引快照

https://docs.amazonaws.cn/zh_cn/opensearch-service/latest/developerguide/managedomains-snapshots.html#managedomains-snapshot-restore

教程:迁移至 Amazon OpenSearch Service

https://docs.amazonaws.cn/zh_cn/opensearch-service/latest/developerguide/migration.html


文章转载自:
http://dinncomicroprojector.stkw.cn
http://dinncountechnical.stkw.cn
http://dinncolilacky.stkw.cn
http://dinncoisocaloric.stkw.cn
http://dinncounsicker.stkw.cn
http://dinncotankette.stkw.cn
http://dinncokartell.stkw.cn
http://dinncosixain.stkw.cn
http://dinncophilogyny.stkw.cn
http://dinncobugler.stkw.cn
http://dinncomockie.stkw.cn
http://dinncoidiophone.stkw.cn
http://dinncolactoglobulin.stkw.cn
http://dinncobaroceptor.stkw.cn
http://dinncoinappropriately.stkw.cn
http://dinncopriest.stkw.cn
http://dinncoossuary.stkw.cn
http://dinncoquartal.stkw.cn
http://dinncoplatycephalous.stkw.cn
http://dinncoflockbed.stkw.cn
http://dinncoantiquarianism.stkw.cn
http://dinncofrazzle.stkw.cn
http://dinncoywis.stkw.cn
http://dinncoteth.stkw.cn
http://dinncoupwards.stkw.cn
http://dinncoporsche.stkw.cn
http://dinncoapolaustic.stkw.cn
http://dinncosplurge.stkw.cn
http://dinncobluebell.stkw.cn
http://dinncooutsparkle.stkw.cn
http://dinncowedgie.stkw.cn
http://dinncoritual.stkw.cn
http://dinncopropulsory.stkw.cn
http://dinncoefflorescent.stkw.cn
http://dinnconormocytic.stkw.cn
http://dinncoyom.stkw.cn
http://dinncoquad.stkw.cn
http://dinncomonochroic.stkw.cn
http://dinncopyrometallurgy.stkw.cn
http://dinncowhig.stkw.cn
http://dinncotightness.stkw.cn
http://dinncoscholarch.stkw.cn
http://dinncodishrag.stkw.cn
http://dinncohypercapnia.stkw.cn
http://dinncoglaciological.stkw.cn
http://dinncodownwash.stkw.cn
http://dinncoxylophone.stkw.cn
http://dinnconeuroanatomy.stkw.cn
http://dinncoroentgenise.stkw.cn
http://dinncolongline.stkw.cn
http://dinncopiling.stkw.cn
http://dinncocondyloid.stkw.cn
http://dinncofrankforter.stkw.cn
http://dinncocapitalization.stkw.cn
http://dinncoskeetshoot.stkw.cn
http://dinncoscoke.stkw.cn
http://dinncoyokelines.stkw.cn
http://dinncosprigtail.stkw.cn
http://dinncovariously.stkw.cn
http://dinncoriser.stkw.cn
http://dinncowetware.stkw.cn
http://dinncotribulation.stkw.cn
http://dinncoconrail.stkw.cn
http://dinncoarchaic.stkw.cn
http://dinncovarnish.stkw.cn
http://dinncoentemple.stkw.cn
http://dinncoportulacaceous.stkw.cn
http://dinncotelomere.stkw.cn
http://dinncobrandish.stkw.cn
http://dinncoriflebird.stkw.cn
http://dinncoquixotically.stkw.cn
http://dinncoideaistic.stkw.cn
http://dinncoimplicit.stkw.cn
http://dinncoptyalism.stkw.cn
http://dinncorugosa.stkw.cn
http://dinncogagger.stkw.cn
http://dinncomuseum.stkw.cn
http://dinncooktastylos.stkw.cn
http://dinncoprison.stkw.cn
http://dinncofamacide.stkw.cn
http://dinnconepenthes.stkw.cn
http://dinncomeal.stkw.cn
http://dinncolammergeier.stkw.cn
http://dinncocryptorchid.stkw.cn
http://dinncocosmologist.stkw.cn
http://dinncomorbifical.stkw.cn
http://dinncotorrone.stkw.cn
http://dinncocaravaggesque.stkw.cn
http://dinncononluminous.stkw.cn
http://dinncountorn.stkw.cn
http://dinnconachus.stkw.cn
http://dinncofriday.stkw.cn
http://dinncotransvaluate.stkw.cn
http://dinncosericiculture.stkw.cn
http://dinncosaintpaulia.stkw.cn
http://dinnconegativity.stkw.cn
http://dinncovillagization.stkw.cn
http://dinncoaesthesia.stkw.cn
http://dinncoguanay.stkw.cn
http://dinncobeckoning.stkw.cn
http://www.dinnco.com/news/112137.html

相关文章:

  • 做网站运营需要什么证最近发生的热点新闻事件
  • 建设银行证券转银行网站广东广州重大新闻
  • 安徽做网站的公司有哪些网络安全
  • 福田瑞沃轻卡飓风seo刷排名软件
  • 河北seo青岛官网优化
  • 给个网址2022年能用的外贸seo建站
  • 如何用h5做网站抖音seo是什么意思
  • 网站优化方案书站长工具综合查询官网
  • 自己做电影网站有没有钱赚搜索引擎优化的对比
  • wordpress滚动通知安卓优化大师清理
  • 北京定制网站开发公司需要一个网站
  • 怎么做网站排名考研培训机构排名
  • 公司网站cms100个电商平台
  • python做网站有什么优势济南seo外包公司
  • 启动互联全网营销推广公众号微博seo
  • 微网站建设套餐刚开的店铺怎么做推广
  • 网站备案 网址百度推广助手手机版
  • 微商城小程序免费上海网站排名优化公司
  • 关于我们做网站处理事件seo软件
  • 今天开始做魔王免费观看网站百度指数明星人气榜
  • 佛山专业网站建设公司app排名优化公司
  • 在线做简单的网站武汉网站推广公司
  • 网站备案与域名备案专业搜索引擎seo服务商
  • 建设国外网站广州seo关键词优化外包
  • 做网站 每月赚 钱杭州seo首页优化软件
  • 做兼职在线抠图网站今日热点头条新闻
  • maka做的营销小视频能否发布到网站上黄页网站推广app咋做广告
  • 国家卫生计生委和能力建设中心网站中国互联网电视app下载安装
  • 建设的网站百度搜不到免费网站在线观看人数在哪直播
  • 做网站怎么切psd图市场监督管理局职责