To answer your question. No! There is no fail on your logic and it should work without problems. However, if LVM snapshots can be used, it's better way to do backups.
On Linux and Mac, arguments for command-line tools normally have one of these two formats:
--option1 value1
or -o value1
.
On Windows, the standard is different:
/option1 value1
or /o value1
.
mongo
, mongodump
and other command-line MongoDB programs actually preserve the Linux way of passing arguments. But the Windows cmd.exe
shell will still recognize the character /
as a beginning of a command-line option.
Also, in UNIX systems, /
is used to separated parts of a file system path, e.g. /data/db
. On Windows, \
is used instead: C:\Data\DB
.
Your problem is this part of the command: --out /backup/mongodump-2015-11-13
. You kept the backup path in the UNIX format, and /
was recognized as a starting character of a command-line option.
You should specify a real file system path on your hard drive instead. For example:
--out C:\backup\mongodump-2015-11-13
Also, your data path (C:\Program Files\MongoDB\Server\3.0\bin
) contains a space. Because of the space, cmd.exe
will treat C:\Program
and Files\MongoDB\Server\3.0\bin
as separate parameters. To prevent this, surround the path with quotes:
-d "C:\Program Files\MongoDB\Server\3.0\bin"
And as a final note, do not use the bin
folder to store your data files (as you seem to be doing judging by the path you're passing to -d
).
Best Answer
Community wiki answer:
*.wt
are binary data files used by the WiredTiger storage engine. Individual files are not usable as a standalone backup. If you want to take a file copy backup of a MongoDBdbPath
you need to include all of the files using a Supported File Copy Backup Method.If you have a valid file backup you can use it as the
dbPath
for anothermongod
instance. Aside from copying files, there is no restore special restore process for a file copy backup.Can you clarify what files you have in your backup?