DoingItNow
DoingItNow

Reputation: 91

Putting mongorestore output into a file

Is there a way to put the mongorestore output it spits out from the command line into a file? This is for Linux/Unix

mongorestore --port $MONGO_PORT --db $database --archive=$BACKUP_NAME.archive >> log_file creates an empty file.

Any help would be appreicated.

Upvotes: 1

Views: 2320

Answers (1)

DoingItNow
DoingItNow

Reputation: 91

using dir > a.txt 2>&1 or something along the lines of that solved my issue.

Upvotes: 0

Related Questions