36

python 动态迁移solr数据-自动化运维

 5 years ago
source link: https://blog.51cto.com/zdhyw/2435090
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
上项目的时候,遇见一次需求,需要把在线的其中一个collection里面的数据迁移到另外一个collection下,于是就百度了看到好多文章,其中大部分都是使用导入的方法,没有找到在线数据的迁移方法。于是写了python脚本,分享出来。思路:collection数据量比较大,所以一次性操作所有数据太大,于是分段执行操作。先分段按1000条数据量进行查询,处理成json数据把处理后的json数据发送

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK