Where to pay special attention to the import and export of Redis

Source: Internet
Author: User

Today under heavy rain, do not want to go out to run business and visit customers, ready to have a good rest, but, less than eight phone rang, said a redis migration is unsuccessful, hurriedly get up to work, sad urge Ah!


In general, this is the case: the Redis client from a development server executes the save instruction, obtains a dump. rdb file, and copies the file to the data directory of the new Redis system (the data directory is specified by the Redis configuration file) But after restarting Redis-server, the data is empty.

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/84/60/wKioL1eO8a3gd907AAC8TLmwnts191.jpg-wh_500x0-wm_3 -wmp_4-s_800103854.jpg "title=" redis01.jpg "alt=" Wkiol1eo8a3gd907aac8tlmwnts191.jpg-wh_50 "/>


It seems that the other side could not, had to even VPN login system, view configuration files, processes and so on. In the log found some warning, worry is caused by these problems, and made a change, the content of the two parts:

1, modify the system parameter file/etc/sysctl.conf, add the following line:

Net.core.somaxconn = 10000

Vm.overcommit_memory = 1

2. Add a line in/etc/rc.local

echo never >/sys/kernel/mm/transparent_hugepage/enabled

After the modification, execute sysctl-p to make the kernel parameters take effect; command line execute echo never >/sys/kernel/mm/transparent_hugepage/enabled , restarting Redis is still invalid. Toss a good burst, is also the same, it seems that the problem is not here Ah!


Suddenly think of a friend, also use Redis Ah, immediately ask for help, asked if he is the export of Redis and target Redis is not consistent (installation path consistent, name consistent, configuration file consistent, log path, etc.), the reply is like this. So inform the other side, the proposal to deal with the two sides to the same (the development machine I can not access, in his office, so do not know what is the same), he is not very willing to carry out, I said now, only try it!


After the change to the same, the message came, OK! Boarded to view, sure enough!

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/84/60/wKiom1eO9TSjF3ESAAL3M0JBUUY841.jpg-wh_500x0-wm_3 -wmp_4-s_1538346121.jpg "title=" redis02.jpg "alt=" Wkiom1eo9tsjf3esaal3m0jbuuy841.jpg-wh_50 "/>



This article is from the "Sery" blog, make sure to keep this source http://sery.blog.51cto.com/10037/1828014

Where to pay special attention to the import and export of Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.