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.

  • What is MongoDB version(x,y,z)? – Md Haidar Ali Khan Dec 4 '18 at 10:26
  • MongoDB Version 4 – Varsh Dec 4 '18 at 11:32

You can with this command rename your collection:

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.