-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Currently the server logs are created with the command find $MONGO_ORCHESTRATION_HOME -name *.log | xargs tar czf mongodb-logs.tar.gz, which is deeply nested and includes a hidden folder. If we instead run the following script, it will include just the top level files along with their folder name, e.g. mongod-nsp9w_oo_mongod.log:
mkdir out_dir
find $MONGO_ORCHESTRATION_HOME -name \*.log -exec sh -c 'x="{}"; mv $x $PWD/out_dir/$(basename $(dirname $x))_$(basename $x)' \;
tar zcvf mongodb-logs.tar.gz -C out_dir/ .