elasticsearch升级步骤

ES从1.2.1升级到1.4.0

升级步骤,基本上是按照官网的叙述来完成的,链接是:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-upgrade.html#_1_0_and_later,参考的内容如下:

1.0 and lateredit

To back up a running 1.0 or later system, it is simplest to use the snapshot feature. Complete instructions for backup and restore with snapshots are available here.

rolling upgrade processedit

A rolling upgrade allows the ES cluster to be upgraded one node at a time, with no observable downtime for end users. Running multiple versions of Elasticsearch in the same cluster for any length of time beyond that required for an upgrade is not supported, as shard replication from the more recent version to the previous versions will not work.

Within minor or maintenance releases after release 1.0, rolling upgrades are supported. To perform a rolling upgrade:

Disable shard reallocation (optional). This is done to allow for a faster startup after cluster shutdown. If this step is not performed, the nodes will immediately start trying to replicate shards to each other on startup and will spend a lot of time on wasted I/O. With shard reallocation disabled, the nodes will join the cluster with their indices intact, without attempting to rebalance. After startup is complete, reallocation will be turned back on.
This syntax applies to Elasticsearch 1.0 and later:

        curl -XPUT localhost:9200/_cluster/settings -d ‘{
                "transient" : {
                    "cluster.routing.allocation.enable" : "none"
                }
        }‘
Shut down a single node within the cluster.
curl -XPOST ‘http://localhost:9200/_cluster/nodes/_local/_shutdown‘
Confirm that all shards are correctly reallocated to the remaining running nodes.
Upgrade the stopped node. To upgrade using a zip or compressed tarball from elasticsearch.org:

Extract the zip or tarball to a new directory, usually in the same volume as the current Elasticsearch installation. Do not overwrite the existing installation, as the downloaded archive will contain a default elasticsearch.yml file and will overwrite your existing configuration.
Copy the configuration files from the old Elasticsearch installation’s config directory to the new Elasticsearch installation’s config directory. Move data files from the old Elasticsesarch installation’s data directory if necessary. If data files are not located within the tarball’s extraction directory, they will not have to be moved.
The simplest solution for moving from one version to another is to have a symbolic link for elasticsearch that points to the currently running version. This link can be easily updated and will provide a stable access point to the most recent version. Update this symbolic link if it is being used.
To upgrade using a .deb or .rpm package:

Use rpm or dpkg to install the new package. All files should be placed in their proper locations, and config files should not be overwritten.
Start the now upgraded node. Confirm that it joins the cluster.
Re-enable shard reallocation:
        curl -XPUT localhost:9200/_cluster/settings -d ‘{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }‘
Observe that all shards are properly allocated on all nodes. Balancing may take some time.
Repeat this process for all remaining nodes.
It may be possible to perform the upgrade by installing the new software while the service is running. This would reduce downtime by ensuring the service was ready to run on the new version as soon as it is stopped on the node being upgraded. This can be done by installing the new version in its own directory and using the symbolic link method outlined above. It is important to test this procedure first to be sure that site-specific configuration data and production indices will not be overwritten during the upgrade process.

刚开始的时候比较担心数据迁移问题,后来发现可以在配置文件中修改索引数据的路径,或者按照上文提示,直接把配置文件,索引数据文件,插件目录等拷贝过去后,重启当前节点,然后执行下面的命令即可.

curl -XPUT localhost:9200/_cluster/settings -d ‘{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }‘
时间: 2024-10-11 04:47:35

elasticsearch升级步骤的相关文章

MTK MOTA升级步骤

MOTA的前提是有自己的服务器,MTK已经做好了的,可以向MTK申请,然后移到自己的服务器上来. 1.打开ProjectConfig.mk中的MTK_SYSTEM_UPDATE_SUPPORT宏,修改IP地址mediatek\packages\apps\SystemUpdate\res\values\address.xml中的所以IP地址改为自己的服务器地址 2.如果要把升级关键字改为版本号,那么需要改2个文件 SystemUpdateReceiver.java //String strCurr

思科VSS License升级步骤

