[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 |
| Comment by auto [ 12/Feb/10 ] |
|
Author: {'login': '', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: runProgram() shell function |