歪麦博客
  • 首页
  • PHP启示录
  • PHP设计模式
  • 技术
  • 关于&捐赠
  • 语言

Tag: MongoDB

How to transfer data between different mongodb instance?

2023-03-25 84 Technical, 记录 MongoDB Leave a Comment
Here is the python code to transfer data between different mongo instance: def transfer(source_collection, dest_collection, batch_size: int): offset = 0 total = source_collection.count_documents({}) total_inserted = 0 while True: documents = source_collection.find().skip(offset).limit(batch_size) data = list(do…

标签云

Android CentOS cURL Dart Docker flutter git Java JavaScript JQuery Json Linux MVC MySQL MySQL优化 Nginx Opencart PHP PHP-FPM PHP7 PHPStorm PHP框架 PHP调试 Python Redis scrapy Session spring boot ThinkPHP Ubuntu VirtualBox Windows WordPress Yaf教程 下载 函数 压缩 性能分析 数据库 数组 爬虫 算法 缓存 虚拟机 随机数
Theme: Maizi. Powered by WordPress.