Class: S3MysqlBackup

Inherits:
Object
  • Object
show all
Defined in:
lib/s3_mysql_backup.rb

Instance Method Summary collapse

Constructor Details

#initialize(db_name, path_to_config) ⇒ S3MysqlBackup

Returns a new instance of S3MysqlBackup.



11
12
13
14
15
16
# File 'lib/s3_mysql_backup.rb', line 11

def initialize(db_name, path_to_config)
  @db_name        = db_name
  @path_to_config = path_to_config

  self
end

Instance Method Details

#runObject



18
19
20
21
22
23
# File 'lib/s3_mysql_backup.rb', line 18

def run
  ensure_backup_dir_exists
  connect_to_s3
  remove_old_backups
  mail_notification(dump_db)
end