using mongodump to extract meteor data - windows

I'll preface this by saying I have very little coding knowledge other than a few mongo tutorials so this may be a very simple answer, I'm trying to extract the data from my meteor project into a text file that can be edited.
Previously I've just had meteor (and Node.js) installed but I've installed MongoDB because without it my cmd window would tell me "'mongodump' is not recognized as an internal or external command, operable program or batch file"
I then followed the instructions here and confirmed that my host is at 127.0.0.1 with a port of 3001. At this point I also began running my meteor project and opened a new shell.
The project is running at D:/projectName and when I execute "mongodump -h 127.0.0.1 --port 3001 -d meteor" from there it still says "'mongodump' is not recognized as an internal or external command, operable program or batch file"
But if I execute the same line from the mongodump.exe directory (C:\Program Files\MongoDB\Server\3.2\bin) then it says "Failed: error dumping metadata: error creating directory for metadata file dump\meteor: mkdir dump: Access is denied"

The user you log in with doesn't have permissions to write to the
C:\Program Files\MongoDB\Server\3.2\bin
directory. mongodump wants to write to a directory beneath the current working one.
You can do two things. You can add the above path to your system executable path and then run mongodump from a directory you have write permissions on.
Or you can keep running it from the above directory but specify the --out option with a path to a directory you have write permissions on.

1- run cmd as an administrator
2- write in cmd : cd "C:\Program Files\MongoDB\Server\4.2\bin"
3- write in cmd mongodump
then it will work successfully

Related

'gawk' is not recognized as an internal or external command, operable program or batch file. but other files in the similar path can be run in Cmd

I wan to run a code which should be read in Cmd using gawk. I have installed it in my program file directory. I also have installed another file named Grep.exe in the same directory:
enter image description here
when I try to run codes with these files I can run grep in cmd but I cant run gawk which is in the same directory. see the picture:
enter image description here
I thought the problem is with the path so I tried different things.
1
defining the path in cmd with this command and this link
setx path "%path%;c:\directoryPath"
define path in windows env using this link
Installing in different directory and adding env path
renaming the gawk.exe to ggawk.exe and trying to run
installing in other computrs
none of them work.
I dont know what is the reason that it can read other files in the same directory but not this specific .exe file that I need.

How do I run in Bash under Atlassian Bamboo?

I'm hosting my Bamboo on a Windows server and would like to run a script in Bash shell. I have learned that I could do that with in-line shebang. So I selected "Shell" as my interpreter and wrote the script:
#!/bin/bash
perl -pa ebin -s myapp start -detached
The failure report was as below:
'#!' is not recognized as an internal or external command, operable program or batch file.
What was missing here?
Also, I tried to put the above script content in a batch file (.sh) to execute it with Bamboo Command. I put the file in the root directory and set the path of it on Bamboo as just the file name. Then the build just got broken there and there was no log displaying about it.
Any solution that would solve my problem is much appreciated!
(Bamboo version 6.1)

How do i change the root folder that psexec.exe uses?

Im trying to run a batch file on remote computer using psexec.exe
My code is;
psexec.exe \\192.168.13.187 -u Administrator -p default -d -i c:\temp\abc.bat
But when i execute this on command prompt, it connects to remote server's system32 folder then start the batch file.. Problem is that batch file has some CALL method in it (like CALL XXX.BAT) (XXX.BAT file is in the same folder.) Since psexec.exe uses system32 folder as root path, after running c:\temp\abc.bat file successfully, it could not CALL the other batch file. throwing 'could not find the file specified'..
My question is; how do i use the remote C:\temp\ folder as a root path after connecting the remote computer ?
Thanks for help in advance !!
Use the -w switch Luke.
-w directory Set the working directory of the process (relative to the remote computer).

Command not found

I am quite new to the Mac Terminal environment.
I donwloaded sqlplus (which is recognised as a UNIX executable program) and then in Terminal I do cd a few times until I arrive in the folder I put this in (\Applications\instantclient_10) in this case.
When I type 'ls' I see a listing of all the files including the sqlplus. So I would then expect to simply type at the Telnet prompt 'sqlplus' and then this would start but instead keep getting
-bash: sqlplus: command not found
This is problem one.
I have now downloaded MySQL and again, when I go to the correct folder (\Library\StarupItems\MySQLCOM) and I type 'ls' I see my files (including MySQLCOM) but when I come to try to 'run' this by simply typing 'MySQLCOM' again the message is:
-base: MySQLCOM: command not found
What am I doing wrong?
Thanks
To run binary/executables in current folder you need to prefix them with ./
./sqlplus
The idea here is that you want to force execution of local file and not run it accidentally. Imagine app that would put ls binary into it's folder and it would automatically run if did ls in that folder.

Problem setting up github repository, touch not recognized in CMD

When I get to the step:
touch README
I get the error
'touch' is not recognized as an internal or external command, operable program or batch file.
What does this mean?
I'm in Win 7 Home Premium command prompt.
Make sure you're working in git bash, not cmd.
The touch command updates the last-modified timestamp of the file to the current time, or if the file doesn't already exist, creates an empty file with the given name. This command does not exist (by default) in Windows, which is the reason you get that error message.
To get past this step, you can create a file called README in whatever way you feel most comfortable with. For example, you could use notepad.exe if you have no better alternative available.
Use this code in CMD and then touch your file
npm install touch-cli -g

Resources