Skip to content

Instantly share code, notes, and snippets.

@nijikokun
Last active May 6, 2016 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nijikokun/e09e6f0332ca359ed3ddf097e8dfc11b to your computer and use it in GitHub Desktop.
Save nijikokun/e09e6f0332ca359ed3ddf097e8dfc11b to your computer and use it in GitHub Desktop.
Collection of useful devops commands / bash commands

Download files over a Socks Proxy

$ scp -i <pem_key> -o ProxyCommand="nc -x localhost:<proxy_port> %h %p" <ec2_user>@<private_ip>:<file_path> <local_path>

Dump MongoDB and Create TAR File

$ mongodump --db <database_name> --out ./dump
$ tar czf dump_`date "+%Y-%m-%d"`.tgz ./dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment