Skip to content

Instantly share code, notes, and snippets.

View david-vo's full-sized avatar

David Vo david-vo

View GitHub Profile
@david-vo
david-vo / set_s3_lifecycle
Created September 11, 2013 16:29
Script to set/change the lifecycle of an Amazon S3 bucket. Todo: add options using opt-parse. I am actually not sure if this works. There are no errors but I can't figure out a way to check the lifecycle of an altered bucket.
#!/usr/bin/env ruby
# Script to backup the Discourse postgres db and upload it to Amazon S3
require 'rubygems'
require 'yaml'
require 'fog'
require 'time'
require 'date'
@david-vo
david-vo / push_db_to_s3
Created September 11, 2013 16:25
This takes a backup of the Discourse postgres database and pushes it to a predefined Amazon S3 bucket.
#!/usr/bin/env ruby
# Script to backup the Discourse postgres db and upload it to Amazon S3
require 'rubygems'
require 'yaml'
require 'fog'
require 'time'
require 'date'