Skip to content

Instantly share code, notes, and snippets.

@myctw
myctw / mongodump_multi_collections.sh
Last active February 6, 2024 00:00
Mongodb dump multiple collections script
#!/bin/bash
host=127.0.0.1
port=27017
authDB=admin
db=[YourDB]
user=root
pwd=[YourPassword]
collections="[Collection1] [Collection2]"
output_folder="./export/"