[SERVER-605] Shell should provide a way to run system commands Created: 04/Feb/10  Updated: 12/Jul/16  Resolved: 12/Feb/10

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 1.3.3

Type: New Feature Priority: Major - P3
Reporter: Jonathan Simms Assignee: Mathias Stearn
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The mongo shell should provide a way for executing system commands from inside the shell. This would make the http://www.mongodb.org/display/DOCS/fsync+Command#fsyncCommand-Lock%2CSnapshotandUnlock procedure easier and more self-contained.

essentially:

db.runCommand(

{fsync:1,lock:1}

)

system("/path/to/my-filesystem-snapshotting-script.sh")

db.$cmd.sys.unlock.findOne();



 Comments   
Comment by Mathias Stearn [ 12/Feb/10 ]

If you'd like to prevent shell scripts from using this feature compile the mongo shell with --safeshell

Comment by auto [ 12/Feb/10 ]

Author:

{'login': '', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: --safeshell compile-time option to remove dangerous functions SERVER-605
http://github.com/mongodb/mongo/commit/51ebf0fc741727511cb15c95c6c8edbf533f8fe9

Comment by auto [ 12/Feb/10 ]

Author:

{'login': '', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: runProgram() shell function SERVER-605
http://github.com/mongodb/mongo/commit/8294bd2d641b74778ac6293261fdff0dc062f77b

Generated at Thu Feb 08 02:54:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.