Gary' Blog
  • Home
  • Github
  • English
    English中文 (中国)

Tag: MongoDB

How to transfer data between different mongodb instance?

2023-03-25 83 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…

Tag Cloud

American Companies ASR Authentication Azure Careers Cloudflare cURL Debian Email ESXi ESXi 8 FastAPi ffmpeg Fortune 500 Jobs Jupyter Kafka Keycloak LinkedIn MacOS MySQL OpenAI pip Plugin Python RDP Remote Connect Reverse Proxy RSS rustdesk Samba Screen Sharing sleep mode SMTP spring boot ssh Thymeleaf tunnel Ubuntu uv VNC Windo Windows WordPress ZeroTrust
Theme: Maizi. Powered by WordPress.