I know mongod --dbpath <mypath>
will assign the directory. Is there a quick command-line way to spit out its path?
After all my data were supposedly migrated to a new laptop from my old one, I'm just trying to plug back into that old directory. I don't remember if it was /data/db or somewhere custom, but when I got the machine back, there was no /data/db.
Right now, when I try to start this new mongo installation I get:
I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
I CONTROL [initandlisten] dbexit: rc: 100
I didn't have a mongo.conf file before, but if there's no way to discover the old directory, seems like I should make one now, if for no other reason than to have a record of it.
Kinda hard to believe there's not a simple command or environment variable or something for this.