思科VSS License升级步骤:1.关闭standby所有非VSL端口int range gigabitethernet 2/2/1 - 12shint range gigabitethernet 2/3/1 - 12sh 2.在active上安装license:license install bootflash:SPE16220060_201309210212042440.lic 3.在active上关闭VSL端口int ra Tengigabitethernet 1/1/2 - 4sh

mongo - 升级步骤

升级步骤1. 关闭balancer登陆mongos,执行sh.stopBalancer(),或者 连接到mongos>use config>db.settings.update( { _id: "balancer" }, { $set : { stopped: true } } , true ); 关闭balancer后,需检查是否还有migretion:If a migration is in progress, the system will complete the

代码服务升级步骤整理

1.首先使用VNC Viewer登录到 代码服务器(192.168.12.167),然后更新项目MIS_Release 将代码更新. 2.将更新的项目 添加到压缩文件,压缩为.zip.将该.zip包复制到本地. 3.远程登录 172.16.4.2 服务器,将2步骤中的.zip包复制到该系统中D:/AUTOUPLOAD 文件夹下并解压,将项目名称改为mis. 4.找到C盘下运行说明文件,粘贴其中命令,并在cmd窗口中,C盘根下运行粘贴的命令. 5.会自动部署项目,进行服务升级 ----------

PG数据库升级步骤说明(pg_dumpall和pg_upgrade)

一.数据库升级9.4到9.5 1.pg_dump导入导出(数据量不大时使用) postgres用户登录 $ pg_dumpall > db_export.out $ env|grep LANG LANG=en_US.UTF-8 如果数据库字符集为en_US.UTF-8,系统字符集为zh_CN.UTF-8 导入步骤为 postgres用户登录 $export LANG=en_US.UTF-8 $psql -f db_export.out postgres 2.pg_upgrade(pg_upgra

架构师更多的是和人打交道,说说我见到和听说到的架构师升级步骤和平时的工作内容

之前有网友说想看架构师升级的文章,所以写了本文.先给本文中架构师做个定义:第一,能力上达到(似乎是废话),第二,公司肯承认,不仅能给架构师的头衔,更能按架构师的标准发工资. 对于程序员来说,架构师是职业发展的一道坎,如果跨过去了,后面就前途无量了,否则可能一直得做着代码coding的事情.本文将从“如何升级”和“平时工作内容”两方面,说下我对架构师的认识. 1  先说下大家对架构师认识的误区 1 架构师不是不食人间烟火,不是只在一个人的隔间里设计架构,而是需要和产品方,需求方,程序员等各路人马打

架构师升级步骤和平时的工作内容!

之前有网友说想看架构师升级的文章,所以写了本文.先给本文中架构师做个定义:第一,能力上达到(似乎是废话),第二,公司肯承认,不仅能给架构师的头衔,更能按架构师的标准发工资. 对于程序员来说,架构师是职业发展的一道坎,如果跨过去了,后面就前途无量了,否则可能一直得做着代码coding的事情.本文将从"如何升级"和"平时工作内容"两方面,说下我对架构师的认识. 一.先说下大家对架构师认识的误区 1.架构师不是不食人间烟火,不是只在一个人的隔间里设计架构,而是需要和产品方

AIX 系统补丁升级步骤

1.升级之前建议备份 rootvg (推荐) # smit mksysb 2.检查系统版本号 # oslevel -r 3.找到补丁光盘或者下载补丁,上传到服务器中 http://www-933.ibm.com/eserver/support/fixes/fixcentral 4.开始升级操作 # smit update_all 注意这个选项改成 yes ACCEPT new licence agreements?               yes 5.重起服务器 # shutdown -Fr

Linux下python版本的升级步骤

1.先下载,你要升级的python版本(我升级的是python3.3.0) 可使用系统自带下载工具wget下载: wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz 你也可以访问  http://www.python.org/ftp/python/ ,直接下载到系统中 提示下:你使用wget下载后,下载的文件,在你当前的工作目录中.(别下载后,找不到文件哈) 2.准备工作 解压下载好的文件: @1,可以使用linux系统 右键