5

I hope you can help me. It is a question that was asked before, but I have tried all solutions, and simply cannot get it right.

I have spend quite some time researching before posting this question. I have looked at the official MongoDB documents and many other blogs.

How can I make a DB backup/dump remotely, as well as restore that dumb locally?

This is what I have thus far:

Running this from a new CMD prompt shell:

C:\Users\Admin>mongodump --host 10.13.9.210 -d C:\Program Files\MongoDB\Server\3.0\bin --port 29039 --out /backup/mongodump-2015-11-13

I get this error:

2015-11-13T10:26:41.371+0200    error parsing command line options: expected argument for flag `/o, /out', but got option `/backup/mongodump-2015-11-13'
2015-11-13T10:26:41.371+0200    try 'mongodump --help' for more information

Secondly; how will I be able to restore this backup locally?

Thank you in advance!

onmyway
  • 1,435
  • 3
  • 29
  • 53
  • 1
    Not a programming question, for which StackOverflow is for, Your question is about database administration and utilities. Ask on [dba.stackexchange.com](http://dba.stackexchange.com) instead. If it has not already been answered there already. – Blakes Seven Nov 13 '15 at 08:35
  • try putting double quotes around the path name – astroanu Nov 13 '15 at 08:40
  • Thanks, Blakes. i have only now come across the dba.stacexchange.com forum. Do I remove my post here and re-post it there? – onmyway Nov 13 '15 at 08:56
  • @onmyway yes, remove it here and post there. One thing to keep in mind: you will not be able to comment on DBA until you have gained 50 reputation points. – Dmytro Shevchenko Nov 13 '15 at 09:22
  • I'm voting to close this question as off-topic because it was moved and answered on [SE.DBA](http://dba.stackexchange.com/questions/120972/creating-a-mongodb-backup-dump-on-remote-server-via-local-cmd-shell). – Uyghur Lives Matter Nov 14 '15 at 16:14

1 Answers1

7

You need to add a dot at the start of the out path. "./backup/mongodump-2015-11-13" instead of "/backup/mongodump-2015-11-13"

Jacob
  • 71
  • 1
  • 2