Module: EyBackup
- Defined in:
- lib/ey-backup/mysql_backup.rb
Defined Under Namespace
Classes: MysqlBackup
Class Method Summary collapse
Class Method Details
.get_from_ec2(thing = "/") ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/ey-backup/mysql_backup.rb', line 16 def self.get_from_ec2(thing="/") base_url = "http://169.254.169.254/latest/meta-data" + thing url = URI.parse(base_url) req = Net::HTTP::Get.new(url.path) res = Net::HTTP.start(url.host, url.port) {|http| http.request(req) } res.body end |