Sha256: 6bcc6db1cb9f7e241f272b4ad7e2bec80c61409af04b5f3f87dee1d14b7bfdd0

Contents?: true

Size: 442 Bytes

Versions: 17

Compression:

Stored size: 442 Bytes

Contents

Standup.script :node do
  def run
    exec "s3cmd mb #{bucket}"
    
    update_cron '@hourly', <<-CMD, :section => name
      #{scripts.webapp.db.dump_command scripts.webapp.db_name} | gzip > dump.gz
      s3cmd put dump.gz #{path_prefix}/`date -u +%Y-%m-%d/%H-%M-%S`.gz
      rm dump.gz
    CMD
  end
  
  protected
  
  def bucket
    's3://standup-backup'
  end
  
  def path_prefix
    "#{bucket}/db/#{scripts.webapp.db_name}"
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
standup-0.3.28 scripts/db_backup.rb
standup-0.3.27 scripts/db_backup.rb
standup-0.3.26 scripts/db_backup.rb
standup-0.3.25 scripts/db_backup.rb
standup-0.3.24 scripts/db_backup.rb
standup-0.3.23 scripts/db_backup.rb
standup-0.3.22 scripts/db_backup.rb
standup-0.3.20 scripts/db_backup.rb
standup-0.3.19 scripts/db_backup.rb
standup-0.3.18 scripts/db_backup.rb
standup-0.3.17 scripts/db_backup.rb
standup-0.3.16 scripts/db_backup.rb
standup-0.3.15 scripts/db_backup.rb
standup-0.3.14 scripts/db_backup.rb
standup-0.3.13 scripts/db_backup.rb
standup-0.3.12 scripts/db_backup.rb
standup-0.3.11 scripts/db_backup.rb