Skip to content

Instantly share code, notes, and snippets.

@LispyAriaro
Created August 27, 2017 23:26
Show Gist options
  • Save LispyAriaro/8733ed1d43b126e4bcd69eea1dcacb07 to your computer and use it in GitHub Desktop.
Save LispyAriaro/8733ed1d43b126e4bcd69eea1dcacb07 to your computer and use it in GitHub Desktop.
Helpful - Scp - Ssh - MongoDb commands
### To download a file from your ec2 ubuntu instance to your local computer CURRENT directory
```
scp -i ~/.ssh/YourPrivateKey.pem -r ubuntu@ec2-xxx-xxx-xxx.compute-1.amazonaws.com:/home/ubuntu/folderYouCareAbout/ .
```
### To restore a mongodb database
mongorestore --db dbname dbfolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment