I want to take a collections data backup on a different host, with renaming the Collections.
I am very new to MongoDB. Please help me with this task.
I want to take a collections data backup on a different host, with renaming the Collections.
I am very new to MongoDB. Please help me with this task.
You can with this command rename your collection:
db.rrecord.renameCollection("record")
Then backup with this:
mongodump --host mongodb1.example.net --port 3017 --username user --password "pass" --out /opt/backup/file
Tip: You can specify different host for save your backup file.